Skip to main content

Agent Checkpointing & Rollback

The CheckpointManager 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 point
  • tokenUsage — cumulative token usage
  • sessionState — the agent’s session state
  • roundtrip — which roundtrip this checkpoint was taken after
  • timestamp — when the checkpoint was created

REST Endpoints

Programmatic Usage

Storage

By default, checkpoints use in-memory storage. For persistence, pass any StorageDriver: