{
  "schema_version": 2,
  "id": "develop/ai/context-engine/agent-memory",
  "title": "Redis Agent Memory",
  "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/",
  "summary": "Store agent memory for AI applications in Redis.",
  "aliases": [
    "/develop/ai/agent-memory/"
  ],
  "tags": [
    "docs",
    "develop",
    "ai"
  ],
  "last_updated": "2026-10-05T20:57:56-07:00",
  "children": [
    {
      "id": "develop/ai/context-engine/agent-memory/overview",
      "summary": "How Redis Agent Memory's session and long-term memory tiers work, and what runs automatically in the background.",
      "title": "Redis Agent Memory overview",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/overview/"
    },
    {
      "id": "develop/ai/context-engine/agent-memory/developer-guide",
      "summary": "Connect an application to Redis Agent Memory and work with session memory and long-term memory through Python, TypeScript, or REST.",
      "title": "Redis Agent Memory developer guide",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/developer-guide/"
    },
    {
      "id": "develop/ai/context-engine/agent-memory/python-sdk-quickstart",
      "summary": "Explore session memory, automatic extraction, summarization, custom memory types, and sensitive-data exclusions with the Redis Agent Memory Python SDK.",
      "title": "Redis Agent Memory Python SDK quickstart",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/python-sdk-quickstart/"
    },
    {
      "id": "develop/ai/context-engine/agent-memory/typescript-sdk-quickstart",
      "summary": "Explore session memory, automatic extraction, summarization, custom memory types, and sensitive-data exclusions with the Redis Agent Memory TypeScript SDK.",
      "title": "Redis Agent Memory TypeScript SDK quickstart",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart/"
    },
    {
      "id": "develop/ai/context-engine/agent-memory/rest-api-quickstart",
      "summary": "Explore session memory, automatic extraction, summarization, custom memory types, and sensitive-data exclusions with the Redis Agent Memory REST API.",
      "title": "Redis Agent Memory REST API quickstart",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/rest-api-quickstart/"
    },
    {
      "id": "develop/ai/context-engine/agent-memory/interactive-demo",
      "summary": "Watch session memory and long-term memory change as a customer talks to an AI assistant, then see what the assistant recalls in a later conversation.",
      "title": "Redis Agent Memory interactive demo",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/interactive-demo/"
    },
    {
      "id": "develop/ai/context-engine/agent-memory/api-reference",
      "summary": "",
      "title": "Redis Agent Memory API",
      "url": "https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/api-reference/"
    }
  ],
  "page_type": "content",
  "content_hash": "2c0fb3843f22e480a9b2aa29c3c95679413f7aeb8ca41b004a71b0df6654c577",
  "sections": [
    {
      "id": "what-is-redis-agent-memory",
      "title": "What is Redis Agent Memory?",
      "role": "overview",
      "text": "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.\n\nWhen 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.\n\nAccess Redis Agent Memory through the Python and TypeScript SDKs or its REST API. It works with any agent framework or LLM provider.\n\n<div class=\"grid grid-cols-1 md:grid-cols-4 gap-6 my-8\">\n  \n  \n  \n  \n</div>"
    },
    {
      "id": "why-use-redis-agent-memory",
      "title": "Why use Redis Agent Memory?",
      "role": "content",
      "text": "* **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.\n* **Automatic session summarization:** Automatically summarize older conversation events while retaining recent messages in full.\n* **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.\n* **Sensitive-data exclusions:** Guide automatic extraction away from information that should not be kept in long-term memory.\n* **Relevant retrieval:** Search long-term memory using semantic, keyword, or hybrid search.\n* **Multi-session recall:** Retrieve relevant memories across conversations and filter results by owner, session, namespace, topic, or memory type.\n* **Custom memory types:** Define memory types for your business domain, with structured fields and instructions that control what Redis Agent Memory extracts."
    },
    {
      "id": "two-tier-memory-model",
      "title": "Two-tier memory model",
      "role": "content",
      "text": "Redis Agent Memory provides two memory tiers:\n\n<div class=\"grid grid-cols-1 md:grid-cols-2 gap-6 my-6\">\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h3 class=\"text-redis-ink-900 font-semibold mb-3\">Session memory</h3>\n    <p>Stores the ordered events and metadata for a conversation.</p>\n    <ul class=\"space-y-2\">\n      <li><strong>Configurable retention:</strong> Set a time-to-live (TTL) to control how long session events are retained.</li>\n      <li><strong>Automatic summarization:</strong> Condense older events after a configured threshold while retaining recent events in full, reducing the conversation history sent to the model's context window.</li>\n    </ul>\n  </div>\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h3 class=\"text-redis-ink-900 font-semibold mb-3\">Long-term memory</h3>\n    <p>Stores durable information that can be retrieved across sessions using semantic, keyword, or hybrid search.</p>\n    <ul class=\"space-y-2\">\n      <li><strong>Automatic extraction:</strong> Process session events asynchronously and store important information with vector embeddings and metadata.</li>\n      <li><strong>Custom memory types:</strong> Define domain-specific memories with structured fields and extraction instructions.</li>\n      <li><strong>Sensitive-data exclusions:</strong> Guide automatic extraction away from specified sensitive information.</li>\n      <li><strong>Direct memory creation:</strong> Create memories through the API or import knowledge from external sources.</li>\n      <li><strong>Configurable retention:</strong> Set a separate TTL for long-term memories.</li>\n    </ul>\n  </div>\n</div>\n\nTo watch both tiers change during a conversation, try the [interactive demo](https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/interactive-demo)."
    },
    {
      "id": "example-travel-planning-agent",
      "title": "Example: Travel planning agent",
      "role": "example",
      "text": "Consider a travel agent helping a user plan a trip:\n\n[code example]\n\n<div class=\"grid grid-cols-1 md:grid-cols-2 gap-6 my-6\">\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h4 class=\"text-redis-ink-900 font-semibold mb-3\">Session memory</h4>\n    <p>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.</p>\n  </div>\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h4 class=\"text-redis-ink-900 font-semibold mb-3\">Automatic session summarization</h4>\n    <p>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.</p>\n  </div>\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h4 class=\"text-redis-ink-900 font-semibold mb-3\">Automatic long-term memory extraction</h4>\n    <p>Extracts durable information in the background, such as \"The user is vegetarian.\" Later sessions can retrieve it after the original session expires.</p>\n  </div>\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h4 class=\"text-redis-ink-900 font-semibold mb-3\">Custom memory types</h4>\n    <p>Stores domain-specific information in a custom <code>trip_preference</code> type with fields such as <code>destination</code>, <code>travel_period</code>, and <code>dietary_requirement</code>.</p>\n  </div>\n</div>"
    },
    {
      "id": "get-started",
      "title": "Get started with Redis Agent Memory",
      "role": "content",
      "text": "Get started with Redis Agent Memory on Redis Cloud or join the private preview for Redis Software.\n\n<div class=\"grid grid-cols-1 md:grid-cols-2 gap-6 my-8\">\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h3 class=\"text-redis-ink-900 font-semibold mb-3\">Redis Cloud</h3>\n    <p>Create a managed Redis Agent Memory service and make your first requests.</p>\n    <p><a href=\"https://redis.io/docs/latest/operate/iris/agent-memory/create-service\">Open the Redis Cloud setup guide</a></p>\n  </div>\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h3 class=\"text-redis-ink-900 font-semibold mb-3\">Redis Software private preview</h3>\n    <p>Deploy Redis Agent Memory on Kubernetes with Redis Software.</p>\n    <p><a href=\"https://redis.io/docs/latest/operate/iris/agent-memory/self-managed\">Open the self-managed deployment guide</a></p>\n  </div>\n</div>"
    },
    {
      "id": "choose-a-quickstart",
      "title": "Choose a quickstart",
      "role": "content",
      "text": "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.\n\n<div class=\"grid grid-cols-1 md:grid-cols-3 gap-6 my-6\">\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h3 class=\"text-redis-ink-900 font-semibold mb-3\">Python SDK</h3>\n    <p>Explore the Redis Agent Memory workflow with the Python SDK.</p>\n    <p><a href=\"https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/python-sdk-quickstart\">Open the Python quickstart</a></p>\n  </div>\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h3 class=\"text-redis-ink-900 font-semibold mb-3\">TypeScript SDK</h3>\n    <p>Explore the Redis Agent Memory workflow with the TypeScript SDK.</p>\n    <p><a href=\"https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart\">Open the TypeScript quickstart</a></p>\n  </div>\n  <div class=\"p-5 border border-redis-pen-300 rounded-lg\">\n    <h3 class=\"text-redis-ink-900 font-semibold mb-3\">REST API</h3>\n    <p>Explore the Redis Agent Memory workflow with <code>curl</code>.</p>\n    <p><a href=\"https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/rest-api-quickstart\">Open the REST API quickstart</a></p>\n  </div>\n</div>\n\nFor shared integration concepts, identifiers, and authentication, see the [Redis Agent Memory developer guide](https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/developer-guide).\n\nTo generate a complete conversational agent that uses Agent Memory, open the [AI agent builder](https://redis.io/docs/latest/develop/ai/agent-builder) and select **Redis Iris Conversational Assistant**."
    }
  ],
  "examples": [
    {
      "id": "example-travel-planning-agent-ex0",
      "language": "text",
      "code": "User: I'm planning a trip to Japan next month and need help finding some restaurants for the trip.\nAgent: Nice! What cities are you visiting?\nUser: I'm going to Tokyo and Kyoto. Also, I'm a vegetarian.\nAgent: Good to know! I'll help you find some vegetarian-friendly restaurants in Tokyo and Kyoto.",
      "section_id": "example-travel-planning-agent"
    }
  ]
}
