{
  "schema_version": 1,
  "id": "operate/iris/agent-memory/create-service",
  "title": "Create an Agent Memory service",
  "url": "https://redis.io/docs/latest/operate/iris/agent-memory/create-service/",
  "summary": "Create an Agent Memory service in Redis Cloud to store working and long-term memory for AI agents.",
  "tags": [
    "docs",
    "operate",
    "iris"
  ],
  "last_updated": "2026-08-07T08:57:54-07:00",
  "page_type": "content",
  "content_hash": "e5345031da34b68f3e90a16ab687c3aaddd2eff5729714eaf01416977b29a998",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Redis Agent Memory provides a persistent, structured memory layer that AI agents can use to store, retrieve, and manage contextual data across interactions. This guide walks you through creating and configuring an Agent Memory service in Redis Cloud."
    },
    {
      "id": "prerequisites-and-limitations",
      "title": "Prerequisites and limitations",
      "role": "content",
      "text": "To create a Redis Agent Memory service, you will need a Redis Cloud database. If you don't have one, see [Create a database](https://redis.io/docs/latest/operate/rc/databases/create-database).\n\n\nRedis Agent Memory does not support the following databases during public preview:\n- [Redis Flex](https://redis.io/docs/latest/operate/rc/databases/create-database/create-flex-database) databases\n- Databases using [AWS PrivateLink](https://redis.io/docs/latest/operate/rc/security/aws-privatelink) connectivity\n- [Active-Active](https://redis.io/docs/latest/operate/rc/databases/active-active) databases\n- Databases with the [default user](https://redis.io/docs/latest/operate/rc/security/access-control/data-access-control/default-user) turned off"
    },
    {
      "id": "create-an-agent-memory-service",
      "title": "Create an Agent Memory service",
      "role": "content",
      "text": "From the [Redis Cloud console](https://cloud.redis.io/), select **Agent Memory** from the left-hand menu. \n\nIf you have not already created an Agent Memory service, you'll see a page with an introduction to Agent Memory. Otherwise, select **New service** to go to the Agent Memory introduction page.\n\n![images/rc/langcache-new-service.png](https://redis.io/docs/latest/images/rc/langcache-new-service.png)\n\nFrom here: \n\n- Select **Quick create** to create a Redis Agent Memory service with default settings using your Free 30MB database. If you haven't created a Free database yet, Redis Cloud will create one and set up the Redis Agent Memory service for you.\n\n    ![images/rc/langcache-quick-create.png](https://redis.io/docs/latest/images/rc/langcache-quick-create.png)\n\n    After Redis Cloud creates your Agent Memory service, a window containing your Agent Memory service key will appear. Select **Copy** to copy the key to your clipboard.\n\n    ![images/rc/agent-memory-service-key.png](https://redis.io/docs/latest/images/rc/agent-memory-service-key.png)\n\n    \nThis is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.<br/><br/>\n\nIf you lose the service key value, you will need to [generate a new service key](https://redis.io/docs/latest/operate/iris/agent-memory/view-service#replace-service-api-key) to be able to use the Agent Memory API.\n    \n\n    After Redis Cloud creates your service, [continue with the REST API quickstart](https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/rest-api-quickstart).\n\n- If you want to customize your Redis Agent Memory service, select **Create custom**.\n\n    ![images/rc/agent-memory-custom-service.png](https://redis.io/docs/latest/images/rc/agent-memory-custom-service.png)\n\n    This takes you to the **Create Agent Memory Service** page. This page is divided into the following sections:\n\n    1. The [General settings](#general-settings) section defines basic properties of your service.\n    1. The [Memory configuration](#memory-configuration) section allows you to define the time-to-live (TTL) of your agent's memories, set how often memories are extracted, and control automatic summarization of session memory.\n    1. The [Memory types & extraction](#memory-types-and-extraction) section allows you to define custom memory types with their own extraction strategies."
    },
    {
      "id": "general-settings",
      "title": "General settings",
      "role": "content",
      "text": "The **General settings** section defines basic properties of your service.\n\n![images/rc/agent-memory-general-settings.png](https://redis.io/docs/latest/images/rc/agent-memory-general-settings.png)\n\n| Setting name          |Description|\n|:----------------------|:----------|\n| **Service name** | Enter a name for your Agent Memory service. We recommend you use a name that describes your service's purpose. |\n| **Select database** | Select the Redis Cloud database to use for this service from the list. |\n| **User for this service** | The [database access user](https://redis.io/docs/latest/operate/rc/security/access-control/data-access-control/role-based-access-control) to use for this service. Agent Memory only supports the [`default` user](https://redis.io/docs/latest/operate/rc/security/access-control/data-access-control/default-user) during public preview. |"
    },
    {
      "id": "memory-configuration",
      "title": "Memory configuration",
      "role": "content",
      "text": "The **Memory configuration** section allows you to define the time-to-live (TTL) of your agent's memories, set how often memories are extracted, and control automatic summarization of session memory.\n\n![images/rc/agent-memory-memory-configuration.png](https://redis.io/docs/latest/images/rc/agent-memory-memory-configuration.png)\n\n| Setting name          |Description|\n|:----------------------|:----------|\n| **Short-term TTL** | Defines the time-to-live (TTL) of your agent's **short-term memory** (also known as **session memory**). You can define this TTL in seconds, minutes, hours, or days. Default: 1 hour |\n| **Long-term TTL** | Defines the time-to-live (TTL) of your agent's **long-term memory**. You can define this TTL in seconds, minutes, hours, or days. Default: 365 days |\n| **Extraction cadence** | How often the extraction pipeline runs while a session is active. Leave this blank to use the default of 5 minutes, or set a value between 60 and 600 seconds to override it. |\n\n#### Automatic summarization\n\nAutomatic summarization keeps your agent sharp during long conversations by compressing older messages in a session into a summary, while keeping the most recent messages in full. This helps control the size of session memory without losing important context.\n\nUse the **Automatic summarization** toggle to enable or disable this behavior. When it is enabled, you can configure the following settings:\n\n| Setting name          |Description|\n|:----------------------|:----------|\n| **Summarize after (messages)** | The number of messages a session can hold before older messages are summarized. When a session exceeds this threshold, the oldest messages beyond the **Keep most recent** count are compressed into a summary. |\n| **Keep most recent (messages)** | The number of most recent messages that are always kept in full and never summarized. |\n\nFor example, with **Summarize after** set to 20 and **Keep most recent** set to 10, once a session reaches 20 messages, the oldest 10 messages are summarized automatically and the 10 most recent are kept in full."
    },
    {
      "id": "memory-types-and-extraction",
      "title": "Memory types & extraction",
      "role": "content",
      "text": "The **Memory types & extraction** section allows you to define custom long-term memory types with structured fields and an optional extraction strategy. Each enabled type runs independently.\n\n![images/rc/agent-memory-memory-types.png](https://redis.io/docs/latest/images/rc/agent-memory-memory-types.png)\n\n#### Custom memory types\n\nIn addition to the built-in memory types, you can define **custom memory types** to capture structured, domain-specific information from your agent's conversations. Each custom type describes a category of information you want to extract, the fields that make up that information, and an optional extraction strategy that tells the extraction pipeline how to populate it.\n\nYou can define up to **3 custom memory types**. Once you reach this limit, the **Add type** button is disabled.\n\nTo add a custom memory type, select **Add type** and configure the following settings:\n\n| Setting name          |Description|\n|:----------------------|:----------|\n| **Name** | A unique name for the custom memory type. Must start with a letter and contain only letters, numbers, hyphens, or underscores (1–64 characters). The name must be unique within the service and cannot match a built-in memory type (`semantic`, `episodic`, `message`, or `session_summary_view`). |\n| **Description** | A short description of what the memory type represents (1–200 characters). |\n| **Fields** | The structured fields that make up the memory type. See [Fields](#fields) below. |\n\n##### Fields\n\nEach custom memory type can have one or more fields that define its structured attributes. For each field, configure the following:\n\n| Setting name          |Description|\n|:----------------------|:----------|\n| **Name** | The field name. Follows the same rules as the memory type name: must start with a letter and contain only letters, numbers, hyphens, or underscores. |\n| **Type** | The field's data type. Choose from `str`, `int`, `float`, `bool`, `list[str]`, `list[float]`, or `object`. |\n| **Description** | A description of the field (1–200 characters). This description is used to guide extraction, so make it clear and specific. |\n\n##### Extraction strategy\n\nEach custom memory type can have an **extraction strategy** that controls how the extraction pipeline populates it from session messages.\n\n| Setting name          |Description|\n|:----------------------|:----------|\n| **Extraction prompt** | A natural-language prompt (up to 10,000 characters) that instructs the extraction pipeline how to identify and extract this memory type from a conversation. |\n| **Enabled** | Whether the extraction strategy is active. Enabled by default. Disable it to keep the type defined without extracting new memories for it. |"
    },
    {
      "id": "sensitive-data-exclusions",
      "title": "Sensitive-data exclusions",
      "role": "content",
      "text": "The **Sensitive-data exclusions** section lets you guide automatic extraction away from information that should not be stored in long-term memory. Semantic exclusions can match concepts that a literal pattern might not cover, such as secrets, recovery codes, and similar information.\n\n| Setting name | Description |\n|:-------------|:------------|\n| **Semantic exclusions** | Whether the extraction model applies the exclusion prompt when creating long-term memories from session events. |\n| **Exclusion prompt** | Plain-language instructions describing information that should not be kept in long-term memory. Maximum length: 2,000 characters. |\n\nFor example:\n\n[code example]\n\n\nSensitive-data exclusions are advisory and do not guarantee that information is excluded. Sensitive session content still reaches the extraction model provider. Exclusions do not apply to long-term memories created directly through the API or an SDK."
    },
    {
      "id": "create-service",
      "title": "Create service",
      "role": "content",
      "text": "When you are done setting the details of your Agent Memory service, select **Create** to create it.\n\n![images/rc/button-access-management-user-key-create.png](https://redis.io/docs/latest/images/rc/button-access-management-user-key-create.png)\n\nA window containing your Agent Memory service key will appear. Select **Copy** to copy the key to your clipboard.\n\n![images/rc/agent-memory-service-key.png](https://redis.io/docs/latest/images/rc/agent-memory-service-key.png)\n\n\nThis is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.<br/><br/>\n\nIf you lose the service key value, you will need to [generate a new service key](https://redis.io/docs/latest/operate/iris/agent-memory/view-service#replace-service-api-key) to be able to use the Redis Agent Memory API.\n\n\nIf an error occurs, verify that your database is active. For help, [contact support](https://redis.io/support/)."
    },
    {
      "id": "next-steps",
      "title": "Next steps",
      "role": "content",
      "text": "After Redis Cloud creates your service, [continue with the REST API quickstart](https://redis.io/docs/latest/develop/ai/context-engine/agent-memory/rest-api-quickstart).\n\nYou can also [view and edit the service](https://redis.io/docs/latest/operate/iris/agent-memory/view-service)."
    }
  ],
  "examples": [
    {
      "id": "sensitive-data-exclusions-ex0",
      "language": "text",
      "code": "Do not keep passwords, access tokens, recovery codes, payment card information, or booking confirmation codes in long-term memory.",
      "section_id": "sensitive-data-exclusions"
    }
  ]
}
