Agent Checkpointing & Rollback
TheCheckpointManager saves agent state after each tool roundtrip, enabling rollback to any previous point in a run.
Configuration
Checkpoint Data
Each checkpoint captures:messages— the full conversation history at that pointtokenUsage— cumulative token usagesessionState— the agent’s session stateroundtrip— which roundtrip this checkpoint was taken aftertimestamp— when the checkpoint was created
REST Endpoints
| Endpoint | Method | Description |
|---|---|---|
/agents/:name/checkpoints?runId=X | GET | List checkpoints for a run |
/agents/:name/rollback/:checkpointId | POST | Rollback to a checkpoint |
Programmatic Usage
Storage
By default, checkpoints use in-memory storage. For persistence, pass anyStorageDriver: