DynamoDB
Serverless state storage with AWS DynamoDB.Setup
Usage
Configuration
| Option | Description |
|---|---|
table_name | DynamoDB table name |
region | AWS region |
ttl_attribute | TTL attribute name (optional) |
AWS DynamoDB state store for PraisonAI
pip install boto3
export AWS_ACCESS_KEY_ID=your_key
export AWS_SECRET_ACCESS_KEY=your_secret
export AWS_REGION=us-east-1
from praisonai.persistence.factory import create_state_store
store = create_state_store(
"dynamodb",
table_name="praisonai-state",
region="us-east-1"
)
store.set("session:123", {"messages": [], "context": {}})
state = store.get("session:123")
| Option | Description |
|---|---|
table_name | DynamoDB table name |
region | AWS region |
ttl_attribute | TTL attribute name (optional) |