langgraph-supervisor package is no longer actively maintained. Instead use the subagents pattern: a main agent coordinates specialized workers by calling them as tools.
This guide covers how to migrate from create_supervisor to create_agent, including setups that use interrupt and external API callbacks.
Summary of changes
| langgraph-supervisor | Recommended replacement |
|---|---|
create_supervisor with worker agents as graph nodes | create_agent with subagents wrapped as @tool functions |
output_mode for message history | Format subagent output in the tool wrapper (see subagent outputs) |
create_handoff_tool for custom routing | Custom @tool that calls subagent.invoke(...) |
Nested supervisors (create_supervisor of supervisors) | A subagent wrapped as a @tool that calls other subagents |
Basic migration
Withlanggraph-supervisor, worker agents were graph nodes and the supervisor routes between them using handoff tools:
Migrate interrupt and resume flows
A commonlanggraph-supervisor setup uses interrupt inside a worker agent’s tool to pause execution until an external service completes:
interrupt inside a subagent tool propagates up through tool-wrapped create_agent layers to the outermost graph. Your external callback can still resume with Command(resume=result).
Requirements for interrupt propagation
Forinterrupt to bubble up through nested create_agent layers, follow these rules:
- Compile only the outermost graph with a checkpointer. Leave subagents without
checkpointer=...so they use per-invocation persistence and inherit the parent’s checkpointer at runtime. - Pass
thread_idinconfigurable. The outerinvoke()orstream_events()call must include athread_idso the graph can checkpoint and resume.
StateGraph outer layer, a middle create_agent supervisor, and an inner create_agent subagent all follow the same mechanism:
preview_tool calls interrupt, the exception bubbles through both create_agent layers and surfaces as __interrupt__ on the outer StateGraph’s invoke result. Your existing Command(resume=result) callback path keeps working.
For more on how interrupts propagate through subgraphs, see Subgraph persistence: Interrupts and Checkpointing and state inspection.
When to use a custom StateGraph instead
Use a customStateGraph when you need to mix deterministic steps with agentic ones. For example, fixed routing, validation, or external API calls alongside create_agent nodes.
Migrate nested supervisors
langgraph-supervisor supports multi-level hierarchies by compiling supervisors and passing them to another create_supervisor call. With the subagents pattern, you have two options:
- Flatten to a single supervisor with one tool per leaf agent. This is the simplest approach when each worker is independent.
- Nest tool calls when you need intermediate coordination. Wrap a middle-tier agent (itself a
create_agentwith its own subagent tools) as a tool on the top-level supervisor.
StateGraph with subgraph nodes instead.
Migrate message history options
create_supervisor exposes output_mode to control how worker messages appear in conversation history:
full_history: Include all messages from the worker agent.last_message: Include only the worker’s final response.
last_message behavior, or return a formatted summary of the full conversation for full_history behavior. See Subagent outputs for patterns that pass additional state back to the supervisor.
See also
- Subagents: Pattern overview and design decisions
- Build a personal assistant with subagents: Step-by-step supervisor tutorial
- Use subgraphs: Subgraph persistence, interrupts, and state inspection
- Interrupts: Pause and resume graph execution
- LangGraph v1 migration guide: Migrate from
create_react_agenttocreate_agent
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

