Get Started
Agent engineering

Mission 7 of 8

Know when a team of agents beats one, and build one that holds.

Most of the time a single agent with good tools beats a team. You'll learn the test that tells you, then build a researcher, writer and reviewer team with hard caps on handoffs and spend.

75 minAdvancedAbout $0.50 to $1.50 per team runStep 1 free

What you'll do

Run the three-question test

Decide with a rule, not enthusiasm, whether your task needs more than one agent at all.

Build the team two ways

Code a parallel researcher, writer and reviewer team, then rebuild it with a model deciding the handoffs.

Break it on purpose

Cause a handoff loop, a cost explosion and an over-agreeable reviewer, and stop each with a specific control.

  • Compare tokens and rounds against your mission 5 single agent
  • Take away a reusable reviewer gate and six rules for your next team design
Before you start
  • Missions 3, 5 and 6 done: tools.py, sources.py, plan.py, verify.py and run_eval.py in agent-lab
  • Your mission 5 run's token count written down. You compare against it in step 3
  • A willingness to be talked out of multi-agent designs. The decision test in step 1 says no more often than yes
  • Build an AI agent team is the framework-based version of this mission; it is optional and not a prerequisite
Your progress0/6
01/06When a team beats one agent, and the three-question test0 done
STEP 01 of 06~10 min

When a team beats one agent, and the three-question test

Decide with a rule, not with enthusiasm.

Every demo of a "team of AI agents" shows roles chatting their way to a result. Before you build one, it's worth settling what counts as a team, and whether you need it.

You may already have built one

Mission 5's research agent already had four roles: planner, researcher, writer, checker. They were four system prompts in one process, each call starting fresh. Was that a multi-agent system? By the useful definition, yes: separate contexts, separate instructions, data passed between them by code.

The thing people usually mean by multi-agent, several model loops that talk to each other and decide among themselves who does what, is a different and much more expensive thing, and it is rarely what you need.

The three questions

If the answer to all three is no, one agent with good tools wins, and the rest of this mission is for later.

  • Does the task need separate contexts? A reviewer that has seen the draft being written will defend it. A researcher on question 3 does not need questions 1 and 2 in its window. If one context would be polluted by the other's history, separate them. Mission 5's verifier is the clearest case: it must not remember writing the draft.
  • Does the task have independent parts that are slow? Four research questions that each take 30 seconds of fetching can run at once. That is parallelism, and it is the one place where "more agents" is a straightforward win. Four parts that depend on each other gain nothing from being four agents.
  • Do the parts need different trust or permissions? A researcher that can fetch the web and a writer that can write to disk should not be the same loop with both tools, because then a fetched page can instruct the disk-writing tool. Separate roles with separate tool registries are a security boundary, and the security track goes deep on this.

What is not a reason

"It is how humans organise", "the demo looked impressive", "each agent can specialise". A model does not get better at writing because you called it a Writer. It gets better because its context contains only what writing needs.

That is question one, and you can get it with a function, not a team.

What a team costs

Before you decide anything, count the costs: every agent that reads another agent's output pays for that output as input tokens, every turn. Every handoff is a serialisation that loses something.

Every agent that can call another agent is an edge in a graph that can have cycles. A team is a distributed system; all the ways distributed systems fail apply.

Checkpoint
You have written down, for a task of your own, the answers to the three questions and whether the result is "one agent" or "team, because of question N".
Stuck? Ask the community
Next mission · Agent engineeringDeploy an agent that runs all day: a FastAPI queue, spend caps, logs, Docker, a VPS, and an alert
→