Subgraphs & the Supervisor
Multi-agent LangGraph: routing and updating state in one Command return, using a compiled graph as a node, and choosing between shared and isolated history for a worker.
Last updated
After this section you can
- Route and update state in one return with Command, including from inside a subgraph
- Choose between sharing and isolating a worker's history, and implement each
- Pick a router node or a supervisor agent with workers as tools for a given system
Subgraphs & the Supervisor
Multi-agent in LangGraph is ordinary graph code. A supervisor is a node that returns where to go next, and a worker is a node or a compiled graph used as a node. What matters is what each worker gets to see.
Command lets one node update state and name the next node in the same return, so a supervisor is ordinary code you can test without a model. The real design choice is each worker’s view: the shared message list, or only the task you hand it and the answer it hands back.