handoff-graphOct 2026
Agent orchestration · Python · LangGraph · FastAPI · Claude
Question: when an agent has to follow rules, where should they live: in the prompt, in the shape of the graph, or in a guard that checks every tool call?
A card-support agent in LangGraph: intent routing, context carried across turns by the checkpointer, an identity-verification gate, a guard that checks each proposed tool call against the policy, and a human handoff that pauses with interrupt() and files the ticket only after a person accepts. It's graded on what happened to the accounts, plus an independent audit of the action log that doesn't trust the guard.
Findings, on scripted planners with known behaviour: with a careful planner every design scores 40/40, so a demo can't tell them apart. With an eager one, the full graph still scored 40/40 because the guard stopped eight actions, while taking out the gate and the guard let it break policy in 12 of 40 conversations.
Eager planner · conversations passed of 40
- 8actions the guard stopped: four over-limit disputes became handoffs, four out-of-window disputes became explanations
- 39 / 40routing accuracy; "How long does a dispute take?" goes to the wrong intent, left in as the first case for an LLM router