Supervisor with workers: one model plans and delegates, specialists do the work

A supervisor model breaks a goal into sub-tasks, assigns each to a specialist worker, and combines the results. Use it for open-ended goals where the steps cannot be fixed in advance.

Supervisor with workers in 60 seconds

  • What: one supervisor model plans sub-tasks, assigns them to specialist workers, reads their results, and decides what to do next.
  • Who decides the path: a model. The supervisor chooses workers and order at run time, inside limits your code sets.
  • Best for: research and analysis goals, report writing, and tasks that mix skills such as searching, calculating, and drafting.
  • Weak spots: more model calls, drift from the goal, workers that overlap, and hard-to-trace failures.
  • Origin: a close cousin of multiagent debate (Du et al., 2023), where several model instances propose answers over rounds, but here one supervisor directs the work.

Where this type fits

Orchestration patterns are grouped by who decides the path. A supervisor sits in the group where a model decides, next to the single agent and peer handoff. Unlike a router or pipeline, the route is not fixed in code. The orchestration hub compares all of them.

The problem it solves

A single agent with many tools and a long goal tends to struggle. Its prompt carries every instruction. Its context fills with intermediate results. It forgets the plan halfway through, or spends its steps on the wrong sub-task. Adding more tools makes tool choice harder.

Fixed pipelines do not help when the steps depend on what is found. A question such as "Why did churn rise last quarter?" may need a data query, a read of support tickets, and a check of the release notes, in an order that depends on the first findings. You cannot draw that flow in advance.

A supervisor splits the load. It keeps the goal and the plan. Each worker keeps one skill, a short prompt, and a small set of tools. The supervisor sees only worker summaries, not every raw detail, so its context stays focused on the goal.

How it works

  • Receive the goal. The supervisor gets the goal, the list of workers with a one-line description of each, and its limits.
  • Plan. It writes a short list of sub-tasks and picks a worker for each. It may start with only the first one or two.
  • Delegate. The supervisor sends each sub-task to a worker as a clear brief: what to do, what to return, and what to ignore.
  • Work. The worker runs its own short loop with its own tools and returns a concise result and a status.
  • Review. The supervisor reads the result, checks it against the goal, and decides: assign another sub-task, re-ask, or finish.
  • Combine. When enough is known, the supervisor writes the final result, citing which worker supplied each part.
The supervisor plans and delegates to specialist workers, then combines their results.

The arrows in the diagram run both ways in practice. The supervisor sends a brief out and a result comes back, and it may repeat several times. Workers do not talk to each other. All communication goes through the supervisor, which keeps the flow easy to log and audit.

Limits are part of the design. Without a cap on delegation rounds, a supervisor can keep assigning work that adds little. Set a maximum number of rounds and a total budget, and make the supervisor finish with what it has when either is reached.

A worked example

Acme asks: "Summarise why our trial-to-paid conversion fell in October and suggest two fixes." The supervisor has three workers: search, analysis, and writing.

  • Plan: (1) find October product and pricing changes, (2) compute conversion by signup channel, (3) draft the summary.
  • Round 1, search worker: returns "Free trial cut from 30 to 14 days on 3 October. A new checkout page launched on 17 October."
  • Round 2, analysis worker: given the two dates, returns "Conversion fell from 11.2 percent to 8.9 percent. The drop is largest for the partner channel."
  • Supervisor review: the data fits the trial change, but the partner channel is unexplained. It adds a sub-task: search for partner onboarding changes.
  • Round 3, search worker: returns "Partner onboarding emails were paused 8 to 20 October."
  • Round 4, writing worker: drafts the summary with two fixes: restore the trial length for partners, and resume onboarding emails.
  • Output: a short report, with the source worker named beside each claim.

The supervisor used four of a maximum of six rounds. The extra search in round 3 was not in the first plan. That is the benefit of a model-led path, and the reason limits matter.

Building it

A supervisor loop with a round limit and a worker registry (illustrative) (python)
MAX_ROUNDS = 6              # hard stop on delegation
MAX_TOTAL_TOKENS = 60_000   # budget for the whole goal

WORKERS = {
    "search":   {"about": "Finds facts in documents and tickets", "run": run_search},
    "analysis": {"about": "Runs queries and computes figures",     "run": run_analysis},
    "writing":  {"about": "Drafts clear summaries from notes",     "run": run_writing},
}

