Lesson 49.1 · 1 of 5 · 5 min read · Reviewed 24 Nov 2026
Supervisor
By the end, you can
- Describe the supervisor topology.
- Know its strengths and limits.
The shape
user
|
[ supervisor ] plans, delegates, combines
/ | \
[ search ] [ code ] [ writer ] narrow roles, own tools
Anthropic’s multi-agentMulti-agent system: A design where several agents with different roles or contexts work together on a task. research system uses this shape: a lead agent plans the research, spins up subagentsSubagent: A separate agent instance, with its own context and instructions, that a main agent delegates a task to. to explore in parallel, then writes the report from their findings.
Strengths
- Clear control: one place owns the goal, the plan and the answer.
- Context isolation: each worker reads lots of material but returns a short summary (49.5).
- Parallelism: independent sub-tasks run at once.
- Debuggable: tracesTrace: A record of everything that happened during one request or agent run, as a tree of timed steps. form a tree you can follow (chapter 67).
Limits
- Bottleneck: every handoffEscalation: Handing a case from an agent to a person, with the context needed to continue. passes through the supervisor.
- Delegation quality: vague task descriptions produce duplicated or off-target work. Give each worker an objective, an output format, tool guidance and boundaries (43.3).
- Cost: many agentsAgent: A system where a model decides its own next steps, calling tools in a loop until the task is done. means many tokensToken: The unit a model reads and writes: a word, part of a word, a space or a symbol, mapped to an integer id.. Multi-agent runs can use several times the tokens of a single agent, so reserve them for tasks that are worth it.
Good uses
Broad research, large code reviews split by area, and any task that splits cleanly into independent parts.
Key points
- A supervisor agent receives the task, delegates parts to worker agents, and combines their results.
- Workers have narrow roles and tools; the supervisor holds the plan and the final answer.
- It's the most common multi-agent shape and the easiest to debug.
- The supervisor can become a bottleneck, and everything depends on how well it delegates.
Build a supervisor with three workers
Delegate parts of a task to narrow workers and keep the supervisor's context small.
You will have: A supervisor and worker script that prints how much the supervisor read and its combined answer.
Steps
- Run the starter: workers return everything and the supervisor reads over 900 lines.
- Make each worker return its top two findings plus a reference to the full notes.
- Run it and compare how many lines the supervisor reads.
- Check that the final answer still contains all six findings.
Done when
- The supervisor reads 9 lines instead of 906.
- The final answer lists 6 findings from 3 workers.
- Each result carries a reference the supervisor could follow if needed.
Open in the Playground No API key needed.
Starter code (Python)
# A supervisor splits the task, briefs three workers, and combines short results.
NOTES = { # what each worker finds; full notes are long
"pricing": ["Competitor A charges per seat", "Competitor B has a free tier"] + ["detail"] * 300,
"reviews": ["Users praise setup speed", "Users dislike the mobile app"] + ["detail"] * 300,
"features": ["Only Competitor A has SSO", "Both lack offline mode"] + ["detail"] * 300,
}
def worker(topic, brief):
notes = NOTES[topic]
# TODO: return a short result: the first 2 findings plus a reference like "ref:notes/<topic>"
return notes # starter: dumps every note on the supervisor
def supervisor(task):
parts = ["pricing", "reviews", "features"]
briefs = {p: f"{task}: report the top findings on {p} in 2 bullets" for p in parts}
results = {p: worker(p, briefs[p]) for p in parts}
read = sum(len(r) for r in results.values())
print(f"supervisor read {read} lines from {len(parts)} workers")
findings = [line for r in results.values() for line in r if line != "detail" and not line.startswith("ref:")]
return "Final answer: " + "; ".join(findings)
print(supervisor("Compare us with two competitors"))
Show a solution
# A supervisor splits the task, briefs three workers, and combines short results.
NOTES = { # what each worker finds; full notes are long
"pricing": ["Competitor A charges per seat", "Competitor B has a free tier"] + ["detail"] * 300,
"reviews": ["Users praise setup speed", "Users dislike the mobile app"] + ["detail"] * 300,
"features": ["Only Competitor A has SSO", "Both lack offline mode"] + ["detail"] * 300,
}
def worker(topic, brief):
notes = NOTES[topic]
return notes[:2] + [f"ref:notes/{topic}"]
def supervisor(task):
parts = ["pricing", "reviews", "features"]
briefs = {p: f"{task}: report the top findings on {p} in 2 bullets" for p in parts}
results = {p: worker(p, briefs[p]) for p in parts}
read = sum(len(r) for r in results.values())
print(f"supervisor read {read} lines from {len(parts)} workers")
findings = [line for r in results.values() for line in r if line != "detail" and not line.startswith("ref:")]
return "Final answer: " + "; ".join(findings)
print(supervisor("Compare us with two competitors"))