Skip to main content

06. Multi-Agent Systems

Supervisor and Worker Agents

A supervisor agent plans, assigns, joins, and escalates. Worker agents execute specialized subgoals under scoped tool allowlists and return structured reports. Together they are the most common multi-agent organization — the living form of Orchestrator-Worker and repeated delegation.

What you will learn

  • Define supervisor vs worker responsibilities
  • Design a thin supervisor with worker allowlists
  • Run the plan → dispatch → join → integrate loop
  • Choose join and failure policies for workers
  • Answer interview questions with short, solid answers
Supervisor assigning to research coding and review workers
Interview staple: supervisor plans and integrates; workers execute with scoped tools.

Definition

A supervisor (manager / orchestrator agent) owns the parent goal: it decomposes work, selects workers, issues delegation contracts, waits or joins results, integrates an answer, and escalates when stuck or risky.

Worker agents are specialized executors — each with a role prompt and a tight tool allowlist — that pursue assigned subgoals and return structured reports. Module 05 Orchestrator-Worker named the pattern; this lesson details the agent roles and operating loop.

Introduction

This lesson (#5 in Multi-Agent Systems) follows Agent Delegation. A supervisor is a long-lived delegator; workers are the usual delegates.

Next: Specialized Agents (Research, Coding, Reviewer) — concrete worker personas.

Why this organization

  • Hard-splits permissions across roles
  • Keeps planning context separate from noisy tool traces
  • Enables parallel workers with a clear join point
  • Gives humans one place to approve plans or escalations

Who does what

If the supervisor still holds every write tool, you built a god-agent with helpers — not a supervisor–worker system.

Supervisor planning duties versus worker execution duties
Put heavy side effects on workers. Keep the supervisor thin on write tools.
  • Supervisor - decompose, assign, join, integrate, escalate
  • Workers - execute subgoals with allowlisted tools
  • Shared - schemas, task_id, budgets, tracing
  • Human - optional approval of plan or high-risk joins

The control loop

Implement the loop in the runtime/graph. The supervisor LLM proposes plans; code enforces budgets and joins.

Goal plan dispatch workers integrate done or replan loop
Replan when worker reports invalidate remaining steps — do not fake success.
  • Plan - break goal into typed subtasks
  • Dispatch - issue contracts to workers (seq or parallel)
  • Wait / join - apply join policy + timeouts
  • Integrate - merge schemas or synthesize final artifact
  • Done / replan / escalate - based on reports and budget

Worker pool design

  • Few sharp workers beat many vague clones
  • One allowlist per worker role (research ≠ refunds)
  • Idempotent reports: same job_id can be safely retried
  • Concurrency caps per worker type and global spend
  • Optional warm pool vs spawn-per-task — ops choice

Join and failure policies

  • Wait-all - need every worker (common for synthesis)
  • Wait-n - proceed when n of m succeed
  • Fail-fast - cancel siblings on critical worker failure
  • Partial OK - continue with warnings for soft workers
  • Always - timeouts, cancel tokens, and escalate paths

Failure modes

  • God supervisor - still calls production write tools
  • Worker sprawl - too many roles; routing confusion
  • Join deadlock - waiting forever without timeout
  • Opaque reports - free text only; cannot integrate safely
  • Plan thrash - replanning every turn; sticky plans + hysteresis

Program / implementation notes

Model SupervisorState { plan, open_jobs[], reports[], budget }. Workers are handlers keyed by role. Prefer graphs (LangGraph) or crew runners that make edges explicit.

  • Related: Module 05 Orchestrator-Worker; prior lesson Agent Delegation
  • Next: Specialized Agents (Research, Coding, Reviewer)

Advantages and limitations

  • Advantage: clear ownership and safer tool isolation
  • Advantage: parallel specialists under one plan
  • Advantage: easier human approval at supervisor boundary
  • Limitation: extra latency and tokens vs one agent
  • Limitation: bad plans waste the whole worker fleet
  • Limitation: join/merge bugs are common if schemas are weak

Key points

  • Supervisor plans, assigns, joins, integrates, escalates.
  • Workers execute with scoped tool allowlists and structured reports.
  • Keep supervisors thin on write tools.
  • Loop: plan → dispatch → join → integrate → done/replan.
  • Join policies need timeouts and cancel paths.
  • This is Orchestrator-Worker realized as agent roles.

FAQs

Is supervisor–worker the same as Orchestrator-Worker?

Same family. Orchestrator-Worker is the design pattern name; supervisor and workers are the usual agent roles that implement it.

Should the supervisor use tools at all?

Prefer read-only or meta tools (status, ask-human). Put side-effecting tools on workers unless a rare exception is justified.

How many workers should I start with?

Start with 2–3 sharp roles. Add workers only when a new permission or skill boundary is real.

Can workers talk to each other?

Optional. Many designs only allow supervisor↔worker. Peer links need extra coordination rules to avoid chat storms.

Interview questions

  1. What does a supervisor agent do?

    Answer It owns the parent goal: plans subtasks, assigns workers, joins results, integrates the outcome, and escalates when needed.

  2. What does a worker agent do?

    Answer It executes an assigned subgoal with a scoped tool allowlist and returns a structured report to the supervisor.

  3. Why keep the supervisor thin on tools?

    Answer To preserve permission isolation and force real specialization — otherwise it becomes a god-agent with decoy workers.

  4. Name join policies for workers.

    Answer Wait-all, wait-n, fail-fast, and partial-success with warnings — each needs timeouts and cancellation.

  5. How does this relate to delegation?

    Answer Each dispatch is a delegation with a contract; the supervisor is the recurring delegator for the run.

  6. When is supervisor–worker overkill?

    Answer When a single agent or short chain meets quality and isolation needs without multi-role overhead.

Related topics

Practice task

Complete each numbered practice step in a notebook or doc before opening the next lesson.

  1. Design a supervisor + 3 workers for a “weekly research brief” product; list each worker’s tools.
  2. Write the supervisor’s allowed tools (should be thin) and justify each.
  3. Pick a join policy for the three workers and a 30s timeout behavior.
  4. Define when the supervisor must replan vs escalate to a human.
  5. Answer interview questions 1, 2, and 3 in two sentences each.