Supervisor and workers

The supervisor pattern is what people usually mean by a multi-agent system. One agent knows the goal, several know a job, and the supervisor's real work is deciding what to delegate and when to stop.

How it works

  1. The supervisor receives the goal and holds it for the whole run.
  2. It picks a worker and gives it one narrow task, not the goal.
  3. The worker has only the tools its job needs, which is the security boundary.
  4. The result comes back to the supervisor, which decides what happens next.
  5. The supervisor stops when the goal is met, the budget is spent, or a worker reports it cannot continue.

Optional: load a real model

See it work

When it pays, and when it does not

Use it whenSkip it when
Specialists need different toolsEvery step needs the same three tools, in which case one agent is simpler
You want tool access to be a boundaryNobody can name what each specialist would own
The goal takes several unrelated skillsThe work is one skill applied repeatedly, which is a loop, not a team
You need one place that knows the whole pictureThe steps are independent and can run in parallel without coordination

How it fails

Supervisor does the work

The supervisor starts answering instead of delegating, and the workers become decoration.

Context loss at the handoff

The worker gets a task with no context and asks a question the supervisor already answered.

Infinite delegation

Supervisor to worker to sub-worker, and nobody is accountable. One level of delegation is usually enough.

What it costs

TokensOne call per delegation decision plus the worker's own run. Two to four times a single agent.
LatencySequential by default. Parallelise independent tasks or accept the wait.
DebuggingHarder. You need a trace that shows the whole tree, not one agent's steps.
The tool list is the job description. If two workers have the same tools, they are the same worker with different prompts, and you have added cost for nothing.

Related: Orchestrator agents · Multiple agents · Routing · Shared state · all patterns · agent jobs

Free from AI School - no signup, everything runs in your browser.