Redis Agent Memory
Store agent memory for AI applications in Redis.
Give your AI agents persistent memory and context that gets smarter over time.
Transform your AI agents from simple chatbots into intelligent assistants with Redis-powered memory that automatically learns, organizes, and recalls information across conversations and sessions.
What is Redis Agent Memory?
Redis Agent Memory is a production-ready memory system for AI agents and applications that:
- ●Remembers everything — Stores conversation history, user preferences, and important facts across sessions
- ●Finds relevant context — Uses semantic, keyword, and hybrid search to surface the right information at the right time
- ●Gets smarter over time — Automatically extracts, organizes, and deduplicates memories from interactions
- ●Works with any AI model — REST API and Python SDK compatible with any agent framework or LLM provider
Why use Redis Agent Memory?
For AI applications
- Never lose conversation context across sessions
- Provide personalized responses based on user history
- Build agents that learn and improve from interactions
- Scale from prototypes to production with authentication and multi-tenancy
For developers
- Drop-in REST API — no custom infrastructure to build or maintain
- Python SDK with tool abstractions for OpenAI and Anthropic
- Automatic memory extraction and promotion in the background
- Flexible deployment: Redis Cloud, Redis Software, or self-hosted
Quick example
Add a session event to short-term memory:
POST /v1/stores/{storeId}/session-memory/events
{
"sessionId": "abcd-efgh",
"actorId": "user-name",
"role": "USER",
"content": [
{
"text": "I'm planning a trip to Japan next month."
}
],
"createdAt": "2026-05-02T18:15:06Z",
"metadata": {
"browser": "Chrome",
"source": "web-chat"
}
}
Add long-term memories directly:
POST /v1/stores/{storeId}/long-term-memory
{
"memories": [
{
"id": "cofIXpuMmg",
"text": "The user prefers vegetarian food.",
"memoryType": "episodic",
"sessionId": "abcd-efgh",
"ownerId": "user-name"
}
]
}
See the full API and SDK examples for more.
Two-tier memory model
Redis Agent Memory uses a two-tier memory model:
- Session memory (also known as Short-term memory or Working memory) maintains the current conversation state, session history, and session-specific metadata. You can set a custom time-to-live (TTL) for session memory to control how long session data is retained.
- Long-term memory stores information extracted from past sessions, including user preferences, learned patterns, and other relevant data.
The promotion from short term memory to long-term memory is automatic. When you store a conversation event in session memory, the Agent Memory service asynchronously extracts important information using the configured extraction strategy (discrete, summary, preferences, or custom). These extracted memories are then stored as long-term memory entries with vector embeddings and metadata.
This process is non-blocking: the extraction and promotion happen in the background using a task worker, so the main agent interaction remains responsive. Users do not need to explicitly trigger promotion; it happens as a natural byproduct of storing conversation events in working memory. Users can also create long-term memories directly using the API. This is useful for bulk memory creation or for importing knowledge from external sources.
The short-term memory that is not promoted will eventually expire based on its TTL configuration. As a conversation progresses, Redis Agent Memory extracts and asynchronously stores important information into long-term memory. This process ensures responsive interactions while knowledge gradually accumulates.
Example: Memory storage during a conversation
Take this conversation between a User and an AI Travel Agent as an example:
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.
For this conversation, you could store the following information with Redis Agent Memory:
- Session Memory: The current conversation state, including the user's query, the agent's response, and the user's follow-up question. The session memory also stores session-specific metadata.
- Long-term memory: Preference and location information from the conversation, stored as text and as vector embeddings for semantic retrieval. In this case, long-term memory might store "The user is a vegetarian" and "The user is planning a trip to Japan".
Get started with Redis Agent Memory
Get started with Redis Agent Memory on Redis Cloud, join the private preview for Redis Software, or set up your own open-source Redis Agent Memory instance.
To set up Agent Memory on Redis Cloud:
- Create a database on Redis Cloud.
- Create an Agent Memory service for your database on Redis Cloud.
- Use the Agent Memory API from your client app.
After you set up Agent Memory, you can view and manage your service.