How To Create a Local AI Agent in 7 min with Cursor AI (take my code) β
Let's build with Zapier and AI (100+ videos)π
2025-06-30
Transcript β
[00:00] Today we're going to create an AI agent that we can run just on our computer. This AI agent you see right here is going to be completely customizable and you're going to be able to do a bunch of cool actions. Let's see it working. Create a draft email saying I want to go to SF and then also list the top 10 things to do there in the email. And then we're going to send this to contact.com. With our AI agent set up here, I hit enter. It's crunching pixels and dreams. We get a nice little past chat log that we're going to be able to copy our prompts. And as you see here, we got our draft email, the top 10 things to do. And the best part is you're going to be able to customize this AI agent to connect with Google Sheets, Slack,
[00:31] anything when it comes to all the applications found on the internet. Welcome back, y'all. Today's video is sponsored by Zapier. As you already know, me and Zapier are doing a bunch of cool stuff together. I got hit up and they said, "You know what? We need to have a local AI agent that's able to run on our computer and do a bunch of cool stuff." So, that's what we're doing in today's video. Best part is that in this video, you're going to get a bunch of free source code that's going to be able to run this agent. We're going to see how we actually set up the agent to do the types of tasks we want. and the entire flow end to end. Sound good? Let's jump in. Step number one, we need to get the code. So, I went ahead and
[01:02] open sourced this project on GitHub. I'm going to leave it in the description down below, a link to this Git repository for you to download all the code. Now, if you're wondering, Corbin, I don't know how to download code in this way. I'm going to leave another video in the description that describes how to download open-source code like this and actually run it on your machine. For now, download the code and open up Cursor AI. So, now that you've downloaded the code, it should show up like this. You have a bunch of files here. Don't worry, you only need to change one line for this all to work. And that one line is going to be our web hook here. This is how we're going to send the data in our local application.
[01:34] So, the best part about Zapier, other than the fact that we can integrate with over 7,000 apps in a very easy way, is how it's structured. Now, it's entire ecosystem, I want you to think of it like an AI orchestration platform. And we're going to create a symphony together where we're going to connect Zaps, automations, and agents, have them work handinand to create this. So, the first thing we need to do is let's create a zap. create new zap. For the trigger, we're just going to set up a web hook here. This is how we're going to receive the data web hook. The trigger event will be catch hook and we'll hit continue. Continue. And this is going to be your zap year URL. So,
[02:05] all you need to do is copy. Once you've copied, come to line 47 and just replace this line. You don't have to touch anything else. And if you need more help, ask Cursor AI. From here to get our AI agent working, we're going to open up terminal. To open up terminal cursor AI, come down here, click this, hit terminal, and you're here. And to run our agent, all we need to do is npm start. npm start. Hit enter. Once you see that, all you need to do is open up the link of localhost 3000. As you see in the top left right there, localhost 3000. And we got our nice little AI
[02:35] agent. Now, if this is your first time working in Cursor AI or just coding in general, I'm going to leave this Google doc in the description down below. This shows you step by step how to circumn errors you may receive. For example, you might get an error that says npm doesn't exist, doesn't recognize this command. any type of error you receive, check out this Google doc. I show you step by step how to do it in step one to make sure you have everything you want installed to run this AI agent. To be clear, don't worry. I also got Windows commands here and Linux and Mac. Perfect. Now that we
[03:06] got our agent running, we've connected it to the correct web hook URL. Let's create a AI agent with Zappier here that's going to be able to do whatever we want. So, in order to create our agent, we're going to come up here to new agents. We're going to do custom agent. Skip this step. So once you've created your AI agent, we're going to name it. So we say like AI agent best. The trigger we'll do here is going to be on a trigger vap. This is how we're going to call it with the web hook. And then the instructions are actually pretty simple here. So this will make more sense once we set it up. But the
[03:36] first line here we're going to say is you'll receive an agent input message. Follow its command. The second line we'll put is here are the actions you can execute. And here's the best part. Whatever action you want it to execute, you add here. The first action we'll add is going to be that Gmail one. So, we say insert tools, add tools, Gmail, and then go ahead and choose what kind of action you want to do. For me, I'm going to do create draft. Now, here we can adjust stuff by adding fix text if we choose to do so. But for the most part, if you're just going to put it in the AI agent locally anyways, we'll let AI handle this. So, I'm hit save. Now, we
[04:08] can also add any other action here. Anything that Zapier integrates with, as you can see here from Zapier apps, we can add this as a functionality of our local AI agent here. Whether you want to do calendarly, clavio, Google calendar, notion, dendesk, anything. And then simply all we do is add these actions line by line. So we can go to Google calendar here. We can do create detailed event. So now our AI agent here has the functionality here to create an event. What's really cool here also with Zapier includes as like in the box is the
[04:38] ability to visit websites. You can even do Google search. So I do visit website, Google search here. All these different functionalities. So go in and craft your agent to how you like it and what task you want it to do when working in this way. And when you're done, it'll be automatically enabled because it's triggered via Zap. So then coming back over to our Zapia automation, we're going to select action and we're going to choose agents here is we're going to do the action event of run agent. Continue. Next, go ahead and choose the agent we just created. So for us, it's AI agent best. And then the agent input message will come from that web hook. So
[05:09] let's grab some test data real quick. As you see in our code right here, we've selected the correct web hook that we got from that Zap year automation. And then just as a test, we'll go and copy this again, paste it here, and then hit enter. Get a confirmation up here. Pretty nice. I'm going to hit test trigger here. And we should see it right here. There we go. Request a. And you'll see it will come in as a command line. Same exact command that we can then pass to our agent. So coming to our agent here, we're going to hit this little plus button. Input command. Hit continue. And I'm not even going to test the step. I'm actually going to publish it. And let's do one live together. So I'm going to go and publish this Zap
[05:40] year and we should be good to go. So once this zap is published as you see up here to the top left, we have our AI agent on as you can see here as well and then we've done npm start. We have now an agent that's locally on our computer which is pretty cool. Now the best part is this. These agents are pretty intuitive. It's real limitation is whatever we set as its action limits here. So I'm going to pair two together. I'm going to create a draft in Gmail but also leverage Google search. And this is going to be able to do that. My prompt's going to be this. Create a draft email about going to dinner in a great place
[06:10] in SF. Use Google search to find a top restaurant and then provide that link in the email. Send it to contact at webbcafai.com and then our bot is set up correctly. Enter. Let's see if it worked. So, here we go. Dinner at a great place in San Francisco. I was thinking it would be fun to go out to dinner in a great place in San Francisco. I found a list of some of the top restaurants in the city that I'd like you to check out. Let's see if this link is real because sometimes AI goes a little crazy. And it's real. We get the top 38 restaurants to try in San Francisco with a nice little map right here. And I'm feeling like some pizza. So, shout out to Golden Boy Pizza. I
[06:40] want to get some pizza. With all that done, now you can see how powerful this can really be in our ability to pair different actions together and have an entire command history. So, maybe you run the same line every single morning. Now, you can start leveraging it. We've learned how to connect Zapier automations with Zapier agents. And on top of that, now we have a local AI agent on our computer that we can run every single morning and do a bunch of cool actions with. So, if you felt like you learned something in today's video, make sure to leave a like. It's completely free. Those are two random videos. That is my face. That is also my face. I'll see you in the next