Redis Agent Memory
Store agent memory for AI applications in Redis.
What is Redis Agent Memory?
Redis Agent Memory is a memory service for AI applications. It stores ordered conversation events in session memory and durable information in long-term memory.
When enabled, automatic summarization compacts session memory by summarizing older events while retaining recent events in full. Redis Agent Memory extracts long-term memories automatically from session events.
Access Redis Agent Memory through the Python and TypeScript SDKs or its REST API. It works with any agent framework or LLM provider.
Why use Redis Agent Memory?
- Context-aware conversations: Store ordered conversation events with their actor, role, timestamp, and metadata, then retrieve them by session ID. Configure session expiration to control how long the conversation is retained.
- Automatic session summarization: Automatically summarize older conversation events while retaining recent messages in full.
- Automatic long-term memory: Automatically extract durable information from session events in the background. You can also create long-term memories directly from external data.
- Sensitive-data exclusions: Guide automatic extraction away from specified categories of information that should not be kept in long-term memory.
- Relevant retrieval: Search long-term memory using semantic, keyword, or hybrid search.
- Multi-session recall: Retrieve relevant memories across conversations and filter results by owner, session, namespace, topic, or memory type.
- Custom memory types: Define memory types for your business domain, with structured fields and instructions that control what Redis Agent Memory extracts.
Two-tier memory model
Redis Agent Memory provides two memory tiers:
Session memory
Stores the ordered events and metadata for a conversation.
- Configurable retention: Set a TTL to control how long session events are retained.
- Automatic summarization: Condense older events after a configured threshold while retaining recent events in full, reducing the conversation history sent to the model's context window.
Long-term memory
Stores durable information that can be retrieved across sessions using semantic, keyword, or hybrid search.
- Automatic extraction: Process session events asynchronously and store important information with vector embeddings and metadata.
- Custom memory types: Define domain-specific memories with structured fields and extraction instructions.
- Sensitive-data exclusions: Guide automatic extraction away from specified sensitive information.
- Direct memory creation: Create memories through the API or import knowledge from external sources.
- Configurable retention: Set a separate TTL for long-term memories.
Example: Travel planning agent
Consider a travel agent helping a user plan a trip:
User: I'm planning a trip to Japan next month and need help finding some restaurants for the trip.
Agent: Nice! What cities are you visiting?
User: I'm going to Tokyo and Kyoto. Also, I'm a vegetarian.
Agent: Good to know! I'll help you find some vegetarian-friendly restaurants in Tokyo and Kyoto.
Session memory
Stores an ordered sequence of events under a session ID, including each event's role, content, timestamps, and metadata. Before the next agent turn, the application can retrieve the session to reconstruct the conversation context.
Automatic session summarization
Summarizes older events after the configured threshold while retaining recent messages in full. The application can provide relevant conversation history to the agent without filling the model's context window with every original event.
Automatic long-term memory extraction
Extracts durable information in the background, such as "The user is vegetarian." Later sessions can retrieve it after the original session expires.
Custom memory types
Stores domain-specific information in a custom trip_preference type with fields such as destination, travel_period, and dietary_requirement.
Get started with Redis Agent Memory
Get started with Redis Agent Memory on Redis Cloud or join the private preview for Redis Software.
Redis Cloud
Create a managed Redis Agent Memory service and make your first requests.
Redis Software private preview
Deploy Redis Agent Memory on Kubernetes with Redis Software.
Choose a quickstart
After your Redis Agent Memory service is ready, choose a client. Each quickstart follows the same travel planning scenario through session memory, automatic extraction, summarization, custom memory types, and sensitive-data exclusions.
TypeScript SDK
Explore the Redis Agent Memory workflow with the TypeScript SDK.
For shared integration concepts, identifiers, and authentication, see the Redis Agent Memory developer guide.