- supervisor — individual agents are coordinated by a central supervisor agent. The supervisor controls all communication flow and task delegation, making decisions about which agent to invoke based on the current context and task requirements.
- swarm — agents dynamically hand off control to one another based on their specializations. The system remembers which agent was last active, ensuring that on subsequent interactions, the conversation resumes with that agent.
Supervisor

langgraph-supervisor
library to create a supervisor multi-agent system:
Swarm

langgraph-swarm
library to create a swarm multi-agent system:
Handoffs
A common pattern in multi-agent interactions is handoffs, where one agent hands off control to another. Handoffs allow you to specify:- destination: target agent to navigate to
- payload: information to pass to that agent
langgraph-supervisor
(supervisor hands off to individual agents) and langgraph-swarm
(an individual agent can hand off to other agents).
To implement handoffs with create_react_agent
, you need to:
- Create a special tool that can transfer control to a different agent
- Create individual agents that have access to handoff tools:
- Define a parent graph that contains individual agents as nodes:
- Access agent’s state
- The
Command
primitive allows specifying a state update and a node transition as a single operation, making it useful for implementing handoffs. - Name of the agent or node to hand off to.
- Take the agent’s messages and add them to the parent’s state as part of the handoff. The next agent will see the parent state.
- Indicate to LangGraph that we need to navigate to agent node in a parent multi-agent graph.
This handoff implementation assumes that:
- each agent receives overall message history (across all agents) in the multi-agent system as its input
- each agent outputs its internal messages history to the overall message history of the multi-agent system