Lesson 22 / 25

When Multiple Agents Help

Decide when to split work among agents and when a single agent is better.

Split for a reason

Multiple agents help when sub-tasks need different tools or permissions, when independent work can run in parallel, or when a task is too large for one context window. Common shapes are a coordinator that delegates to specialists, or a pipeline of stages. They also add cost, delay and new failure modes such as agents misunderstanding each other, so use one agent until you have a measured reason.

Many hands, shared tools

Splitting work across agents or sharing tools via a protocol helps only when it solves a real problem.

Three pieces: specialist agents, a coordinator, shared tools.
Figure 7.1 — Specialists, coordinator and shared tools.

A coordinator with specialists

Each specialist has a small tool set. The coordinator only decides who handles what and merges the answers.

Coordinator  (tools: delegate)
  |- Researcher   (tools: search_docs, get_doc)        read-only
  |- Analyst      (tools: run_python)                  sandboxed
  \- Writer       (tools: write_file)                  one folder only

Pass clear handoffs

A subagent starts with no memory of the conversation. Give it the goal, the relevant facts, the expected output format and any limits, and ask it to return a short result rather than its whole working.

Quick check: Which is a good reason to use multiple agents?

  • It sounds impressive
  • One agent is always too slow
  • You want more bugs
  • Sub-tasks need different tool permissions
Answer

Sub-tasks need different tool permissions — Separate roles allow separate, narrower permissions, which improves safety.