LangGraph — stateful graph with checkpoint and resume
a five-node routing graph (classify branch human gate send)
classify
sets route
refund
bug
sales
human_gate
pauses without approval
send
END
durable execution — checkpoint per node
after classify: state.route = "bug"
after bug: state.ticket = "BUG-..."
at human_gate: pause, serialize state, return control
human approves: state.human_approval = true; resume from send
after send: state.output = "sent BUG-..." END
three topologies
supervisor central LLM routes to specialists
create_supervisor() or tool-call-based dispatch
swarm peer-to-peer handoffs via shared tools
no central router; lower latency; harder to reason
hierarchical supervisors of supervisors
nested subgraphs; used when scale > single graph
state is typed, immutable between nodes, serialized after every step — resume is exact