Skip to main content

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
For production deployments, PostgreSQL or Redis are recommended. See Storage Options for detailed configuration.

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.

Memory Types

Storage Backends

Storage Integrations

Browse All Memory Storage Backends

SQLite, PostgreSQL, Redis, MongoDB, Mem0, In-Memory, JSON — plus async variants for all backends.