Checkpointing & ask_user
Beakr runs two checkpointers at two different granularities. Super-step checkpoints let a mid-run graph pause for user input and resume exactly where it left off. Thread checkpoints let a whole conversation survive a provider swap or a service restart.
Why this matters
Without checkpointing, a crash means restarting the whole workflow, a user-input pause can lose context, and long tasks become fragile. With checkpointing, the agent behaves more like a stateful program than a one-shot model call: it can pause, wait, resume, and continue from a known state.
Two levels
The DB checkpointer fires after every super-step, capturing channel snapshots so the graph can pause mid-run and resume at the exact same point. The thread checkpointer fires once at run end, compressing the full conversation so the next run starts with context intact -- even across provider swaps or service restarts.
ask_user blocking flow
When an agent needs input, it calls ask_user with blocking mode. The graph checkpoints its state, sends a sentinel to the frontend, and stops. When the user responds, the system restores the checkpoint, replaces the sentinel with the actual answer, and resumes the graph from the same super-step -- no context lost, no re-execution.