Advanced10 min
Custom Checkpointer & Store
Building your own persistence backends. BaseCheckpointSaver interface, custom Store implementations, and migration strategies.
Quick Reference
- →BaseCheckpointSaver is the abstract interface for checkpointing — implement put(), get(), and list() to use any storage backend
- →Built-in checkpointers include MemorySaver (dev only), SqliteSaver, PostgresSaver, and RedisSaver for production use
- →Custom Store implementations extend BaseStore with put(), get(), search(), and delete() for cross-thread persistent memory
- →Migration strategies: version your checkpoint schema, write forward-compatible serializers, and backfill old checkpoints lazily
- →Use async checkpoint savers (AsyncPostgresSaver) in production to avoid blocking the event loop during state persistence
The BaseCheckpointSaver Interface
Three methods, any backend
BaseCheckpointSaver is the abstract class for all LangGraph checkpointers. Implement three methods — put(), get_tuple(), and list() — to use any storage backend: DynamoDB, MongoDB, S3, Cassandra, or your own database.
The abstract interface — these are the methods you implement