Notes
The idea
Picture one agent writing a market report. It searches, reads pages and takes notes, and every result lands in the same context window. By step thirty it rereads sixty four thousand tokens to decide one small step. A multi-agent system splits that work across several agent loops. Each one has its own context, its own prompt and its own tools, and they pass results along.
- every search result, every page and every plan lands
- in the same window
- by step 30 the model is reading 64k tokens to decide one small step
- multi-agent: several loops, each with its own context, prompt and tools
Why split
There are three real reasons to split. First, separate context windows. Each worker sees only its own subtask, so its context stays small and focused. Second, specialised prompts and tools. A worker with a short prompt and four relevant tools picks better than one agent juggling thirty. Third, parallel work. Independent subtasks run at the same time, so the user waits for the slowest one, not all of them in a row.
- 1 separate context windows each worker sees only its own subtask: less noise
- 2 specialised prompts + tools a short prompt, 4 tools, not one prompt for all 3 parallel work independent subtasks run at the same time
Why not
And three real costs. Cost multiplies, because every agent pays for its own system prompt, its own tool list and its own exploration. Failure points multiply, because each hop is another place to go wrong. Three agents in a chain, each right ninety percent of the time, succeed together only about seventy three percent of the time. And coordination is hard. Briefs get misread, workers repeat each other, and their results can contradict.
- 1 cost: every agent pays for its own prompt, tools and exploration
- 2 more failure points: 3 hops at 90% each = 73%
- 3 coordination overhead: briefs get misread, work overlaps, results conflict
- harder to debug and to test
Orchestrator-workers
The most common pattern is an orchestrator with workers. The orchestrator reads the goal and splits it into subtasks: market size, competitors and regulation. It writes a brief for each one, with the goal, the scope, the expected output format and a budget, and starts three workers at once. Each worker searches on its own and returns short findings with sources. The orchestrator merges them, spots gaps, maybe sends one more worker, and writes the report.
- orchestrator: reads the goal, writes 3 briefs, starts 3 workers at once
- each brief: goal, scope, output format, budget
- workers: search and read, return short findings
- orchestrator: merges, spots gaps, writes report
Worked example
Let us put numbers on it. Each agent starts with six thousand tokens of prompt and tools, and each step adds two thousand. One agent doing all thirty steps resends a growing context each time: about one point zero five million input tokens and ninety seconds. Three workers doing ten steps each use one hundred and fifty thousand tokens apiece. With the orchestrator, the total is under half a million, in about forty seconds, because no context grows large.
each step: +2k tokens, start 6k one agent, 30 steps: 30×6k + 2k×(0+…+29) = 180k + 870k ≈ 1.05M input ~30 steps in a row ≈ 90 s 3 workers, 10 steps each: 10×6k + 2k×(0+…+9) = 150k ×3 = 450k, + orchestrator ~30k ≈ 0.48M input 1 + 10 + 2 steps ≈ 40 s
The catch
Here is the catch. At the same depth, the team can be cheaper. Once work runs in parallel, you give each worker twenty steps to dig deeper. Now each one uses half a million tokens, and the total is about one point five five million, around one and a half times the single agent. Add overlapping searches, a reviewer and retries, and bills of several times one agent are normal. You buy depth and speed.
give each worker 20 steps: 20×6k + 2k×190 = 500k each ×3 + orchestrator ≈ 1.55M ≈ 1.5× the single agent + overlapping searches + a reviewer pass + retries on failed workers you pay more to go deeper, in less wall time
Compact results
A worker should return a short structured result: the answer, a confidence, its sources and any open questions, around fifteen hundred tokens. Not its whole transcript. With summaries, the orchestrator merges from about eleven thousand tokens. With three full transcripts, it would read seventy eight thousand, and you have rebuilt the bloated single context you split to escape. Keep full transcripts in logs, not in prompts.
{ "subtask": "market size",
"answer": "~4.2B USD, 2025",
"confidence": "medium",
"sources": [6 urls],
"open_questions": [...] }
merge context, 3 workers:
summaries: 6k + 3×1.5k ≈ 11k
transcripts: 6k + 3×24k ≈ 78k Pipeline
The second pattern is a pipeline, like an assembly line. A research agent produces notes, a writing agent turns them into a draft, and an editing agent polishes it. The order is fixed in your code, so this is really a workflow whose stages happen to be agents. It is predictable, and each stage can be tested alone. The weakness is that an early mistake flows all the way down, so validate output between stages.
- research → write → edit
- order fixed in code; each stage has its own prompt
- + easy to test one stage
- + predictable cost
- an early mistake flows all the way down check output between stages
Handoffs
The third pattern is a handoff. A triage agent reads the message, sees a billing problem, and hands the conversation to a billing agent. The billing agent has its own prompt and the only refund tools. The handoff carries a short note: customer id, the issue and what was already tried. Specialists hand back when a request is out of scope, and you cap handoffs so agents cannot bounce a customer back and forth forever.
- triage: reads the message, picks the specialist
- billing: own prompt, and the only agent with refund tools
- handoff note: customer id, issue, what was tried
- hand back when out of scope
- cap handoffs: no ping-pong
Critic loop
The fourth pattern is a critic or reviewer loop. One agent drafts, and a reviewer checks the draft against a rubric, then returns either pass or specific fixes, like two claims lack sources. Reviewers work best when they can run real checks, such as tests or opening each citation. A copy of the same model with the same prompt shares the same blind spots. Cap the loop at two or three rounds, or it can polish forever.
- reviewer gets: the draft + a rubric, not the history
- returns: pass, or specific fixes
- best with real checks: run tests, open citations
- same model, same prompt = same blind spots
- max 2 to 3 rounds
Debate and judge
The fifth pattern is debate with a judge. Two or three agents answer the same hard question independently, sometimes reading and attacking each other's answers, and a judge agent picks the best or merges them. It helps on ambiguous decisions, but costs several full answers. A cheaper cousin is to sample a few answers and take a majority vote. And watch the judge: model judges are known to favour position, longer answers and their own style.
- 2 to 3 agents answer the same question independently
- optional: they read and attack each other's answers
- judge: picks or merges
- cheaper cousin: sample N answers, majority vote
- judge bias: order, length, its own style
Budgets and stopping
A team of agents needs stopping rules at two levels. Each worker gets a cap on steps, tokens and time. The whole task gets one global budget that every agent draws from, so ten workers cannot each spend the maximum. Limit spawn depth, so workers cannot start more workers. Cap critic rounds and handoffs. Write the definition of done into every brief, and when a limit is hit, return partial results with a clear status.
- per worker: max steps, tokens, wall time
- whole task: one global token and cost budget
- spawn depth: workers may not start workers (depth 1)
- critic rounds: max 2 to 3
- handoffs: max 3 per chat
- done: written in each brief
- hit a limit: return partial
Tracing
When a multi-agent run gives a bad answer, you need to know which agent caused it. Give every task one trace id, and record a span for each agent, each tool call and each handoff, with its parent, tokens, cost, latency and status. Now the bad report has an explanation: worker C timed out three times, returned nothing, and the orchestrator wrote the regulation section from memory.
trace t-91 report 1.13M tok ├ orchestrator.plan 6k ├ worker A 18 steps 480k ├ worker B 20 steps 510k ├ worker C 7 steps failed │ └ fetch() timeout x3 ├ orchestrator.merge 11k └ reviewer 2 rounds 40k span: parent, agent, tokens, cost, latency, status
Numbers worth knowing
Some numbers worth knowing. Most systems use two to five workers per task. A good worker result is about one to two thousand tokens. Each extra hop adds a model call, up to a few seconds. Expect a multi-agent design to spend roughly two to five times the tokens of one agent. Parallel workers can make the research phase up to N times faster, but the plan and merge steps stay serial. And chains of agents lose reliability fast.
workers per task 2 - 5
worker result ~1-2k tokens
extra hop +1 call, 0.5-5 s
multi-agent tokens ~2-5× one agent
parallel speed-up up to ~N× on
the fan-out part
chain of 3 at 90% ~73% success
critic rounds 2 - 3 max Start with one
The practical rule: start with one agent, and split only when you can measure a reason. Quality drops late in long runs, one prompt holds rules that conflict, the tool list causes wrong picks, or independent subtasks are slow in a row. Common mistakes: agents designed like an org chart, agents chatting freely, sharing state with no owner, and having no global budget. Always compare against one agent on the same evals.
- context overflows or quality drops late in runs
- one prompt holds rules that conflict between tasks
- too many tools, wrong picks
- independent subtasks and latency matters
- common mistakes: agents per job title, chatty agents, no owner, no global budget
Say it like this
How to say it. I would start with one agent. Evals showed quality falling past forty thousand tokens, and the subtopics were independent, so we split. An orchestrator fans out to three workers in parallel, and each returns a short structured summary with sources. There is one global token budget, workers cannot spawn workers, and every agent is traced. It costs about one and a half times the tokens, and it researches twice as deep in less time.
- "I would start with one agent. Evals showed quality falling past 40k tokens, so we split: an orchestrator fans out to 3 workers in parallel. Each returns a 1.5k JSON summary. One global token budget, depth 1, every agent traced. ~1.5× the tokens, 2× the depth."