How to Build AI Agents in Plain English (Cursor Template)

9.5k views4087 WordsCopy TextShare
VRSEN
✨ Build your own AI agents from scratch—no coding needed! Just chat and watch them come to life! 🤖�...
Video Transcript:
in this video I will show you how to build reliable EI agents without writing a single line of code I'll be sharing with you an exclusive cursor composer template which we use at our AI agency to significantly speed up the AI agent development process before I made this file I tried using cursor with my framework and honestly the results I got were Med worker to say the least but now since this file contains everything you need to know about my framework and including all of the features all of the key Concepts examples best practices and more I literally stopped writing code for AI agents myself I only chat with cursor and it literally does all of the work for me so even if you haven't ever coded before by the end of this video you'll be able to build your own reliable eii agent teams that will work together to tackle the most complex tasks out there let's Dive In all right so watch this literally all I'm going to do is just send a single prompt to composer like this please build an AI agency with a CEO and the marketing agent the marketing agent can send emails with mailer send from updates o. com or SAS email and qualify leads using open chat completions API however the problem is that obviously cursor doesn't know how mailer send API works and in fact it even gets the chat completion CPI wrong after the open update so just to give you an idea of how powerful this is I'm going to copy the mailer send documentation and then I'm going to include it in a prompt like that and then I'm going to do the same with open AI dos awesome now cursor has everything it needs in order to create this agency so let's hit submit and see what happens next so now it read the mailer send documentation and also the open a documentation so then it proceeds with creating the first tool which is the send email tool for the marketing agent then it creates the qualify lead tool with the latest chat completions API then creates the marketing agent using the structure that we follow in my framework then it creates the instructions for the marketing agent also following our standard template with the goals role the process workflow and so on then it does the same for the CEO agent and then finally it creates the agency. py file where CEO can communicate with the marketing agent and the agency Manifesto which is like the shared instructions between all agents in my framework amazing right so that's literally all from a single prompt I haven't done anything yet and we're probably like 95% there so let me now test all of these tools and then we can try this agency together okay so the qualify lead tool Works straight out of the box and says that the John do appears to be qualified for several reasons no changes required amazing the send email tool also works Straight Out of the Box no changes required so it means that cursor literally created this entire agency without any mistakes so let's now run the agency.
P file and actually test it live so the agency. P file just had one small issue it basically used the relative input so literally all I done is just removed two dots from the import statements and so let's open the gradio interface just like this and then I'm going to send some Dam leite information with my email address and just tell it to process this lead so as you can see the agency is fully functional Co is now sending a message to the marketing agent with the lead information and then the marketing agent executes the first function and then tells me that the lead is indeed qualified amazing so now let me tell it to actually schedule a Consulting call with this lead so then let's check our inbox and indeed I got the schedu Consulting call email in my Gmail so obviously this is just an example and in a real world scenario you would replace all of the information in a prompt with your real company details so you wouldn't leave them blank and you would also obviously adjust this Agency for your own unique process and in fact this is what we're going to do in this video we're going to build something practical and something that you would actually use so I personally had this idea for a very long time where I want to create a Content marketing agency that will help me to generate content for my YouTube channel consisting of of three agents the first agent is going to be the content manager who will generate scripts and create content ideas with the 01 model then there's going to be a trend analyzer agent who will fetch the latest news extract keywords from these news and also analyze these keywords and finally there's going to be a YouTube analyzer agent who will have access to all my data on YouTube and it will analyze my channel demographics analyze my video performance analyze competitors and sentiment on comments for each video so the goal of this agency is going to be to help me create new and engaging content so now let's proceed with actually building this so as I said this tutorial is going to be for complete beginners so the only thing that I'm not going to show you in this video is how to install python because you can easily find tutorials on this yourself everything else I will walk you through step by step from scratch including setting up cursor including how to use the special cursor rules file that you see on the screen all of the cursor features and when to use them and so on so feel free to skip ahead if you already know all of that I'll leave a link to the file down below it's going to be on our agency swarm GitHub so all you need to do is just go to our agency form GitHub copy this cursor rules file and then drop it into your project so if you find it helpful just give us a star because there's no email required and it's completely free so the first step is going to be to create our repository so I definitely recommend you guys create a repository do not just you know code in a random folder on your computer computer because if you have a repo it allows you to keep track of your changes so for example if you run into any issues in the future you can always roll back additionally it allows you to collaborate with others so for example you can then share this repo with someone else and you can work on it together so I'm going to name my repository content creation agency and then I'm also going to set it to private additionally don't forget to include the python git ignore file all right awesome so now click create Repository and this will create repository on your GitHub so then the next step is to Simply clone it locally if you already have GitHub desktop installed then simply copy this link and open GitHub desktop if you don't have GitHub desktop then just make sure to install that first so let's go ahead let's open the GitHub desktop and then here just click on ADD and clone repository and then under URL select your folder enter your git address and then click clone so just like this now we have access to the S on on GitHub so now the next step is to download cursor so go to cursor. comom and simply hit download here I also recommend that you enable usage based building in settings because this will unlock the 01 preview model for you o1 preview model is significantly more costly so as you can see I spent around $8 on that model this month however I think it's well worth the cost because honestly there were some challenges that I had no idea how to solve and all other models struggled as well but then I would just ask Ohan preview model once and it would literally solve it in 5 seconds when I think it would have taken me like a few days so make sure to enable this model and I'll show you how to work with this model if we run into any complex challenges later okay now that you downloaded cursor the next step is to open our folder so simply open new window in cursor which will look something like this and then navigate into the folder that you just copied from GitHub so click open and now we are almost ready to go so we just have to do two more steps the first step as I said is to download the cursor rules file so go to ageny form GitHub and click download row file then go back to cursor and copy this file from your downloads however keep in mind that if you download it from GitHub it's initially going to have the txt extension so just make sure to remove that make sure to rename the file it should be named do cursor rules without any extensions at all so just like this now the cursor will recognize this file anytime you are working on this repository it will read all of these instructions automatically and then it will have all of the context it needs to know about agency form framework I want to spend hours writing this file myself so if you're curious about how my framework works also make sure to check it out and read through it all right so now the final step is to create a python virtual environment so simply click common shift p and this will open the most commonly used settings in vs code and then here select python select interpreter on top and then click create virtual environment so then you can select VN or cond if you have cond installed and then select The Interpreter of your choice so this will create a virtual environment and this means that now you're ready to start coding so yeah that's basically it for setup however if you want to become an ultimate power user then don't skip the next section because sure eii can already write all of the code for you however it also means that eii can right code for anyone else so if you really want to stand out as an engineer and 10 years from now you just need to know how to use your AI better than anyone else and shortcuts will help you to increase your productivity significantly so I'm going to open my agency form codebase which is pretty large and should serve as a pretty good example and let's start with the first shortcut which is comment option b so comment option b opens the chat window on the right and it's like basically chatting with chat GPT however it also has the context about your current file and if you want cursor to have context about your entire code base what you can also do is you can hold comment when hitting enter and this will perform rack which is retrieval augmented generation on all your files okay next up we have the edit feature so to open this edit window you need to click command K or control K on Windows and this will allow you to modify your code in line so for example you can say change this to a for Loop so I recommend using chat for more General architectural decisions and edit for quick changes when you know exactly what the change entails however the primary feature that we're going to be using in this video is cursor composer you can either click command I to open it in a smaller window or you can click command shift I to open it in a full screen if you don't have composer just make sure to go to features and enable it right here so what sets the composer apart from chat is that it can create multiple files simultaneously so rather than just suggesting changes one at a time composer can create and modify multiple files it can place them into multiple folders simultaneously in parallel so I recommend using composer when you are trying to implement any new features so now let's actually proceed to creating my content agency so let's open the composer and then let me enter my prompt so as you can see my prompt is quite long I definitely recommend you sp spend as much time as possible on this first initial prompt because it will allow you to save a lot of time later so my prompt is as follows please create a Content agency with three agents the content manager can generate ideas using openes o1 preview model and then I'm also including the link to documentation then I'm describing the process for the content manager agent I'm also describing the trend analyzer agent and each tool so for example I want to search web with Tav API which is a simple API for performing searches with with large language models and additionally I'm describing the YouTube analyzer agent and including my channel ID so that's you know basically it just make sure to describe the process the tools the apis that your agents need to use and then you should be good to go so let's hit submit and this will start composer so let's wait until it creates all the files and then I'll show you how to go from there so all of the files seems to be correct except it didn't generate the requirements.
txt file so all I'm going to do is just tell it to also add the requirements also one more quick tip is that you can add your own rules for EI under the cursor settings right here I for example like to add the thing stepbystep prompt but if you're just getting started I recommend adding something like I'm a complete beginner explain all the code you generate in simple terms something like this so this is the general process that you should follow for creating AI agents so the first step is to adjust tools then you need to adjust agents and instructions and and finally you need to test and then iterate so just keep in mind that e agent development is a very iterative process so you need to constantly test and iterate on your system and this the only way to fine-tune your AI agent team so I'm going to start from the trend analyzer agent and let's first go with the Tav Search tool so this tool looks pretty good so let me just run this and also don't forget to add your API keys in the end file so just click new file right here and then name it do end and then add your key like this so let's test the Tav Search tool again and see if it works all right so yeah as you can see the tly Search tool works out of the box no changes required so that's already one tool less that we need to modify so now let's try the analyze TR tool okay so as you can see the analyze TR response failed with status 429 so if this happens to you all you need to do is just select this Arrow message and then simp simply hit add to composer so you can click commment I or you can just click this button and this will add the error message into composer and now you can say please fix the analyze Trends tool so let's accept these changes and now test this tool again so simply hit run python file that's all you need to do and then see if it works seems like I'm hitting some rate limits with the analyze Trends so if this happens just ask cursor in chat What alternative apis I can use to avoid the rate limit so seems like there's Sam Rush API there's a MOS API there's HFS API so you can select any of this if one API doesn't work for you just replace it with some other API and get a new API key right so I'm just going to skip this tool because I don't think it's that uh important for this agency but yeah feel free to play with this yourself later so let's now go to the next agent which is the YouTube analyzer agent so let's proceed with the analyze competitors tool so this tool takes some keywords to search for competitor channels and then it also takes the Max results so the number of competitor channels to analyze however what I also want to add to this tool is the channel ID because we also have this second tool which is called access video performance and as you can see it takes the channel ID however right now the analyze competitors tool only Returns the subscribers total views and Total videos so the agent wouldn't know the channel ID which means that it wouldn't be able to use the second tool after this one so what I'm I'm going to do here is just open composer again and then just tell it to also return the channel ID and then I'm going to also include the add sign and select this file that I'm currently working on so it's going to be called analyze competitors so you can select any files if you click add sign like this and you can even chat with web which is super helpful amazing and now let's test the last tool for the YouTube Trend analyzer agent which is the evaluate sentiment tool so this tool also takes the video ID so that's very nice that the agent can combine the outputs from one tool with the inputs from the other tool however I think it would also be beneficial for the agent to actually see the comments so it can get some feedback so let's also modify this tool so I'm actually going to tell it to return the top comments for each video in the evaluate sentiment tool okay so now as you can see this tool Returns the top comments still I haven't written a single line of code this was super simple all I did is literally told cursor what to do and it did all of the work for me so the next step is to adjust the instructions so what I'm going to do is just send my idea for this process into the prompt and just ask cursor to adjust it just like this in the chat so first I want the agent to analyze my channel demographics and I wanted to analyze the video performance of my recent videos so let's hit enter and now it adjusts the process like this for me so this also significantly speeds up the development because you don't have to write the instructions yourself okay so now let me do this for the rest of the agents and then we can test the system together actually the instructions for the two other agents look pretty good to be honest I did not expect it to be so good so let's just adjust the agency Manifesto and inside the agency Manifesto instead of the operating environment I actually want to add some information about my YouTube channel so this information should be shared across all agents because I think it's quite important for the agents to at least understand you know what my channel is about what are my goals and so on so what I've done here is I just basically asked chpt what do you know about me in my YouTube channel because it has memory so it knows quite a bit about myself and then what I'm going to do is just copy this information and then also ask cursor to add this instead of the operating environment so that's basically it all of the tools work Straight Out of the Box except one tool which is the analy trends tool and in fact this tool didn't work because of an eror it didn't work because there a read limit on API request on py Trend so again if this happens simply search for other apis and do the same process over again so provide the cursor with API documentation and then just tell it to refactor this tool to use this other API so I'm going to run the agency. P file now and send a simple prompt as a test something like please help me generate content ideas so as you can see content manager creates a plan that it will first ask the Trent analyzer to analyze the latest news in 20 24 related to openi we then get some topics back and then the agent proceeds to extracting the keywords from those topics then we get those keywords for trending topics on AI in 2024 right very cool so next it tells the YouTube analyzer agent to analyze the performance of my videos so as you can see then it analyzes all of my channel demographics the top 10 videos then it proceeds to also analyzing the competitors so it analyzed two competitor channels for now and it also analyzes the performance and the comments on those channels so as you can see now we get a huge list of comments which is a very valuable piece of information honestly and hopefully that's going to help the content manager to now create some really high performing content ideas so the first one is three real businesses transformed by AI agents success stories revealed the EI agents for absolute beginners building your first eii agent step bystep step also great one actually I think I'm going to make one of these why structured outputs are disrupt in the eye what you need to know this similar to what I've made before but also could perform a toate your business life building an agent from concept to deployment also planning a video on that but more specific top five AI agent development Trends shaping 2024 stay ahead of the curve okay I mean yeah these topics are now actually really good because they're based on actual content gaps and the performance of my previous videos so yeah this is already extremely helpful I think this is good for now but of course you can also improve this agency even further so just keep on iterating it like just like I did so adjust the tools adjust instructions then test it again and then just repeat this process until you get it to the point where you are fully satisfied with the results however keep in mind that right now this agency is only available on your local machine so if you want to make it instantly more valuable you would probably want to integrate it into a channel that you use daily like slack so I've posted a video on that before so feel free to follow that tutorial and this way you'll be able to chat with your agents directly from slack which instantly provides significantly more value alternatively feel free to explore our SAS solution based on my framework where we will soon add a feature to import agents directly created with agency's form so you'll be able to drop the settings.
Copyright © 2025. Made with ♥ in London by YTScribe.com