{
  "schema_version": 2,
  "id": "operate/iris/context-retriever/create-service",
  "title": "Create a Context Retriever service",
  "url": "https://redis.io/docs/latest/operate/iris/context-retriever/create-service/",
  "summary": "Create a Context Retriever service in Redis Cloud to expose schema-first retrieval tools to AI agents.",
  "aliases": [
    "/operate/rc/context-engine/context-retriever/create-service/"
  ],
  "tags": [
    "docs",
    "operate",
    "iris"
  ],
  "last_updated": "2026-10-05T16:11:44+01:00",
  "page_type": "content",
  "content_hash": "864ffcd0b4673fd9c08e4593c56d21fedfac213f06d9fc1c61c819278f0a6cd7",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Redis Context Retriever helps teams expose operational context to AI agents through schema-first retrieval. This guide walks you through creating and configuring a Context Retriever service in Redis Cloud."
    },
    {
      "id": "prerequisites-and-limitations",
      "title": "Prerequisites and limitations",
      "role": "content",
      "text": "To create a Redis Context Retriever service, you will need a Redis Cloud database that already has relevant data. If you don't have one, see [Create a database](https://redis.io/docs/latest/operate/rc/databases/create-database).\n\n> [!NOTE]\n> Redis Context Retriever 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> - [Active-Active](https://redis.io/docs/latest/operate/rc/databases/active-active) databases"
    },
    {
      "id": "create-a-context-retriever-service",
      "title": "Create a Context Retriever service",
      "role": "content",
      "text": "From the [Redis Cloud console](https://cloud.redis.io/), select **Context Retriever** from the left-hand menu.\n\nIf you have not already created a Context Retriever service, you'll see a page with an introduction to Context Retriever. Otherwise, select **New service** to go to the Context Retriever introduction page.\n\n![The New service button.](https://redis.io/docs/latest/images/rc/langcache-new-service.png)\n\nFrom here, you can either:\n\n- Select **Get started** to follow a step-by-step guide using the `ctxctl` CLI, which is installed with the [Context Surfaces Python Client](https://pypi.org/project/redis-context-retriever/). \n- Select **Create custom service** to manually configure your own context retriever settings.\n\nFor this guide, select **Create custom service**."
    },
    {
      "id": "general-settings",
      "title": "General settings",
      "role": "content",
      "text": "The **General settings** section defines basic properties of your service.\n\n![The General settings section.](https://redis.io/docs/latest/images/rc/context-retriever-general-settings.png)\n\n| Setting name | Description |\n|:-------------|:------------|\n| **Service name** | Enter a name for your Context Retriever 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| **Description** | Enter a description for your context retriever. |\n\nSelect **Entities** to continue."
    },
    {
      "id": "define-entities",
      "title": "Define entities",
      "role": "content",
      "text": "In the **Define Entities** step, you'll define the objects that Context Retriever will use to generate retrieval tools. \n\n![The Entities section.](https://redis.io/docs/latest/images/rc/context-retriever-define-entities.png)\n\nSelect **Add Entity** to add an entity.\n\n![The Entity table with the Entity Name, Key template, and description.](https://redis.io/docs/latest/images/rc/context-retriever-define-entities-table.png)\n\n- In the **Entity name** field, enter the name of one of the business objects that is in your database. \n\n    For example, your database might have a bunch of product information with keys like `product:1` or `product:2`. In this case, the entity name would be \"Product\".\n\n- In the **Key Template** field, enter the key template for your entity. Use `{id}` to denote where in the key pattern the ID is located.\n\n    For the example above, the key template would be `product:{id}`. \n\n- You can also enter a description to describe the entity.\n\n- Select the checkmark to confirm the entity.\n\nAfter you are done adding all of the entities, select **Fields** to continue."
    },
    {
      "id": "configure-fields",
      "title": "Configure fields",
      "role": "configuration",
      "text": "In the **Configure fields** step, you'll define the fields of each entity and the relationships between them.\n\nFrom here, you can either:\n\n- Select **Auto-detect fields** to scan your database automatically using a model that will detect the fields for you. \n\n    You'll need to agree to let the model scan your key names and schemas to automatically populate the fields. \n\n    > [!NOTE]\n    > If you use Auto-detect fields, make sure that the fields and relationships that the model generates are accurate. \n\n- Select **Manually enter fields** to manually enter the fields yourself.\n\n![The Configure fields step.](https://redis.io/docs/latest/images/rc/context-retriever-fields.png)\n\nExpand each entry to view the currently defined fields for that entry. Select **Add field** to add a field.\n\n![The Add field table.](https://redis.io/docs/latest/images/rc/context-retriever-add-field.png)\n\n- Enter the field name in the **Field** cell.\n- Select the **PK** checkbox if the field is a primary key. You must have at least one primary key. \n- If the field is related to any other defined entities, select it from the **Related Entity** dropdown. This is usually set if the field contains primary keys of another entity. \n- Select the field's **Type** from the dropdown.\n- In the **Index** cell, select one or more index types to enable searching and filtering on that field.\n- You can also add a description in the **Description** cell.\n\nAfter you set all fields for all of your entities, select **Create** to create your Context Retriever service."
    },
    {
      "id": "next-steps",
      "title": "Next steps",
      "role": "content",
      "text": "After your service is created, you can call the MCP tools Context Retriever exposes from your agent. See the [Context Surfaces Python Client](https://pypi.org/project/redis-context-retriever/) for more information on how to call your tools.\n\nYou can also [view your service](https://redis.io/docs/latest/operate/iris/context-retriever/view-service)."
    }
  ],
  "examples": []
}
