Skip to content
sync ai agents

Supervisor vs swarm: who routes work and who answers the user

Updated November 2026

A supervisor is one agent that sends each task to a specialist and collects the result, so it owns the reply. In a swarm, agents pass control directly to each other, and whichever specialist holds control talks to the user. Have your agents report to a supervisor when you want routing in one place and specialists kept away from the user. Let them hand off as a swarm when specialists should run the conversation themselves.

At a glance

Supervisorswarm
What it isA supervisor has a central supervisor agent coordinating specialized agents, and in the langgraph-supervisor library that agent controls all communication flow and task delegation.A swarm, as the langgraph-swarm library defines it, lets agents dynamically hand off control to one another based on their specializations.
LanguagesA supervisor can be built with langgraph-supervisor, a Python library for hierarchical multi-agent systems on LangGraph.A swarm can be built with langgraph-swarm, a Python library for swarm-style systems on LangGraph.
How agents are coordinatedA supervisor corresponds to the OpenAI Agents SDK pattern where a manager agent keeps control of the conversation and calls specialist agents through Agent.as_tool().The SDK's handoffs pattern has a triage agent route the conversation to a specialist that becomes the active agent for the rest of the turn.
Who talks to the userA supervisor suits work where sub-agents don't need to converse directly with users, according to LangChain's supervisor tutorial.LangChain's handoffs pattern lets each agent hand off to others or respond directly to the user.
Context passed to the next agentA supervisor built from LangChain's tutorial gives sub-agents only the request string by default, while the langgraph-supervisor library's default handoff tool passes full message history.A swarm made with langgraph-swarm hands over the whole message history by default, plus a tool message marking the handoff.
State and memoryA supervisor using langgraph-supervisor gets out-of-box short-term and long-term memory from LangGraph.A swarm on langgraph-swarm needs a checkpointer in multi-turn use, because without short-term memory it would forget which agent was last active.
Human-in-the-loopA supervisor in LangChain's tutorial lets a reviewer decide on pending actions, and its example accepts the calendar event but edits the subject of the outbound email.A swarm built on OpenAI Agents SDK handoffs keeps the SDK's tool approvals, since that approval surface is run-wide and also applies to an agent reached through a handoff.
LicenseA supervisor written with langgraph-supervisor uses code under the MIT license.A swarm from langgraph-swarm also ships under the MIT license.

How does each one coordinate agents?

A supervisor sits on every path between the user and the specialists. LangChain's multi-agent guide says that in the subagents pattern routing passes through the main agent, which decides when and how to invoke each subagent. In its one-shot example, subagents adds one extra call because results flow back through the main agent, and the guide says this overhead provides centralized control. The supervisor agent pattern page covers the design in more depth.

In the langgraph-supervisor library you can control how worker messages are added to the overall conversation history. A forwarding tool can also send a worker's last message straight to the final output of the graph. The README says forwarding saves tokens for the supervisor and avoids potential misrepresentation of the worker's response through paraphrasing.

In a swarm, control itself moves between agents. In LangChain's handoffs pattern, agents transfer control to each other via tool calls. The OpenAI Agents SDK represents handoffs as tools to the LLM, so a handoff to Refund Agent becomes a tool named transfer_to_refund_agent. After the handoff, the new agent takes over and sees the entire previous conversation history unless you set an input_filter.

When should you choose a supervisor?

  • Your work splits into separate domains with their own tools. LangChain's tutorial recommends the pattern for multiple distinct domains when you also want centralized workflow control.
  • One agent should own the final answer. The OpenAI Agents SDK points to agents as tools when you want one agent to own the answer, combine outputs from multiple specialists, or enforce shared SDK guardrails in one place.
  • Specialists should stay away from the user. The SDK says to use agents as tools when a specialist should help with a bounded subtask but should not take over the user-facing conversation.
  • You need teams of teams. The langgraph-supervisor README shows a supervisor that manages multiple supervisors to form multi-level hierarchies.

When should you choose a swarm?

Can you use them together?

Yes, the two patterns compose inside one system. The OpenAI Agents SDK says a triage agent might hand off to a specialist, and that specialist can still call other agents as tools for narrow subtasks. When a nested Agent.as_tool() call needs approval, the interruption still surfaces on the outer run, so you approve or reject it on the outer RunState.

On the LangChain side, the multi-agent guide describes a custom workflow pattern that lets you embed other patterns as nodes. A workable split puts a supervisor in charge of routing between domains and lets specialists inside one domain pass a live conversation between themselves. The handoffs pattern page covers that inner layer.

What should you watch out for?

What else should you know?

Which sources does this page use?

Where can you go deeper?