Scenario: Multi-Agent Research System

The full picture

One coordinator agent runs the research. It delegates to four specialized subagents. The subagents do not talk to each other. They do not share memory either. The coordinator carries every piece of data in prompts. So most exam questions are really about what the coordinator passes on. The rest are about parallel work, structured output, and saved state.

flowchart TD
    Q[Research question] --> C[Coordinator<br/>needs the Task tool]
    C -->|prompt carries the data| SA[Subagents<br/>4-5 tools each]
    SA -->|structured output<br/>sources and dates| C
    C --> G{Gaps left?}
    G -- Yes, re-delegate --> C
    G -- No --> RP[Report with citations]
    C -. saves manifest .-> ST[(Structured state files)]
Remember
  • Subagents do not share memory. The coordinator passes data in prompts.
  • Metadata, like sources and dates, travels with the content, structured.
  • Independent work runs in parallel.

The cast: coordinator and four subagents

The overview showed one subagent box. Here are the four real ones.

flowchart LR
    C[Coordinator] --> W[Web Search]
    C --> D[Doc Analysis]
    C --> S[Synthesis]
    C --> R[Report Generator]
    W -- findings --> C
    D -- findings --> C
    S -- draft --> C
AgentJob
CoordinatorDelegates the work and collects the results
Web SearchFinds sources on the web
Doc AnalysisReads and analyzes documents
SynthesisMerges findings into a draft
Report GeneratorWrites the final report

How information moves

Look at the arrows again. Every arrow goes through the coordinator.

  • Subagents do not share memory.
  • Information flows through the coordinator.
  • It takes output A and puts it into B's prompt.
  • Synthesis says "no findings provided" sometimes.
  • Cause: the coordinator left the earlier outputs out of the prompt.

The Task tool

The coordinator can only delegate if it holds the right tool.

  • The Task tool spawns subagents.
  • Newer docs call it Agent.
  • A coordinator may reason about delegating and never do it.
  • Cause: its allowedTools is missing the Task tool.

Keep the sources attached

The coordinator now moves data. The next question is what that data must contain.

  • Every agent returns structured data.
  • That means a summary plus source metadata.
  • Metadata includes the URL, the doc name, and the page.
  • Summarizing without metadata loses the sources.
  • Then the report has no citations.
  • Subagents also include publication dates.
  • Dates stop stale information in reports.
  • Never re-search the web to find lost sources.

What do you pass to the next agent? You have 120K of raw text and a 3K draft.

  • Pass the 3K draft.
  • Add a structured source index.
  • The index maps each claim to its source.
  • Do not pass the 120K raw text.

Parallel work

Data shape is settled. Now speed. Independent tasks should not wait for each other.

  • Two independent tasks often run one after the other.
  • Fix: emit both Task calls in one response.
  • They then run in parallel.
  • You have 50 documents to analyze.
  • Use parallel subagents.
  • Give each one a subset.
  • Aggregate the results before synthesis.

Give subagents the right scope

Parallel agents only help if each one stays focused.

  • 18 tools per subagent is too many choices.
  • The subagent then calls the wrong tools.
  • Give each subagent only its 4-5 relevant tools.
  • Micromanaged subagents perform poorly.
  • Give goals and quality criteria.
  • Do not give step-by-step instructions.

Dynamic delegation, not a fixed pipeline

Scope is per agent. This next choice is per query.

  • The coordinator decides dynamically which subagents to invoke.
  • It does not run a fixed pipeline every time.
  • Simple asks, like plain summarization, stay with the coordinator itself.
  • Spawn subagents only for complex work.
  • Synthesis can leave research gaps.
  • The coordinator checks the output for gaps.
  • It re-delegates targeted queries.
  • Then it runs synthesis again.
  • That is an iterative loop, not one pass.

Handling conflicting findings

The loop improves coverage. It does not settle disagreements.

  • Sources can conflict.
  • Never merge them into one confident claim.
  • Synthesis keeps two sections.
  • One for established findings.
  • One for contested findings.

Surviving a crash

Long runs break. The system should not start over.

  • Agents persist structured state to files.
  • The coordinator reloads the manifest on resume.
  • The pipeline then continues mid-run.

What gets tested

Here is the whole lesson as a lookup table. Every row is an exam pattern.

Problem in the questionCorrect approach
Reports lack citations, sources lost in summarizationEach agent outputs structured data: summary plus source metadata (URL, doc name, page)
What to pass to the next agent, 120K raw or a 3K draftThe draft plus a structured source index that maps claims to sources
Synthesis says "no findings provided"The coordinator forgot to put the earlier agents' outputs in the prompt
How does info flow between subagents?Through the coordinator. It takes output A and puts it into B's prompt
Pipeline crashes mid-run and must resumeAgents persist structured state to files. The coordinator reloads the manifest
Subagents call the wrong tools, 18 tools eachToo many choices. Give each subagent only its 4-5 relevant tools
A micromanaged subagent performs poorlyGive goals and quality criteria, not step-by-step instructions
Research gaps remain after synthesisThe coordinator finds the gaps, re-delegates targeted queries, and runs synthesis again
Coordinator reasons about delegating but never doesIts allowedTools is missing the Task tool, which spawns subagents. Newer docs name it Agent
Two independent tasks run one after the otherEmit both Task calls in one response. They run in parallel
50 documents to analyzeParallel subagents, each with a subset. Aggregate before synthesis
Conflicting findings become one confident claimSynthesis keeps sections: established vs contested findings
Stale info shows up in reportsSubagents include publication dates in the structured output
Which subagents run for this query?The coordinator decides dynamically per query. Not a fixed pipeline
Simple summarization spawns a heavy subagentThe coordinator handles simple asks itself. Subagents are for complex work

Traps

Wrong answers repeat too. Learn these four.

  • ❌ "Skip summarization, pass everything raw." It blows the context window.
  • ❌ "Re-search the web to find the sources again." It is wasteful. Keep the metadata instead.
  • ❌ "Embed citations inline in prose." It is fragile. A structured mapping wins.
  • ❌ A fixed pipeline that runs all four agents for every query.

Recap

  • The coordinator delegates to four subagents: web search, doc analysis, synthesis, report generator.
  • Subagents do not share memory.
  • All data moves through the coordinator, inside prompts.
  • "No findings provided" means the coordinator left prior outputs out of the prompt.
  • The Task tool spawns subagents. Newer docs call it Agent.
  • A coordinator that never delegates is missing the Task tool in allowedTools.
  • Every agent returns structured data: summary plus source metadata, with URL, doc name, and page.
  • Subagents include publication dates to stop stale info.
  • Pass the 3K draft plus a structured source index, not the 120K raw text.
  • The index maps each claim to its source.
  • Emit two Task calls in one response to run them in parallel.
  • For 50 documents, use parallel subagents with subsets, then aggregate before synthesis.
  • Give each subagent 4-5 relevant tools, not 18.
  • Give subagents goals and quality criteria, not step-by-step instructions.
  • The coordinator picks subagents dynamically per query.
  • The coordinator answers simple asks itself.
  • Gaps after synthesis trigger re-delegation and another synthesis pass.
  • Synthesis keeps established vs contested findings apart.
  • Agents persist structured state to files. The coordinator reloads the manifest to resume.

Next: Scenario: Claude Code for CI/CD