How justinram11/langgraph-checkpoint-dynamodb works
Project type and purpose
• This is an open-source Python library (a LangGraph “CheckpointSaver” plugin) that implements checkpoint and write persistence on AWS DynamoDB.
• Its sole responsibility is to provide a drop-in saver for LangGraph workflows, storing checkpoint metadata and per-task write records in two DynamoDB tables.
File structure
• Top-level files:
• setup.py / requirements.txt → packaging and dependencies (e.g., boto3)
• README.md → high-level usage and AWS resource requirements
• Package directory (langgraph_checkpoint_dynamodb):
• __init__.py → exposes DynamoDBSaver
• saver.py → core logic for checkpoints
• write.py → logic for persisting individual write records
Key architecture from README
• Two DynamoDB tables (“checkpoints” and “writes”)
• Optional custom AWS client configuration (region, keys)
• Integration point: user passes DynamoDBSaver into workflow.compile()
Main components
a. LangGraph Workflow (client application)
b. DynamoDBSaver library (Python module)
• Saver component (saver.py)
• Write component (write.py)
• AWS SDK / DynamoDB client (boto3)
c. AWS DynamoDB service
• Checkpoints Table
• Writes Table
d. Optional: Client Configuration object (region, credentials)
Relationships and data flow
• LangGraph Workflow invokes DynamoDBSaver API →
• DynamoDBSaver uses boto3 client →
• PutItem calls to CheckpointsTable
• PutItem/BatchWriteItem calls to WritesTable
Architectural patterns & design principles
• Adapter/Plugin pattern: DynamoDBSaver implements a CheckpointSaver interface.
• Dependency Injection: Supports passing in custom client configuration.
• Single Responsibility: saver.py handles checkpoint metadata; write.py handles per-task writes.
Putting it all together
• Top layer: LangGraph Workflow
• Middle layer: DynamoDBSaver library
• Internal layers: saver.py, write.py
• AWS SDK client
• Bottom layer: AWS DynamoDB (two tables)
• Optional side-input: ClientConfig object injected into SDK client