Handoffs
Passing the baton.
When you call your bank, the first person might say, let me transfer you to the mortgage team. Nobody supervises. One person simply passes you to the next. And that's a handoff. Control moves completely from one agent to another.

- Calling your bank
- Let me transfer you
- Control moves on
Handing off with Command
In LangGraph, a node can return a Command, which both updates the state, and says where to go next. Triage reads the message, and hands over to returns or to sales. There's no conditional edge, as the node decides for itself. Run it. Each customer ended up at the right agent, and the log shows the trail. In a real system, the receiving agent takes over the conversation.
from typing import TypedDict
from langgraph.graph import StateGraph, START, END
from langgraph.types import Command
class State(TypedDict):
message: str
log: list
def triage(state):
goto = "returns" if "return" in state["message"] else "sales"
return Command(goto=goto, update={"log": state["log"] + [f"triage -> {goto}"]})
def returns(state):
return {"log": state["log"] + ["returns: label sent"]}
def sales(state):
return {"log": state["log"] + ["sales: quote sent"]}
g = StateGraph(State)
g.add_node("triage", triage)
g.add_node("returns", returns)
g.add_node("sales", sales)
g.add_edge(START, "triage")
g.add_edge("returns", END)
g.add_edge("sales", END)
app = g.compile()
print(app.invoke({"message": "I want to return this", "log": []})["log"])
print(app.invoke({"message": "Price for 40 chains?", "log": []})["log"])['triage -> returns', 'returns: label sent'] ['triage -> sales', 'sales: quote sent']
Supervisor versus handoffs
When should you use each? A supervisor stays in charge, so it's good for tasks with several parts, and it combines the results. Handoffs are simpler and quicker, since there's no middle step, and they suit a customer who needs one specialist. You lose the overall view, though, so you need good tracing.
Supervisor
- Stays in control
- Combines several results
- Extra model calls
Handoffs
- Control moves on
- One specialist at a time
- Harder to see the whole
Pass the right context
The most common failure in a handoff is lost context. The customer has to repeat everything. It's the same as with humans. So pass a short summary, the customer's details, and what's been tried. Don't pass the entire history, or the next agent gets all the clutter you wanted to avoid.
Summary
Handoffs pass control, and good summaries make them work. Next, the subtle problem at the heart of all multi agent work. How should agents share what they know?
Key takeaways- Command updates and routes
- Handoffs have no boss
- Pass a summary, not everything