Checkpoints Module
The checkpoints module provides file-level checkpointing using a shadow git repository to track and restore file changes made by agents.Installation
Features
- Automatic checkpointing before file modifications
- Rewind to any previous checkpoint
- Diff between checkpoints
- Restore files and conversation state together
Quick Start
Classes
CheckpointService
Main service for managing checkpoints.Constructor
Methods
Checkpoint
Represents a single checkpoint.Attributes
CheckpointDiff
Diff between two checkpoints.Attributes
CheckpointConfig
Configuration for checkpoint service.Attributes
CheckpointEvent
Events emitted by the checkpoint service.Usage Examples
Basic Checkpointing
With Agent
Automatic Checkpointing
Excluding Files
Best Practices
- Initialize early - Initialize checkpoint service before agent starts
- Meaningful messages - Use descriptive checkpoint messages
- Exclude large files - Exclude logs, dependencies, build artifacts
- Limit checkpoints - Set max_checkpoints to prevent disk bloat
- Regular cleanup - Delete old checkpoints periodically