def supervise(goal: str) -> str:
    notes, tokens = [], 0
    for round_no in range(1, MAX_ROUNDS + 1):
        # Placeholder: the model returns structured output, either
        # {"action": "delegate", "worker": "...", "brief": "..."} or
        # {"action": "finish", "answer": "..."}.
        step = llm.generate_json(
            prompt=SUPERVISOR_PROMPT,
            goal=goal, workers={k: v["about"] for k, v in WORKERS.items()},
            notes=notes, rounds_left=MAX_ROUNDS - round_no,
        )
        if step["action"] == "finish":
            return step["answer"]

        worker = WORKERS.get(step.get("worker"))
        if worker is None:
            # Invalid choice: tell the supervisor instead of crashing.
            notes.append({"round": round_no, "error": "unknown worker"})
            continue

        result = worker["run"](step["brief"], timeout_s=60)
        tokens += result["tokens"]
        # Keep only a short summary so the supervisor context stays small.
        notes.append({"round": round_no, "worker": step["worker"],
                      "status": result["status"], "summary": result["summary"][:800]})

        if tokens > MAX_TOTAL_TOKENS:
            break

    # Limits reached: finish with what we have and say so.
    return llm.generate(FINISH_NOW_PROMPT, goal=goal, notes=notes)

llm, the prompts, and the worker functions are placeholders. Notice that the supervisor never trusts a worker name without checking it, and that results are shortened before the supervisor sees them.

Design decisions

  • Worker granularity: make workers by skill and tool set, not by topic. Three to six workers is common. If two workers always run together, merge them.
  • Brief and result format: use a fixed structure for what the supervisor sends and what workers return: task, status, summary, and sources. It makes logs readable and failures easy to spot.
  • Context hygiene: pass summaries up, not raw output. Store full results outside the prompt and refer to them by id.
  • Limits: cap rounds, tokens, and wall-clock time for the whole goal, and cap each worker's own steps. Choose a finish-with-what-we-have behaviour instead of failing.
  • Model choice: a strong model for the supervisor, where planning quality matters, and smaller models for narrow workers. Test this split rather than assuming it.
  • Access control: give each worker only the tools it needs. A writing worker should not hold a database write tool. Enforce permissions in the tool layer, not in the prompt.
  • Failure handling: let the supervisor see failed and timed-out results as data. Retry once with a changed brief, then work around the gap or report it.

Measuring it

  • Task success rate: the share of goals judged correct and complete on a fixed test set, using a rubric or a human grader.
  • Rounds per goal: the mean and 95th percentile of delegation rounds. A rising tail suggests the supervisor is looping.
  • Delegation accuracy: on a sample of traces, the share of sub-tasks sent to the right worker, judged by a person.
  • Cost and latency per goal: total tokens and elapsed time across the supervisor and all workers.
  • Overhead against a single agent: run the same goals through one agent with all tools, and compare success, cost, and time.
  • Limit hits: the share of runs that stopped on the round, token, or time limit.

When to use it, and when not to

SituationUse this type?Why
Open-ended research or analysis with mixed skillsYesThe steps depend on what is found, so a model must choose the next worker.
A task that fits one prompt and a few toolsNoA single agent is cheaper and easier to trace.
Steps are known and always the sameNoUse a pipeline. A supervisor adds cost for no gain.
Sub-tasks are independent and known up frontNot aloneParallel fan-out is faster and simpler.
Tasks needing several viewpoints in sequenceYesThe supervisor can assign each view and reconcile differences.
High-stakes outputWith careAdd a critic loop or a human checkpoint.

Trade-offs

DimensionEffectWhat to do about it
QualityFocused workers and a clean supervisor context often beat one overloaded agent on broad tasks.Test against a single-agent baseline and keep the supervisor only if it wins.
LatencyRounds run in sequence, and each adds a model call.Let the supervisor assign independent sub-tasks together, and cap rounds.
CostSupervisor calls plus every worker's calls. Usually several times a single agent.Use small models for workers and set a token budget per goal.
ComplexityMore prompts, a message format, and traces that span several components.Log every brief and result with a shared run id.
Failure modesGoal drift, wrong worker choice, duplicated work, and supervisors that accept weak results.Use limits, a result check, and sampled human review of traces.

A single agent does everything itself. Choose it first, and move to a supervisor only when one agent's prompt, tools, or context become too much. With peer handoff, agents pass the conversation to each other with no central planner. A supervisor keeps control and context in one place, which makes it easier to audit.

Compared with parallel fan-out, a supervisor decides the split at run time and can react to results, but costs more. The research on multiagent debate (Du et al., 2023) has model instances argue to a shared answer, which differs from a supervisor that assigns distinct jobs.

What this means for your role

Common mistakes

Further reading

A supervisor is worth its cost when the work needs several skills and an unknown order. Keep the worker list short, the limits firm, and the results small.

Search topics

↑↓ to move · Enter to open · Esc to close