Build your first Ai Agent on Relevance Ai (no code)

Rory Ridgers walks through building a no-code lead-generation agent on Relevance AI. You'll create four tools: a lead researcher using Google search, a company research tool that pulls LinkedIn and website data, a database storage step, and a personalized LinkedIn message generator. The agent chains these together to find prospects, research them, store details, and draft outreach.
Chapters
In this video, I'm going to be teaching you how to make your first AI agent on Relevance AI. In my opinion, if you're just starting out making these AI agents, Relevance AI is your best bet when it comes to the platform you choose to build these AI agents on. It's really simple to get started with, and you can also go on to make some much, much more advanced AI agents on Relevance AI. I'm going to teach you how to make different tools, add these tools to an agent, and then also prompt the agent to be able to use these tools correctly. If you haven't seen me before, my name is Rory Ridgers, and I'm an AI enthusiast, and I'm passionate about helping business owners integrate AI into their business. So if that's something you might be interested in, then I've left a link to my website in the description of this video. You can go in and book a call with me and we can talk through some ways that we can integrate AI into your business. Also, I just wanna say that all the templates I use in this video will be available for completely free in the description. So if you go ahead and grab those, just go into the description and you'll find the link. But let's not waste any more time. Let's get into the video. Okay, so in this video we're gonna be making a lead assistant AI agent on Relevance AI. I've drawn out just a simple little plan here so you can sort of visualize how this AI agent is gonna work. So first of all, what's gonna happen is you're going to talk to the AI agent and you're gonna say something like, find me leads in whatever industry you like. So you could say, find me restaurants in London, for instance, or find me construction companies in New York, anything like that. And it's gonna use the lead researcher tool to be able to actually find these leads in that industry. And then you're going to pick one of these leads that you like. The AI agent will say to you, is there any of these leads that you'd like to know a little bit more about? And you can say, Yes, the second one, or yes, and then the name of it, anything like that. And then it's going to use the research company and find leads tool. And what that's going to do is it's going to find some specific details on these leads. So things like their website URL, it's going to give you a company summary on their company, their LinkedIn URLs, everything like that. And then you'll be given the option to either add this lead to a database or create a personalized LinkedIn request. You can do just one of these, or you can do both of these at the same time. You just have to ask the AI agent. So the adding leads to database tool, kind of what it says on the tin, it basically will just add this lead to a database, and the databases are already on Relevance AI, so you don't have to use any other external platforms or anything like that. Or you can create a personalized LinkedIn request. What it's going to do is it's going to look through the LinkedIn of whichever role you choose when you wanted to research a company and find leads. So for instance, could be the CEO, the head of marketing, anything like that. It's going to look through their CEO, look through their posts, and then also just through their profile, and it's going to craft a personalized outreach message for you. So if we come over to Relevance AI, you can see we have the tools here. We have the Lead Researcher tool, Research a Company and Find Leads, and then Add Leads to Database tool, and Personalized LinkedIn Requests with LinkedIn Post or LinkedIn Profile. And now the Lead Researcher tool and the Add Leads to Database tool you will have to make yourself. The other two tools, Research a Company and Find Leads and Personalized LinkedIn Requests with LinkedIn Post or LinkedIn Profile, are already on Relevance AI. So if you want to find them, you would just go to New. A few templates, and then you can just type in the name of the tool here. But for these two that we have to make ourselves, they're probably most simple out of the four, but it just gives you an idea of how to make these tools and not be restricted to the templates that Relevance AI provides you with. So first of all, we're going to look into the Lead Researcher tool. So we just hit edit. So you can see here, to start off, we have user inputs, and this is just the data that needs to be inputted into the tool in order for the tool to run. So in this case, we have lead input, and this is the industry type of business that a user considers their leads. So this would be, as I said before, something like construction companies in New York, and then it's going to get saved as the variable leads. I missed the S off. It's going to be saved as the variable leads, and then we can use that later on in the tool. So if we come down, you can see we have the steps here of the tool, which is sort of the actual functionality, so how the tool actually works. First of all, we just have a Google step, and all this does is simply just does a Google search. So we've put in this variable from before, the leads variable. So essentially the user input, the first thing that's going to happen is that user input is going to be taken and then searched for in Google. And to add variables in, usually you can just click on the textbook like this and all the variables that you can use will show up. But if they don't, what you can do is just add two curly brackets and then the variables should pop up. Obviously they're already there, and then you just select whichever one you want to use. So we're going to do a Google search for, let's just say, construction companies in New York again. That's going to be saved as the variable Google. And then we have an LLM step here and we're using GPT-4o Mini. The nice thing about Relevance AI is you don't have to add in any API keys in order to use LLMs. You can, but you don't have to, which is nice. So it makes it that bit simpler. So we've just given the LLM a prompt here. We've said you're an expert at retrieving specific data from a list of data. I want you to take the output of this Google search and then we've put in the variable from the Google search step. So you can see, type in variables here, we just do two curly brackets and then the variables would pop up that we can use. So we take the output of this Google search and retrieve only the name of the businesses, output only the names and nothing else at all. So it's just going to go through those Google searches and output just the names of these businesses. We can also name this variable. At the moment, the default is just LLM, but we can call it something like business names, for instance. This is just so that we know what it is, and then also the AI agent knows what the variable is as well. So we're just going to test this tool out. We're going to say the example we'd be using construction companies in New York. So construction companies in New York, we hit run tool, and then we can see how this tool works and the outputs of every step. In this case, it's only two, but we can see the outputs here. So this is the output of the Google search. This is what it found, all of this data. And then that all gets passed over to the LLM, and you can see it's gone through all of that and then just outputted just the names of these companies, which is perfect. That's exactly what we want. So that's a really, really simple tool. I'm going to show you into the next tool, which one of the pre-made ones on Relevance AI, the research company and find leads. So if we hit edit, we can come into it. You can see for this one, this time we have two user inputs. We have company name, the name of the company the user wish to find leads from, and the role to find, so the role of the lead that the user wishes to find. And these inputs are saved as company name and role. So this tool would be used after that list of businesses has been returned to the user and then the user would say something like, find me the CEO of the second one, or find me the head of marketing of the fourth one, something like that. And then for the steps here, you can see we have a couple more steps. So the first one, just a simple Google search, it's going to look for the company name and then the role's LinkedIn. So this will look something like, say the construction company is called Dan's Construction and then the role is the CEO. So the Google search would be Dan's Construction CEO's LinkedIn. And then we have another Google search that just simply looks for the company name's website. So it'd just be Dan's Construction's website, and then it should return the website of that company. And then we have an LLM step here, and what it's going to do basically is going to take the output from this step, the role list, as you can see, role list, and it's basically just going to search through all of the data that is returned and try and find what is most likely LinkedIn URL that we're actually looking for. Because when you search for something on Google, not just one thing comes up, right? Loads of things comes up. So We need an LLM step to be able to sort through and actually help us to find the LinkedIn URL in this case that we're looking for. And then it's gonna export that as JSON. And then we have a convert JSON-like text to JSON. So really simple, it's just gonna convert this output into actual JSON. And then we have another LLM step here. And what it's gonna do is similar to this LLM step before, it's gonna take the output from this Google search where we're trying to find the company's website and it's just gonna sort through that data and find the most likely URL that we're actually looking for, and then output only the URL, and then that's saved as URL. And then what we're going to do is we're going to take the answer from here. So this output goes into here, and we're going to extract the website content. And now this step is something that's already on Relevance AI. So if you wanted to use something like this, you just click the plus icon. You can see it's already there, otherwise you'd have to type it in if you didn't see it. But yeah, this is a really useful tool that's already on Relevance AI that you can use inside your tools So this is going to return all the content from the website and we use an LLM step to basically go through that website content. So you can see we've got the website content variable we've used in here and we've just said, can you make a summary on the company based on the company website content? So if that didn't make sense to you, this should make a little bit more sense when we, once we give it a test input. So for this test run, just because construction companies are something that's a little bit more obscure, we're just going to say something, a really big company like Gymshark. And we're going to say we want to find the head of marketing. So the head of marketing for Gymshark. Let's hit run tool, and then we have the outputs here. So the name, Carly Natizlia— I might pronounce that wrong— and then the LinkedIn URL here, the company website, and then a company summary. So if we go back to the top of this, and we can see all the outputs from each of these steps, and we're just going to sort of work through and decipher what's actually happened here. So the Google search, nice and simple, we search for the company name and then the head of marketing's LinkedIn, and it's given us all of this data here. And then we've done another Google search for the website. This should be relatively straightforward. So you can see, yeah, the first one that pops up here is the website URL. And then this LLM step has gone through that first Google search, and this was outputted: Carly Natalizia— I might pronounce that wrong— the role, head of marketing, and then the LinkedIn URL. And we converted that into JSON like this so that it's separate variables. And then we've used the LLM step here to find the most likely website URL, which you got right, no problem, Gymshark. Then it's extracted all of this website content. I'm not going to click view all because it's quite a lot of content. We don't really need to look through that. We just need to know that it's outputted all the website content, which it has. And then this LLM step here has just gone through that website content and summarize the company. So perfect. We can hit save and come out of that, and then we can look at the other tools. So we're gonna look at this adding lead to database tool, cuz it's probably the most simple tool. All it is is a bunch of user inputs and then one step. So the user inputs in this case are lead name, LinkedIn, company website, and company summary. So pretty much just the exact outputs from that step before. So the lead name would go in here, her LinkedIn URL would've gone in here, the company website, gymshark.com, would've gone in here, and then that company summary would've gone in here. And then we use this Insert Data to Knowledge tool. And you can see I've already made a spreadsheet. We can just view it. And these databases stored on Relevance AI, which is really nice. Means you don't have to connect it to some sort of Google Sheets or an Airtable database or anything like that. This is all stored in Relevance AI. You can see I've already got some examples in here, but we've just got the headers: company summary, company website, lead, LinkedIn, and lead name. And when you come to use this tool, we'll have this new data to insert bit here, and this will already be filled out for you, but it would look like this without the variables. And then all we have to do, just put in the curly brackets and put in the variables. So company_summary, we look at this company_summary, we can just copy and paste that just to make sure that we've got it right, and then close it off with the brackets. And then that's just going to input this variable into this column. So super, super simple. That's not really any trouble at all, that's all. And we have the last tool, which is probably the most complex out of all of them, but it's not that bad, so don't worry. I'm going to show you through it. So the user inputs are first name, LinkedIn URL, my company. And we already have the first name and the LinkedIn URL. We got that from the research company and find leads tool. And then my company would just be your company. In my case, it's Autonomously, but for you it would be whatever the name of your company is. And that'll make sense later while we do that. So you can see these variables are saved as first name, LinkedIn URL, and then my company. So really simple. And this one's nice because it actually has labels on what's going on because it's a pre-built tool on Relevance AI. So we have the first step here, which is just get LinkedIn posts. So we use the variable LinkedIn URL. It's going to search for this LinkedIn URL and it's going to return the last 10 posts. And it's set to the last 182 days. I'm not sure why that's so specific. You can change that number to whatever you want. For now, we're just going to leave it on 182 days. So it's going to return the last 10 posts from the last 182 days of that LinkedIn URL. And then we're just going to format these LinkedIn posts for better LLM use, as it says here. So we're going to use an LLM to do that. You can see we've given it the output from here and we've just said for each post, provide a response in the following format. So the first name shared a post X time ago, commenting important original post not created by first name. He/she just reposted. The original content was da da da. So basically we've just formatted the output of that step before into a better format for the LLMs to use later on. And this is the LLM step that we want it formatted for, because you can see we want to summarize the relevant data points for better LLM use. So we're going to examine the LinkedIn post and identify insights that could be tailored to my outreach and then create a summary. So we have the first name and then we've given it the output of this LLM step here. And we said, review the LinkedIn post focusing on the timeline and unique data points. Identify relevant insights from the first names, experience, skills, achievements for a personalized touch. Basically, it's just gonna go through, look at all the data and find the data points that we actually care about. And then that's gonna be saved as LinkedIn post summary. And then this LLM step is going to personalize a connection request based on LinkedIn post. So based on the output of the two LLM steps before, this LLM step is basically just going to actually craft the outreach message based on their LinkedIn posts. So you don't really need to read all of this, but we've basically just given it the outputs of the step before, told it how to format this outreach message, and then we're going to save that variable as personalized request posts. So the way this tool works is that it's either going to create a personalized outreach message based on their post or based on their profile. So this first half of it is going to be if it's based off their posts, and the second half of it is going to be if it's based off their profile. Going to prioritize based off their posts, but a lot of LinkedIn accounts won't have any posts, but they will have some data on their LinkedIn profile. So what we do is we try and find some LinkedIn posts to create a personalized outreach message from, but then what happens after is basically if we can't find any posts, then it's going to base the outreach message on their data. That could be things like, you know, their previous jobs, their role, how long they've been in certain places, things like that. So we're going to use this get a LinkedIn profile slash company and post. So we're going to put the LinkedIn URL variable again and said get user profile. So it's just going to return all the data from this user's profile. And then now we use this JavaScript code to keep the only relevant data points from the LinkedIn profile. So we use this JavaScript and what it's going to do is going to go through all the variables that are outputted on this step and it's just going to give us again the things that we actually care about. So skills, about, educations, field of study, date range, experiences, company title, that sort of thing. And then again, we're going to summarize the relevant data points for better LLM use. So kind of what happened before with the post part, now we're just doing the same thing with the profile data. So it's kind of just the same prompt as before. We've given it the output from here and said basically structure this for the later LLM use. And then we have another LLM step here. You can see it draws conclusions. From summary. So we put in this LinkedIn profile summary, and what it's going to do is it's going to take the my company inputs— that'd be your company— and it's going to look through their profile data, sort of find things that are actually relevant to our company. So yeah, that'll make a little bit more sense when we actually run this tool. Then the step after that is just going to actually be crafting this outreach message based on their LinkedIn profile. So again, kind of the same prompt as before, we're just using the outputs from the steps before. And it's gonna craft this outreach message based on their profile. And then what this step does here, prioritize LinkedIn posts, fallback to LinkedIn profile. So what I said before, the tool is going to try and craft the outreach message based on their posts. But if there isn't any posts or we can't find any data on their posts, then the fallback is gonna be their LinkedIn profile. So this JavaScript code, you don't really need to be able to read or write JavaScript code. You just need to know what this does, which is prioritize LinkedIn posts outreach message and then fall back on the LinkedIn profile outreach message. So that's what that's going to do. And then the tool output is just going to be this personalized opening line outreach message. So we're just going to give this a test run through. I think the user inputs have already been filled in by Relevance AI. Yeah, so Benedict and then a LinkedIn URL, and then my company is Relevance AI. So we're just going to hit run tool and use that as an example, and you can see what is going on here. So First step is to get the LinkedIn posts. And yeah, you can see this is the LinkedIn post here. Text, reshare, comment, time, text. These are all the different posts that this person has obviously posted on their LinkedIn. Okay, so the tool is finished running now. It kind of drags you down. You can't really see the output of each step of this while it's running, so I'm just going to show you now that it's done. So this LLM step, like I said, it's formatted this data into just a nicer format for the next LLMs to use. And then this LLM step that's going to summarize the relevant data points has, as you can see, this is how it's outputted it, it's summarized the relevant data points from the LinkedIn posts. And then this LLM step here should have created the outreach message. So yeah, hi Benedict, I noticed your earlier post about the impressive results from AI systems in enhancing sales pipelines. It's exciting to see how automation can drive efficiency. I'd value the chance to connect and share insights on innovative tech in our field. So perfect. Now we're going to try and get the LinkedIn profile data. So you can see this is the data from the LinkedIn profile. We get all of these different data points, but we don't really want all of them. So that's why we use this JavaScript code after. Okay, so we use this JavaScript code and you can see it's just given us the data points that we actually want and we can actually use in these next LLM steps. And then after that, we have an LLM step that will summarize the relevant data points for better LLM use. So sort of what happened before with the LinkedIn posts, you can see this is what it's outputted. That's perfect. And then we draw conclusions from the summary. So it looked like to personalize a LinkedIn connection request to Benedikt, focus on his role as growth operations lead, emphasizing his responsibility for building autonomous AI teams. So yeah, if you didn't understand it when I explained that step the first time, It's basically just going to look at the profile data and sort of find the things that we can target in this personalized outreach message based on our company. And then personalize the connection request based on LinkedIn profile. So this is going to actually create this connection request. Hi Benedict, I admire your work in building autonomous AI teams. And then it's JavaScript code round, which just prioritized the LinkedIn post outreach over the profile data outreach. So you can see this is what we got. The— I noticed your earlier post about the impressive results from AI systems. So it's talking about the post, which is good. So I hope this tool made sense to you. It's a little bit more complicated than the other ones, but when you actually break it down, I feel like it's not too bad if you just look at it step by step and what each part is doing. Then it shouldn't be too hard to figure out. So now what we need to do is we need to add all of these tools into an AI agent so we can actually use it and chat to it as if it was a human. So what we do, come over to the menu here, Go to Agents. Now I've already made the agent here, but if you was going to make a new agent, you'd simply just click New Agent. But in this case, we've got the Lead Assistant agent here that I've already made, so we're just going to hit Edit and I can show you how to add the tools and also how to prompt the agent. So the agent name and the agent description, right now these things don't really matter. It's kind of just for you, but when you come later on to use multi-agent systems, these things will matter because it's how the agents will be able to determine which agents to use. But don't worry about that for now. For now, just put whatever you like in here. I've said lead assistant, find news leads and research them, and creates a LinkedIn connection request or adds the leads to a database. Yeah, so don't worry about that bit too much for now. The main part here is going to be the core instructions because this is how you're going to tell the agent how to use all the different tools, how to input the data into these tools, and also what tools it has and what these tools do. So this prompt here, first of all, I'm actually going to show you how to add these tools into your AI agent. So I've already got the tools in here, but if you're going to add a new tool, you click Add Tool and then just hit Add, and it would go over and be able to be used in the AI Agent. And something to remember is when you actually first add these tools in, this will be set to approval required, and you just want to set them all to auto run so the agent will be able to automatically use them without our approval, which we want. So we're gonna have a look at these core instructions. You can see we've structured it: the role, the task, and then some notes at the bottom. And the role, I've just said you're an expert at finding and researching leads across different industries for the user. You are able to find leads in an industry, then research these leads and either add the lead to a database or craft a LinkedIn outreach message. So just sort of clear examples on how it should act and what it does. And then for task, this by far the most important bit, I've said I want you to be able to recognize the user's intent and be able to use the appropriate tools to fulfill the request. Sort of all the AI agent is actually doing in a lot of these situations is it's just kind of the middleman between between the user inputs and the tool. So, so just need to be able to take the user's inputs, recognize their intent, and sort of know what they want to do, and then find the right tool to be able to fulfill that request and then input the data properly into that tool. So it's kind of just a middleman, the bridge between the data from the user and the tool actually working. So I've just said to it, the tools you have are Personalized LinkedIn Requests with LinkedIn Post or LinkedIn Profile, Adding Leads to Database Tool, Lead Researcher Tool, and Research Company and Find Leads. And to be able to add the names tools into these AI agent prompts, all you do is just hit a forward slash and then the names of the tools come up here and you can put them in just so that the AI agent knows exactly what tool you're talking about. So I've just said to it, a user will usually start a conversation off by requesting to find leads. This could sound something like, find me construction companies in New York, or I want to find some marketing agencies in London. When a user says this, always use the Lead Researcher tool to find these leads. Here's a breakdown of the tools. So I've just given it A breakdown of the tools. I've sort of structured it the same for each of these. All I've said is this tool allows users to find leads in their industry. So what the tool does, the only input required is potential leads. So then I put in the user inputs from the tool. Tool works by performing a Google search from a user input and then outputting only the businesses' names using an LLM step. So I've explained to the AI agent how the tool works just to give it a little bit of context. And I've said, considering this, I want you to input the potential leads input considering that it'll be a Google search with the goal to find companies in that industry. Always use that tool first when a user says they want to find leads or companies, etc. So very simple but very clear to the AI agent what this tool is and how to use it. I've clearly laid out what this tool does, what the user inputs are, when to use it, and then just a little bit of context on how the tool actually works. And that's pretty much the structure for each of these descriptions. If you want, you can pause the video and read through them, or you can just go ahead and look at the link in my description and the full prompt will be there for you to use. But I'm just going to go down note sections here, and this is just sort of those little notes that you want the AI agent to really hone in on and make sure it doesn't miss it. So I've said always use the Lead Researcher tool and then ask the user what lead they would like in more detail, and then use the Research Company and Find Leads tool. So I've just laid out for the AI agent and tried to make it really clear to it sort of the flow of what's going on here. And I've said if a user says they want to connect with them on LinkedIn, I'll add them to a database. They use both the Personalized LinkedIn Request tool with LinkedIn post or LinkedIn profile and the Adding Leads database tool at the same time. So that's if a user says they want to do both those things at the same time, because I don't want the AI agent to have to sort of do both of these steps separately. I want it to be able to just do it all in one go. So yeah, that's kind of all you need to see in the AI agent backend. Now we can get on to just testing this AI agent out. Okay, so we can start off saying something like, find me— okay, so we're just going to go with the example I was saying before, find me construction companies in New York. You can see this is sort of the flow of what the AI agent is doing. So one step performed in the background is use the lead research tool, which is perfect. And we can click on this tool and see the input and the output, and then also things like the credits, when it was run, the status of it, and who it was triggered by. So the input was construction companies in New York, and then this was the output. So the LLM should have said to us, yep, here are some construction companies in New York, giving us a list, and then which company would you like to research further? So let's just say the second one, second one. And something I didn't mention as well, in the research company and find leads tool, you would have to say what company it is you want to find more information about, and then also the role to find. I set it so if the user doesn't say the role they want to find, by default it's the CEO, and then if they state otherwise, use that. So if you just say I want to find more information out on the second one, it'll take the CEO as the default input for the role that you want to find. So We're just going to say second one, and it should automatically find us the CEO for that. So one step performed in the background. It's using the research company and find leads tool, which is good. Okay, so it's used the tool and it's found us the following information about Turner Construction Company. So the lead name is Mary Walker. She's obviously the CEO. This is the LinkedIn, this is the company website, and then this is the company summary. So perfect. We're just going to test out these links to see if they work. So the company website, click on this. This looks about right. So we can look at the LinkedIn URL. Okay, so yeah, you can see Mary Walker, Chief Executive Officer at Turner Construction Company. So perfect, that's both worked. Now it said to us, would you like to connect with Mary Walker on LinkedIn or add this lead to your database? So we're going to try and use both these tools at the same time. We can say, so I've said add it to the database and create a LinkedIn request. So now it should use both of these tools one after the other. So yeah, it's added her to the database. We can just quickly see the inputs and outputs. So this is the input: the company summary, the company website, the lead name, and the LinkedIn URL. And then failed documents is none and inserted one. So that should work perfectly. And then you can see it's used the personalized LinkedIn post with LinkedIn post or LinkedIn profile tool. We can look on here, the input: Mary, LinkedIn URL, the company name is Autonomously And then this is the output it's given us. We can just look what the AI agent said. So, Mary Walker has been successfully added to the database. Here's a personalized LinkedIn connection request you can use. Hi Mary, I admire your leadership at Turner Construction and your focus on operational efficiency. The challenges of sourcing top-tier talent in the construction industry caught my attention. I value a chance to connect and share insights on navigating these dynamics. So what's interesting is that if we go back onto our LinkedIn page here, You can see that she doesn't have any posts. So what's happened is it's tried to find these posts and then it's fallen back on the LinkedIn profile data. So that means the tool has worked perfectly. It's done exactly what we wanted it to do. Okay, so you should now have your very first AI agent built on Relevance AI that can find you leads and then do some research on these leads and also add them to the database and create a personalized LinkedIn message. As I said at the start of the video, all the templates I used in this video, as well as the prompt for the AI agent, will be available for completely free in the description of this video. And if you were interested in working with me, I've left a link to my website in the description of this video. We can book in a free consultation and talk about some ways to integrate AI into your business. So everyone that watched this video, and this is your first time building AI agent, I hope that you understood everything I've said in this video, and you should now be able to build your own AI agents. But of course, if there's anything you didn't understand, just drop me an email. My email's always open, and I'll be happy to help anyone that is struggling with building these AI agents. Also, if you have any video suggestions that you'd like to see, just drop them in the comments and I'll try my best to get around to doing them.
More from Rory

Dynamic Workflows are crazy. This is how to actually use them (beginner's guide)










