# Multi-agent research

_How a lead agent with a team of subagents out-researches one bigger model, and how to set it up in Claude Code, explained in short animations._

> An animated guide to Anthropic's multi-agent research system: one lead agent plans and a team of subagents searches in parallel. It covers the plan in memory, the brief every subagent needs, effort scaling, files instead of long hand-offs, the citation pass, the token cost, when not to use it and how to build it in Claude Code.

- URL: https://www.insidethebox.dev/guides/multi-agent-research
- Published: 2026-11-27

## The result

A lead agent (Claude Opus 4) with subagents (Claude Sonnet 4) outperformed a single Claude Opus 4 agent by 90.2% on Anthropic's internal research eval. On BrowseComp, three factors explained 95% of the variance in performance; token usage alone explained 80%, and the others were the number of tool calls and the model choice.

## How it works

- **Plan in memory:** the lead saves its plan to external memory before the first search, because the context is truncated past 200,000 tokens.
- **A brief per subagent:** objective, output format, tools & sources, boundaries. With only "research the semiconductor shortage", one subagent researched the 2021 automotive chip crisis while two duplicated work on 2025 supply chains.
- **Scale the effort:** simple fact-finding: 1 agent, 3–10 tool calls; direct comparison: 2–4 subagents, 10–15 calls each; complex research: 10+ subagents, clearly divided responsibilities.
- **In parallel:** the lead starts 3–5 subagents at once and each runs 3+ tool calls at once, cutting research time by up to 90% on complex queries.
- **Files, not hand-offs:** subagents save their work to files and pass back lightweight references, avoiding a game of telephone.
- **Citations:** a separate citation agent links key claims to the sources that support them, without changing the report text.

## Cost and fit

Token use relative to a chat: Chat 1×, Single agent ~4×, Multi-agent system ~15×. Good fit: valuable tasks that parallelise well; more information than one context window holds; many complex tools to work with. Poor fit: tasks where every agent needs the same context; many dependencies between agents; most coding tasks today.

## Testing

Start with about 20 real queries. One LLM judge scores 0.0–1.0 with a pass or fail on: factual accuracy, citation accuracy, completeness, source quality, tool efficiency.

## Set it up in Claude Code

Save this as `.claude/agents/web-researcher.md`:

```markdown
---
name: web-researcher
description: Researches one sub-question on the web and saves its findings to a file. Use for research tasks.
tools: WebSearch, WebFetch, Read, Write
model: sonnet
---

You research one sub-question for a lead agent.
Your brief gives an objective, an output format, the tools and sources to use, and what not to cover. Stay inside it.
Start with short, broad searches, then narrow. Prefer primary sources over SEO content farms.
Stop when new searches stop adding facts. Save your findings, with the URL of every source, to the file named in the brief.
Reply with only the file path and one line on what you found.
```

Then, in the main session (the lead):

> Research: Compare three CRMs for a 20-person agency. First write your plan to research/plan.md. Then run 4 web-researcher subagents in parallel, one per topic, each with a brief: objective, output format, tools and sources, and what not to cover. Each saves its findings in research/findings/ and returns only the path. Write the report to research/report.md, then check that every claim in it links to a source in the findings.

## The animations

The page explains each step in a short animation. What each one shows:

