Persistence and human-in-the-loop
Persistence and human-in-the-loop
A graph compiled with a checkpointer writes its state to storage after every step, filed under a thread_id. That sounds like a small feature and it is the one that turns a script into a service. The same run can be continued in a later HTTP request, from a different worker, after a deploy. And because the state on disk is complete, a run can stop in the middle of a node, wait for a human for as long as it takes, and carry on from the same line of code with the human's answer in hand.
Relay's escalation is the natural place for that pause. The model may decide a ticket needs a person, but a support lead should confirm before a customer gets an "escalated" email. The graph should propose, stop, and resume only when someone approves.
Continue reading
Pro unlocks every video lesson, the full notes and runnable code across the Python with AI course, from the language itself to agents, MCP, Langfuse and deployment.