MacroFinance AI Team

Anatomy of a Deep
Research Agent

The whole system in one diagram before any of it is built — why five separate stages beat one long prompt, what each stage costs, and why this has to be an agentflow.
Module 6 · Lesson 24  ·  50 minutes  ·  Prepared by the MacroFinance AI Team
Lesson 24 · Anatomy of a Deep Research Agent01  /  13
Orientation

What this lesson answers

  • What a deep research system is, in one diagram
  • The five stages, and which lesson builds each
  • Why separating them beats one long prompt — the real reason
  • Where the money goes, which is not where people expect
  • What this architecture is genuinely bad at

Read this one before building

The next six lessons each build a piece. 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.

Lesson 24 · Anatomy of a Deep Research Agent02  /  13
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.
Lesson 24 · Anatomy of a Deep Research Agent03  /  13
The system

Seven nodes, one loop

taskseachfindingsno — loopyesStartquestion + statePlannerwrites a task listIterationonce per taskSubagenttools, budgetSynthesismerges findingsAnswered?the loop decisionAnswerSeven nodes. The rest of this module builds them one at a time, and Lesson 29 closes the loop that makes it research rather than along answer.
Lesson 24 · Anatomy of a Deep Research Agent04  /  13
The system

Five stages, six lessons

THE WHOLE MODULE1 · StartTakes the question and declares the state keys everything else will write to.L252 · PlannerTurns one vague question into a list of specific, separable tasks.L263 · IterationRuns the next stage once per task, in parallel where it can.L274 · SubagentSearches, reads, judges, and reports back in a fixed shape.L285 · Synthesis and the loopMerges findings, asks whether the question is answered, sends it round again.L29Each stage is a lesson. Build them in order and each one is testable on its own, which is the only way a system this size isdebuggable at all.
Lesson 24 · Anatomy of a Deep Research Agent05  /  13
Why not one prompt

What the separation buys

THE DESIGNWHAT YOU GETWHY IT BEATS THE ALTERNATIVEOne long promptone model call, one shot at everythingno way to see where it went wrongA planner stagea task list you can read before anything runswrong plan caught in secondsSeparate subagentseach works on one task with its own contextno cross-contamination of findingsA synthesis stagemerging is its own job, with its own promptthe model is not also researchingA critique and loopan explicit judgement that it is donethe stop decision is visibleThe gain is not cleverness. It is that five small steps are five places to look, and one large prompt is none.
Lesson 24 · Anatomy of a Deep Research Agent06  /  13
Why not one prompt

Three things that only work because the stages are separate

model

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.

wide

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.

look

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.

Lesson 24 · Anatomy of a Deep Research Agent07  /  13
Cost

Where the money actually goes

Plannerone call, strong model4%Subagentsn tasks × several tool calls each68%Synthesisall findings in one prompt19%Critique and looponce per round9%Indicative shares for a six-task, two-round run. The subagents dominate, which is why Lesson 27's width and Lesson 28's toolbudget are where the money is.
Lesson 24 · Anatomy of a Deep Research Agent08  /  13
Cost

Which model where, and why

StageModelBecause
Plannerstronga bad plan wastes every stage after it
Subagentcheap and fastmany calls, mostly fetching and extracting
Synthesisstrongjudgement over conflicting findings
Critiquestrong, ideally a different onea model rarely catches its own error
All four the sameexpensive and worseLesson 04's table, applied

This is the per-node model choice from Lesson 04 paying off properly. The subagents are ninety per cent of the calls and the least demanding work in the system.

Lesson 24 · Anatomy of a Deep Research Agent09  /  13
The surface

Why this cannot be a chatflow

A chatflowA dependency graph. Same shape every run.No branching, no loopsCost known in advanceMemory is the only stateRight for most assistantsAn agentflowA control-flow graph. The path is decidedas it runs.Branches, loops, conditionsExplicit declared stateCost varies per questionRequired for everything hereThe tellYou want an if-statement, or the same stepn times.“Repeat for each…”“If not good enough, again”“Carry this to the end”All three: agentflowLesson 03 said rebuilding a chatflow as an agentflow is a redraw, not a conversion. This is the module where that decision isfinally forced.
Lesson 24 · Anatomy of a Deep Research Agent10  /  13
Limits

How many rounds are worth paying for

0255075100012345research roundsrelativeanswer qualitycumulative cost
Lesson 24 · Anatomy of a Deep Research Agent11  /  13
Limits

What this architecture is bad at

The taskGood fit?Why
Survey a topic across many sourcesyesexactly what it is for
Compare five options on eight criteriayesthe plan writes itself
Answer from one document you already havenoModule 4 does this for a fiftieth of the cost
Anything a user is waiting onnominutes, not seconds
Produce a number that must be exactnosynthesis is judgement, not arithmetic

The honest summary: this is a slow, expensive instrument for questions where breadth matters and a few minutes is acceptable. Reach for it deliberately.

Lesson 24 · Anatomy of a Deep Research Agent12  /  13
Summary

What to take away

  • Start, planner, iteration, subagent, synthesis, critique, loop — one lesson each
  • Separation buys a model per stage, real parallelism, and somewhere to look when it fails
  • Subagents are roughly two-thirds of the cost, so width and tool budgets are where savings live
  • Branches, loops and declared state make this an agentflow, not a chatflow
  • Quality flattens after about two rounds while cost keeps climbing

Next

Lesson 25 builds the first node — the Start node, and the flow state that every later stage writes into. Get this wrong and nothing downstream can be fixed.

Lesson 24 · Anatomy of a Deep Research Agent13  /  13

Lesson 24 · Anatomy of a Deep Research Agent

  1. Title
  2. What this lesson answers
  3. A research agent is not a better answer. It is a process that can tell it …
  4. Seven nodes, one loop
  5. Five stages, six lessons
  6. What the separation buys
  7. Three things that only work because the stages are separate
  8. Where the money actually goes
  9. Which model where, and why
  10. Why this cannot be a chatflow
  11. How many rounds are worth paying for
  12. What this architecture is bad at
  13. What to take away