- **Lead and team:** Illustration of Anthropic's multi-agent research pattern, on an example question: "Compare three CRMs for a 20-person agency". A lead agent (Claude Opus 4) writes its plan to research/plan.md and sends out 4 subagents (Claude Sonnet 4), one per topic: Pricing, Integrations, Data & GDPR, Support & reviews. The 4 search at the same time, each saves its findings to a file (01-pricing.md, 02-integrations.md, 03-gdpr.md, 04-support.md) and passes back only the path. The lead combines them into research/report.md, a citation step links the claims to their sources, and the report is done.
- **Why a team beats one agent:** Illustration of Anthropic's example task: "Identify all the board members of the companies in the Information Technology S&P 500". A single agent (Claude Opus 4) searches the companies one after another and stops after 5 of 12: incomplete. A team, a lead agent (Claude Opus 4) with 4 subagents (Claude Sonnet 4), splits the companies 3 per subagent; they search in parallel and cover all 12: complete. The company count and pace are illustrative. Result as published by Anthropic: +90.2%, multi-agent vs single agent on Anthropic's internal research eval.
- **The plan goes to memory first:** Illustration of the lead agent (Claude Opus 4) and its memory. It writes its research plan and saves it to memory, outside its context window, as research/plan.md, before the first search. The context window, up to 200,000 tokens, fills with research. At the limit the oldest part is truncated, and the plan that was in the context goes with it. The lead reads the plan back from memory into the context and the research continues: the context holds the plan again, and memory still has it. Block sizes are illustrative.
- **Every subagent gets a brief:** Illustration of Anthropic's example. A one-line brief, "Research the semiconductor shortage", goes from the lead agent (Claude Opus 4) to 3 subagents (Claude Sonnet 4). One researches the 2021 automotive chip crisis, and two both research 2025 supply chains, duplicating each other's work. A full brief has four parts, shown with an example. Objective: Current state of the 2025 chip supply chain. Output format: Dense report: situation, fixes, outlook, dates. Tools & sources: web_search, web_fetch · chipmaker filings first. Boundaries: Not the 2021 automotive chip crisis. The boundaries line keeps the 2021 crisis out. With a full brief each, the subagents take separate tasks that don't overlap.
- **Scale the effort to the question:** Illustration of the effort-scaling rules in the lead agent's prompt (Claude Opus 4). Early versions spawned 50 subagents for a simple query; that is struck out. Then the rules, step by step: Simple fact-finding: 1 agent, 3–10 tool calls. Direct comparison: 2–4 subagents, 10–15 calls each, drawn as 4 subagents. Complex research: 10+ subagents, clearly divided responsibilities, drawn as 10 subagents. The illustration ends on complex research, with ten subagents under the lead.
- **Run them in parallel:** Illustrative timeline of the same research on two schedules. One at a time: the lead starts 4 subagents one after another, and each makes 3 tool calls in sequence, so the lane is long. In parallel: the lead starts the 4 subagents at once (Anthropic's system starts 3–5) and each makes its 3 tool calls at once (3+ in Anthropic's system); the lane ends after a tenth of the time. Anthropic reports up to 90% less research time on complex queries. Block lengths are illustrative; the short lane is drawn at 10% of the long one.
- **Files, not long hand-offs:** Illustration of files instead of long hand-offs, with an example question: Compare three CRMs for a 20-person agency. The problem: a subagent's findings are copied to the lead agent and then into the report, and like a game of telephone every copy loses lines and gets blurrier, while each copy adds to the tokens used. The fix: 4 subagents (Claude Sonnet 4), one each for Pricing, Integrations, Data & GDPR, Support & reviews, save their findings as files in research/findings/ (01-pricing.md, 02-integrations.md, 03-gdpr.md, 04-support.md) and pass only the path back to the lead agent (Claude Opus 4). The lead opens 02-integrations.md and reads the full findings, intact, with nothing retyped. The findings are drawn as grey lines.
- **A citation pass at the end:** Illustration of a citation pass, with an example question: Compare three CRMs for a 20-person agency. A citation agent reads the finished report, research/report.md, and the findings files in research/findings/ (01-pricing.md, 02-integrations.md, 03-gdpr.md, 04-support.md). It adds numbered citations 1 to 4 at the ends of 4 key claims, each linked to the file that supports it. One common-knowledge sentence is deliberately left without a citation. Nothing is removed: the report text is unchanged, the agent only adds citations. The report's sentences are drawn as grey lines.
- **What it costs:** Bar chart of tokens used relative to a chat, from Anthropic's measurements: chat 1×, single agent about 4×, multi-agent system about 15×. Beside it, what explained performance on BrowseComp: token usage alone 80% of the variance, and with number of tool calls and model choice the three factors 95% together. Worth it when the answer is valuable: valuable tasks that parallelise well.
- **Set it up in Claude Code:** Illustration of the pattern in Claude Code. A subagent file, .claude/agents/web-researcher.md, sets the web-researcher subagent's description, its tools (WebSearch, WebFetch, Read, Write) and model: sonnet. In the main Claude Code session, which is the lead and runs on your session's model, the prompt starts: Research: Compare three CRMs for a 20-person agency. The lead writes its plan to research/plan.md, then starts 4 web-researcher subagents at the same time, on sonnet, one per topic: Pricing, Integrations, Data & GDPR, Support & reviews. Each one finishes in its own time and returns only the path of its findings in research/findings/. The lead writes the report to research/report.md and checks its sources.

## FAQ

### What is a multi-agent research system?

A lead agent that plans the research, splits it into separate questions and hands each to a subagent with its own context window. The subagents search at the same time and report back. The lead combines their findings, decides whether more research is needed and writes the answer. A citation pass then links each claim to its source.

### Is a team of agents really 90% better than one?

In Anthropic's test, a system with Claude Opus 4 as the lead and Claude Sonnet 4 subagents outperformed a single Claude Opus 4 agent by 90.2%. That was on Anthropic's internal research eval, not a public benchmark, and with the models of June 2025. The gain is largest on broad questions that split into independent parts.

### Why does a team do better than one bigger model?

Mostly because it can spend more tokens on the problem. On BrowseComp, three factors explained 95% of the difference in performance, and token usage alone explained 80%. Each subagent brings its own context window, so the team can read far more than one agent can fit.

### How much more does it cost?

Anthropic measured that agents use about 4× the tokens of a chat, and multi-agent systems about 15×. It pays off only when the answer is worth that much: deep research, due diligence, market or literature reviews. It doesn't pay off for quick questions.

### What should a subagent's brief contain?

Four things: an objective, the format of the output, the tools and sources to use, and clear boundaries, meaning what the subagent should not cover. Without boundaries, Anthropic saw two subagents research exactly the same thing while another went off in a different direction.

### Why save the plan to memory?

Long research can outgrow the context window. Past 200,000 tokens, Anthropic's system truncates the context, so the lead writes its plan to an external memory before it starts and can read it back after the context has been cut.

### When is a multi-agent system the wrong choice?

When every agent needs the same context, or the work has many dependencies between steps. Anthropic names most coding tasks as an example: they have fewer truly parallel parts than research, and agents are not yet good at coordinating with each other in real time.

### Can I build this in Claude Code?

Yes. Define a research subagent as a Markdown file in .claude/agents/ and set its model to sonnet. The main session acts as the lead: ask it to write its plan to a file, run several subagents in parallel with a brief each, and have them save findings to files and return only the path. Subagents run in their own context windows. Anthropic's parallel setup cut research time by up to 90% on complex questions.

## Sources

- [How we built our multi-agent research system](https://www.anthropic.com/engineering/multi-agent-research-system) (Anthropic Engineering)
- [Open-source prompts of the research system (lead, subagent, citations)](https://github.com/anthropics/claude-cookbooks/tree/main/patterns/agents/prompts) (Claude Cookbooks)
- [Create custom subagents](https://code.claude.com/docs/en/sub-agents) (Claude Code docs)
- [Orchestrator-workers pattern](https://platform.claude.com/cookbook/patterns-agents-orchestrator-workers) (Claude Cookbook)
