L24 — Anatomy of a Deep Research Agent
The next six lessons each build a piece of one system. They are far easier to follow if the shape of the whole thing is already in your head, which is the only job this lesson has.
A research agent is not a better answer. It is a process that can tell it is not finished. Everything structural in this module exists to make that judgement possible, and to make it visible when it goes wrong.
The five stages
| Stage | What it does | Lesson |
|---|---|---|
| Start | takes the question, declares the state keys everything writes to | L25 |
| Planner | turns one vague question into separable, specific tasks | L26 |
| Iteration | runs the next stage once per task, in parallel | L27 |
| Subagent | searches, reads, judges, reports in a fixed shape | L28 |
| Synthesis and the loop | merges, asks whether it is answered, goes round again | L29 |
Build them in that order and each is testable on its own, which is the only way a system this size is debuggable at all.
Why not one long prompt
This is the question worth answering properly, because "use several steps" sounds like ceremony.
| The design | What you get |
|---|---|
| One long prompt | one model call, one shot at everything |
| A planner stage | a task list you can read before anything runs |
| Separate subagents | each works on one task with its own context |
| A synthesis stage | merging is its own job, with its own prompt |
| A critique and loop | an explicit judgement that it is done |
The gain is not cleverness. It is that five small steps are five places to look, and one large prompt is none.
Three things only work because the stages are separate:
A model per stage. A strong model plans and synthesises; a cheaper one runs the subagents, where there are many calls and the work is mostly fetching. One prompt means one model for all of it.
Running in parallel. Six tasks can run at once because they are genuinely separate executions. A single prompt is sequential by construction, however it is worded.
Somewhere to look. A bad answer is traceable to a stage — the plan was wrong, or a subagent found nothing, or synthesis dropped a finding. One prompt gives you one undifferentiated failure.
Where the money goes
Indicative shares for a six-task, two-round run:
- Subagents — about 68%. Six tasks times several tool calls each.
- Synthesis — about 19%. Every finding in one long prompt.
- Critique and loop — about 9%. Once per round.
- Planner — about 4%. One call.
The subagents dominate, which is why Lesson 27's width and Lesson 28's tool budget are where savings actually live. Nobody ever optimised a research agent by shortening the planner's prompt.
Which model where:
| Stage | Model | Because |
|---|---|---|
| Planner | strong | a bad plan wastes every stage after it |
| Subagent | cheap and fast | many calls, mostly fetching and extracting |
| Synthesis | strong | judgement over conflicting findings |
| Critique | strong, ideally a different one | a model rarely catches its own error |
This is the per-node model choice from Lesson 04 finally paying off. The subagents are ninety per cent of the calls and the least demanding work in the system.
Why this cannot be a chatflow
A chatflow is a dependency graph: the same shape every run, no branching, no looping, memory as the only state, cost known in advance. Right for most assistants.
An agentflow is a control-flow graph: the path is decided as it runs, with branches, loops, conditions and explicit declared state. Cost varies per question.
The tell is simple. If you find yourself saying "repeat this for each…", "if it is not good enough, go again", or "carry this value to the end", you need an agentflow. This module says all three.
Lesson 03 noted that rebuilding a chatflow as an agentflow is a redraw rather than a conversion. This is the module where that decision is finally forced.
How many rounds are worth paying for
Quality rises steeply from zero rounds to one, substantially from one to two, and then flattens. Cost does not flatten — it keeps climbing linearly with every round.
So a round limit is a design decision, not a safety net. Two or three is the usual right answer, and Lesson 29 builds the stop rules that enforce it.
What this architecture is bad at
| The task | Good fit? | Why |
|---|---|---|
| Survey a topic across many sources | yes | exactly what it is for |
| Compare five options on eight criteria | yes | the plan writes itself |
| Answer from one document you already have | no | Module 4 does this for a fiftieth of the cost |
| Anything a user is waiting on | no | minutes, not seconds |
| Produce a number that must be exact | no | synthesis is judgement, not arithmetic |
The honest summary: this is a slow, expensive instrument for questions where breadth matters and a few minutes is acceptable. It is not a general upgrade to a retrieval chatbot, and using it as one is the most common way to spend a great deal of money on worse answers.
Next: Lesson 25 builds the first node — the Start node, and the flow state every later stage writes into. Get this wrong and nothing downstream can be fixed.
Building AI Agents on MacroGPT: frequently asked questions
Do I need to write code?
The course is build-along on a visual canvas and is rated beginner level.
How much does Building AI Agents on MacroGPT cost?
Building AI Agents on MacroGPT costs $699.
How long does Building AI Agents on MacroGPT take?
It is designed to be completed in about 12 weeks, at your own pace.
What level is Building AI Agents on MacroGPT?
The course is rated beginner level.
Is this financial advice?
No. The course is educational only and is not personal financial advice.