Overview
Memory enables agents to remember conversations and learn about users across sessions. It maintains chat history, generates summaries, and builds user profiles for personalized interactions. Memory separates saving from loading: save flags control what is persisted to storage, while load flags control what is injected into subsequent runs. This allows fine-grained control — for example, saving full chat history while only injecting summaries to reduce token usage.Installation
Memory requires a storage backend to persist data. Choose the storage option that fits your deployment needs.Example: Setting up Memory with SQLiteFor local development and testing, use SQLite storage:Other storage options:
[redis-storage]- Redis for distributed, high-performance systems[postgres-storage]- PostgreSQL for production, multi-node deployments[mongo-storage]- MongoDB for document-based, scalable systems[mem0-storage]- Mem0 Platform integration
Key Features
- Conversation History: Persist complete chat history across sessions
- Session Summaries: Auto-generate condensed conversation summaries
- User Profiles: Extract and learn user traits from interactions
- Save/Load Separation: Independently control what is saved vs. what is injected into context
- Multiple Storage Backends: SQLite, Redis, PostgreSQL, MongoDB, or in-memory
- Shared Storage: Same storage backend can be used by both Memory and KnowledgeBase for unified persistence
- Sync & Async Support: Both synchronous and asynchronous storage operations
- HITL Checkpointing: Automatic checkpoint saving for Human-in-the-Loop resumption
Quick Start
Save vs Load Flags
Each memory type has a save flag and a load flag. By default, the load flag mirrors the save flag.| Save Flag | Load Flag | Purpose |
|---|---|---|
full_session_memory | load_full_session_memory | Chat history |
summary_memory | load_summary_memory | Session summaries |
user_analysis_memory | load_user_analysis_memory | User profiles |
Memory Types
| Type | Purpose | Requires |
|---|---|---|
| Conversation Memory | Full chat history persistence | session_id |
| Summary Memory | Condensed session summaries | session_id, model |
| User Analysis Memory | User profile extraction | user_id, model |
Storage Backends
| Backend | Use Case | Persistence |
|---|---|---|
SqliteStorage | Local development, single-node | File-based |
RedisStorage | Distributed, high-performance | In-memory + optional persist |
PostgresStorage | Production, multi-node | Database |
MongoStorage | Document-based, scalable | Database |
InMemoryStorage | Testing, ephemeral | None |
Storage Integrations
Browse All Memory Storage Backends
SQLite, PostgreSQL, Redis, MongoDB, Mem0, In-Memory, JSON — plus async variants for all backends.
Navigation
- Memory Attributes - All configuration options
- Choosing Memory Types - Select the right memory for your use case
- Memory Types - Conversation, Summary, User Analysis
- Examples - Working examples

