Leveraging Multiple Agents
00:00 I want to start here by also showing you another cool feature that comes with Cursor. So I can go in here and select that I want to use multiple agents. For that, I need to switch this on so I can run multiple agents on the same tasks.
00:15 So now I want to use Sonnet and GPT Codex, for example. And we could also throw in the Composer model. That is a model that Cursor built itself. But let’s run it with two as an example.
00:26 And for this you need to be inside of a Git repository. So this is not going to work, this option to select multiple models, is not going to be selectable if you don’t have a Git repository initialized. But we did that already, so we can also run the same task on two different models at the same time.
00:43 And often they give you different results. So I’m going to show you also the results here.
00:53 All right, so now there are two agents basically running. One is using Sonnet 4.5, one is using GPT Codex.
01:02 And then they’re both building a plan for me for this random items API using FastAPI.
01:12 And it looks like both of them are still running - No. Okay, so here GPT-4.5 Codex seems to be done. FastAPI random items plan. So now the next step is always to go into the plans that these models create and review them and make sure that this is actually what you want it to do.
01:34 There you go. So we have– GPT Codex already built the plan. This is the plan.plan file that you can see here on the right.
01:41 Sonnet completed a task, but it didn’t actually make the plan yet, but it’s asking me some questions.
01:47 I generally like this because this means that I did not provide enough information for the model to make the best choices. So it’s asking me some missing questions.
01:56 It understood that I want the FastAPI application with CRUD functionality and the randomized items endpoint, and then it’s asking me architectural decisions.
02:05 So “storage mechanism” how should the items be persisted?” All right, so in-memory storage, SQLite database or another database. What else do we have? The second question is Item structure: What information should each item contain?
02:17 Just a string value with auto-generated ID, etc, etc. So it’s also checking the workspace, there’s nothing in there. So I need to provide another piece of information before it’s going to build the plan.
02:28 So in this case, I’m going to say I want a SQLite database. I can just submit that by saying 1b. And for 2 we are going to go for just the string with the auto-generated ID.
02:40 So I’m going to say 2a and then send that off.
02:45 And now it’s going to also build the plan. In the meantime, while it’s working here, I can review the plan that Codex built, which sits over here.
02:54
It tells me that it’s going to initialize a new uv project at this location, configure pyproject.toml with the dependencies that it needs, and then create the endpoint, quality and tooling, lock/install.
03:08
README. That’s nice. It’s also telling me optionally to create some testing for it. All right, so this one did not make a decision for how to store the items.
03:18
There is no database decision in here, which it may have taken by itself, but the other agent actually asked me what database they wanted used. So here is the plan that came out of that, using uv, following structure.
03:31
That looks like a good project structure for a FastAPI app, pyproject.toml, FastAPI, uvicorn standard. All right, implementation steps: init to run it, database layer.
03:46 So now I have this information in here, right?
03:50 I’m just scrolling over this to see whether I like the plan, but this generally looks good for me.
03:58
POST /items, ID, GET all items, DELETE, GET items randomized, GET all items in randomized order.
04:08 Okay, so this looks like a more complete plan to me. You can see that it has a couple of TODOs sitting in here. So I’m going to stick with the plan that Sonnet provided for me, but it could have been that GPT-5 in this example would have made a better plan or a different model, you know?
04:24 So this just gave me the chance to review two possible implementations and then decide for the one for me as the architect of this application. I need to decide what is the right way to proceed for the model.
04:35 And yeah, I’m going to say, all right, this Sonnet-built plan is what I want. So I can go ahead and then build this plan. Here again, you can select which model you want to use, and it defaults to this Composer model.
Become a Member to join the conversation.
