Skip to main content
Storage backends persist agent sessions, chat history, and state. Use any database that fits your infrastructure.

Supported Databases

Examples by Database

PostgreSQL

Production-ready persistence.
cookbook/06_storage/postgres/postgres_for_agent.py

SQLite

Simple local persistence.
cookbook/06_storage/sqlite/sqlite_for_agent.py

MongoDB

Document-based storage.
cookbook/06_storage/mongo/mongodb_for_agent.py

Redis

High-speed caching.
cookbook/06_storage/redis/redis_for_agent.py

DynamoDB

AWS serverless storage.
cookbook/06_storage/dynamodb/dynamo_for_agent.py

Firestore

GCP serverless storage.
cookbook/06_storage/firestore/firestore_for_agent.py

In-Memory

For testing and development.
cookbook/06_storage/in_memory/in_memory_storage_for_agent.py

Storage for Teams and Workflows

Storage works the same way for teams and workflows.

Team Storage

cookbook/06_storage/postgres/postgres_for_team.py

Workflow Storage

cookbook/06_storage/postgres/postgres_for_workflow.py

Run Examples