How To Use Cursor Agents For Beginners β
Let's learn how to use Cursor AIπ
2025-07-06
Transcript β
[00:00] Cursor AI has just released agents. No, no, not 007. They don't have a contract to kill. Today's video, let's learn as fast as possible how to use these agents by Cursor AI. As fast as possible, as fast as possible. Welcome back. On this video, I'm going to show you how to connect your GitHub account, and then from that, we're going to do a open PR to a real code repository we created together. See if these agents are any good, kind of go over the update, new features we can do. Now, for context, the code repository we're going to be going over today is actually one I did a full-blown series on. I showed you how to create a software from scratch and this is the repository right here. The
[00:31] software we created was tubestamp.com. Don't believe me? Look it up on Google. It works. It gives timestamps for YouTube videos. This software is completely open source. I'll put in the description down below. You can download it and start leveraging yourself. And if you're interested in seeing how to build out this software step by step, I have this entire series, this entire playlist. In total, it is around 3 hours and 44 minutes long. Let's go and connect our GitHub account. Connect GitHub. Choose your relevant GitHub account. and we're going to say authorize cursor. We are then going to be prompted here which repositories to give access to. So we can either give access to all or only specific ones. So
[01:03] that's up to your discretion. For now I'm going to give it access to two major repositories. I do my tube stamp prod and then we'll also do the AI YouTube timestamps which you can get access to. I'm going say install and authorize. What's happening here is that this will give cursor the ability to even make changes open up PRs. So whatever you put here is pretty fundamental. If you don't put all and you select the specific ones here, if you don't choose one, then you're not going to be able to do the actions that you see from here on out. So, for example, since I'm not choosing actual backend app, I'm not going to be able to do actions of cursor install and
[01:33] authorize. It will then confirm that this is the actual account. I'm going say link account. Perfect. What's interesting is that what cursor opted to do was separate its traditional IDE, integrated development environment, eg what we've been working with up to this point, and created a web app/ actual mobile app version to use these agents on. So we're maxed out right now. We got Cloud Force Sonnet. We can choose between the different types of AI models and we can choose our specific repository. So for now we'll go to AI YouTube timestamps. Right now we are working in main. Now one thing it might
[02:03] prompt you to do is you actually have to change your privacy settings in order for the agents to work. So I'm go to edit privacy settings here and we'll go with share data. As the alternative legacy one, we weren't able to do all functionality of these agents. And you already know how these tech companies are. They love your data. It's like going to the candy store for them and just buying all the candy. So, if our privacy settings updated here, let's see if this works. I'm going to go and say I want to create a new component for tubs.com. Components, if you don't know what that means, think of it like every little section here. So, this little navbars and component, this section right here that handles the timestamps
[02:34] of the component. It's just our ways of refactoring code, make sure to watch the longer series if you want more context. Have it be a fill out form for help using put in the email message and send it to a mail to of example.gmail.com. Mail two in this context are those little buttons on a website. When you click it, it automatically opens your mailing app on your computer. This is what a mail two function does in code. I'm gonna hit enter here. Now, what's interesting about these kind of agents is that we can run multiple at the same time. So, they can run in parallel. So, in theory, I could do another task here and I can start running this as well and just keep shooting off, keep firing off.
[03:04] This seems to be a new workflow that's emerging within AI encoding. As with most AI models now, we can also give image context, which is amazing for front-end development. As you see right here, when working with the agent, make sure to choose the correct repository and make sure you're in the correct branch. Now, typically in software development, we would create a separate branch when doing PRs like this. But just because I want to show you fundamentally how to use this, for now, we'll work in Maine. Also did a really, really cool video that's only 10 minutes long on GitHub, which I'll leave in the description down below that shows you why we even use GitHub. Because, as you'll notice, especially with AI and
[03:36] all the news in AI, everyone seems to integrate with GitHub. What is GitHub? Why do we use it? Check out that 10-minute video down below. What we can also do is while an agent is working, we can actually click into it and see what it's thinking about. So we can scroll all the way down here. I mean, most of this looks a little bit like gibberish. So we'll just let the AI model keep yapping here. It also seems like we can open this in cursor, which I'm curious about. So we'll do that. Interesting. So we can actually have these background agents and the underlying task it's doing in the IDE as well. So you can alternatively use this interface comparative to the web app interface. So
[04:07] once an agent is done, we can also check the statuses by clicking through here. You'll notice it finished. It will show up right here. So, we got analyze code architecture. Let's click it. And what we get here is very similar to what we'd get in maybe a traditional chat in the IDE. But let's see what it does. So, far right. This is a full stack application called tube stamp that creates timestamps for YouTube videos. Here is the architecture. Front end react correct. Firebase cloud function. That is correct. Hosting is Firebase authentication. Firebase anonymous. Correct. And then the security we do use is recapture v3. That's pretty nice. Look at this. It actually tries to paint
[04:38] it out with the actual underlying structure of the application components and setup. And overall, this is correct navigation. The time stamp is going to be the most important here. Yeah, main time stamp generation. It identified the generate timestamps and so on. So, the first thing you learned about these agents is that we can ask specific questions. But I think the bigger thing about the agent specifically in this context comparative to what we saw over here, this would be very much ask one question, wait. This is set up for you to ask multiple questions at once and have multiple agents running at once. I'm noticing I'm saying agents a lot.
[05:09] Agents, agents, and agents. I'm going to keep saying it. Now, the other one that's probably the more powerful feature that a lot of people have been going crazy over is its ability to create PRs. So, create a help component here. So, before we open the actual PR on GitHub, and we'll check it out there, it will give context of what it actually did here. It created a new help form.js and a help form.css. It did integrate into the landing page.js, which is correct. As you can see for current code structuring, all relevant components are integrated into this main landing page. And supposedly it works, but I can go ahead and gut check this code. So, first
[05:39] off, I'm going to create this PR, which is nice. One click, one go. And then coming over here to our GitHub, we're going to reload. We got our pull request right here. Create help form component for tube stamp. What's always nice about AI is that I guess it wasn't too much information. It only gave us one sentence. I've seen other outputs that are very lengthy. Add a new help form component to tube stamp page to allow users to send help requests via email. Now, what I can do with PRs is I can go to files changed here and see if this code's good. So, the first thing I'm looking for is good. It's in the correct folder. And then it should be simply one line here. There we go. One line. One
[06:10] line. That's correct. Let's see if it did it correctly for the actual UI. The help form is just going to accept the email message. That's what I said. That's what I wanted. Coming down here to the return, we should be getting an app mail to. So for me to figure out what the submit button actually does, we can go to the class action of the submit button. So handle submit. All right. So we have an air check here. So if the individual does not put in their email or a message, then we'll say, hey, you got to put in something. So it actually sends correctly. Create the mail to
[06:40] link. Perfect. So what it'll do is that it's going to put this fixed text header for when you open up the mail app. It'll say tube stamp help request. And then the body it will do, hello, I need help with tubestamp.com. And this will be basically probably if there is no message. Oh wait, no actually you got it right here. This is perfect. Hello, I need help with tube stamp. This is going to be the fixed text in the message. And then this would have to be the actual message itself it received from the front end. And it is using the mail to logic here. If you don't know what the mail to logic is, just open up a cursor AI chat. Go ahead and just create a
[07:10] button real quick. The user clicks the button. This is going to be a native function that will then open up their mailing app whether you're on Windows, Linux or Apple, and it will send it to this specific email like a draft. This looks good. And essentially, if I wanted to proceed from here, all I would need to do is merge this. And in GitHub, it's actually very simple. I would simply click merge that pull request as there is no current conflicts. A conflict occurs when the main branch and the new branch you're trying to merge. There's pretty fundamental code that you are changing that existed in the main
[07:40] branch. And if you like the code, it's pretty simple on GitHub. All you need to do is hit merge pull request. And as you can see, there is no conflicts. For now though, I'm going to delete it. I'm going close this pull request. So if you don't like the PR made by cursor agents, you can close it. It does nothing to your main branch and you're good to keep going. So in reality, we're cursor AI agents really standing out here. This is very familiar to Codex of what Open AAI did as well. Obviously, if you're already within the cursor AI ecosystem, I mean, this is just going to be a level up for you. I think the coolest thing that I saw from this was your ability to do this on your phone as well, mobile,
[08:10] which is always nice. But without further ado, as you already know, I'll see you in the next