Home › Agents & Tool Use › Supervisor / router
🕹️ · Build

Supervisor / router

A central supervisor classifies each request and dispatches it to the right specialist sub-agent.

In one line

A supervisor agent reads each task and routes it to the specialist sub-agent best suited to handle it.

ConceptWhat it is

The supervisor (or router) pattern places a single orchestrating agent in front of a set of specialist sub-agents. The supervisor reads the incoming task, decides which specialist should handle it, and dispatches the work rather than trying to answer everything itself.

It exists to enforce separation of concerns at the agent level: each sub-agent carries a narrow prompt, toolset, and knowledge scope, so it can be tuned and evaluated in isolation, while the supervisor owns only the routing decision and the assembly of results. This scales out cleanly, since adding a capability means adding a specialist and teaching the router about it, not rewriting one monolithic prompt.

How it worksThe mechanics

A request arrives at the supervisor, which classifies its intent, often with a structured-output call that names the target specialist, and hands the task to that sub-agent along with the relevant context; the specialist runs its own loop and tools, returns a result, and control passes back to the supervisor, which either routes to another specialist, asks one to retry, or judges the task complete and composes the final answer.

At a glanceSee it

Supervisor / router diagram
Supervisor / router diagram 1

Opens the supervisor black box — the three strategies it can use to pick a specialist, from cheap brittle rules to an LLM classifier.

Supervisor / router diagram 2

The orchestration decision the loop hides — route the whole task to one specialist or decompose it across several and aggregate the parts.

When to use itWhere it fits

  • Workloads that split into clearly distinct sub-tasks, each needing its own tools or domain knowledge.
  • Systems you expect to grow, where new capabilities should slot in as new specialists behind a stable router.
  • Cases where you want each specialist tested, versioned, and rate-limited independently.
  • Front-door assistants that must triage intent before doing anything else.

When NOT to use itLimits & anti-patterns

  • Simple tasks a single well-prompted agent handles, where a router only adds a call and a failure point.
  • Problems that do not decompose cleanly, so most requests need several specialists cooperating tightly rather than one at a time.
  • Latency-critical paths, since the routing hop adds a round trip before real work starts.
  • Situations where the routing signal is ambiguous, making misroutes frequent and costly.

Trade-offsAdvantages & costs

Advantages
  • Clean separation of concerns; each specialist stays small, focused, and independently improvable.
  • Scales out horizontally, since new skills are added as new sub-agents without touching existing ones.
  • The routing decision is a single, inspectable, and testable choke point.
  • Specialists can use different models, tools, and budgets suited to their job.
Trade-offs & costs
  • Router errors cascade: a misclassified request goes to the wrong specialist and the whole task fails downstream.
  • The supervisor is a central bottleneck for both latency and reliability.
  • Extra routing calls and handoffs raise token cost and round-trip time.
  • Coordinating shared context and state across the supervisor and specialists adds engineering complexity.

ExampleIn the real world

A customer-support assistant fronts its specialists with a supervisor. When a message arrives, the supervisor classifies it as a billing question, a technical issue, or an account change, then hands it to the matching specialist agent, which holds only the tools and knowledge for its domain. If a billing query turns out to hide a technical fault, the specialist returns control and the supervisor re-routes to technical support before drafting the final reply.

ToolsHow to implement it

  • LangGraphits supervisor architecture builds a router node that delegates to worker agents and collects their results.
  • CrewAIa hierarchical process where a manager agent delegates tasks to crew members.
  • AutoGena group-chat manager selects which agent speaks next on each turn.
  • OpenAI Agents SDKa triage agent hands off requests to specialized agents.

Cost & effortWhat it takes

Cost sits in the medium-to-high band: every request pays for at least one routing call on top of the specialist calls it triggers, and multi-hop tasks pay the supervisor toll on each hop. Engineering effort is moderate, dominated by making routing reliable, since the router is the single point whose mistakes propagate, plus the work of defining, testing, and monitoring each specialist.

A living map of modern AI — kept current every morning