Skip to content

Commit 7e3faa2

Browse files
Merge pull request #3336 from redis/DOC-6613
RC/AI: Context Retriever
2 parents 8a5ed39 + 7d00849 commit 7e3faa2

22 files changed

Lines changed: 328 additions & 2 deletions

content/develop/ai/context-engine/agent-memory/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ categories:
88
description: Store agent memory for AI applications in Redis.
99
linkTitle: Agent Memory
1010
hideListLinks: true
11-
weight: 10
11+
weight: 20
1212
bannerText: Redis Agent Memory is currently available in preview. Features and behavior are subject to change.
1313
bannerChildren: true
1414
---
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
Title: Redis Context Retriever
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- develop
7+
- ai
8+
description: Expose tools to Agents to query your Redis databases.
9+
linkTitle: Context Retriever
10+
hideListLinks: true
11+
weight: 30
12+
bannerText: Redis Context Retriever is currently available in preview. Features and behavior are subject to change.
13+
bannerChildren: true
14+
---
15+
16+
Redis Context Retriever helps teams expose operational context to AI agents through schema-first retrieval. It models the entities, fields, keys, and relationships that matter to an agent workflow, then presents that context through a governed tool surface the agent can call at runtime. Context Retriever helps an AI Agent understand what business objects exist, how they connect, and which paths are safe to use.
17+
18+
## Overview
19+
20+
Production agents fail not because the model is wrong, but because the context layer breaks. Enterprise data can be fragmented across multiple different databases, and can be disorganized. Teams try to patch this with text-to-SQL, OpenAPI-to-MCP wrappers, or hand-built tools — which works for demos but creates tool zoo sprawl, SQL risk, and agents that can't reliably choose the right path in production. Redis Context Retriever gives teams a governed, schema-first surface agents can traverse safely.
21+
22+
When you set up Redis Context Retriever, you model the objects that matter to your agent workflow and connect the relationships between them. You can do this either through the UI, using the [Context Surfaces Python Client](https://pypi.org/project/context-surfaces/), or the `ctxctl` CLI (available when you install the python client). Context Retriever will use those relationships to automatically create and deploy retrieval tools from your entity model.
23+
24+
When an agent needs context during execution, it calls the MCP tools Context Retriever exposes. Instead of guessing which tool to use, or generating SQL, the agent follows the defined entity paths and gets back structured, live, operational context.
25+
26+
## Get started with Redis Context Retriever
27+
28+
Get started with Redis Context Retriever on Redis Cloud or join the private preview for Redis Software.
29+
30+
{{< multitabs id="context-retriever-get-started"
31+
tab1="Redis Cloud"
32+
tab2="Redis Software (private preview)" >}}
33+
34+
{{< embed-md "rc-context-retriever-get-started.md" >}}
35+
36+
-tab-sep-
37+
38+
Contact your Redis representative or [contact sales](https://redis.com/contact-sales/) to join the private preview on Redis Software.
39+
40+
{{< /multitabs >}}
41+

content/develop/ai/context-engine/langcache/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ categories:
88
description: Store LLM responses for AI apps in a semantic cache.
99
linkTitle: LangCache
1010
hideListLinks: true
11-
weight: 30
11+
weight: 10
1212
bannerText: LangCache is currently available in preview. Features and behavior are subject to change.
1313
bannerChildren: true
1414
aliases:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
To set up a Redis Context Retriever on Redis Cloud, you need a database on Redis Cloud that already has relevant data. If you use a relational database, use [Redis Data Integration (RDI)]({{< relref "/operate/rc/databases/rdi" >}}) to ingest data into a Redis Cloud database.
2+
3+
When you have a database, [Create a context retriever service]({{< relref "/operate/rc/context-engine/context-retriever/create-service" >}}) for your database on Redis Cloud.
4+
5+
After you set up Context Retriever, you can [view your service]({{< relref "/operate/rc/context-engine/context-retriever/view-service" >}}). See the [Context Surfaces Python Client](https://pypi.org/project/context-surfaces/) for more information on how to call your tools.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
alwaysopen: false
3+
categories:
4+
- docs
5+
- operate
6+
- rc
7+
description: Expose schema-first retrieval tools from your Redis Cloud data to AI agents.
8+
hideListLinks: true
9+
linktitle: Context Retriever
10+
title: Redis Context Retriever on Redis Cloud
11+
weight: 37
12+
bannerText: Redis Context Retriever on Redis Cloud is currently available in preview. Features and behavior are subject to change.
13+
bannerChildren: true
14+
---
15+
16+
Redis Context Retriever helps teams expose operational context to AI agents through schema-first retrieval. It models the entities, fields, keys, and relationships that matter to an agent workflow, then presents that context through a governed tool surface the agent can call at runtime. Context Retriever helps an AI agent understand what business objects exist, how they connect, and which paths are safe to use.
17+
18+
When you set up Redis Context Retriever, you model the objects that matter to your agent workflow and connect the relationships between them. You can do this through the UI, the [Context Surfaces Python Client](https://pypi.org/project/context-surfaces/), or the `ctxctl` CLI (available when you install the Python client). Context Retriever uses those relationships to automatically create and deploy retrieval tools from your entity model.
19+
20+
When an agent needs context during execution, it calls the MCP tools Context Retriever exposes. Instead of guessing which tool to use or generating SQL, the agent follows the defined entity paths and gets back structured, live, operational context.
21+
22+
For more details, see the [Redis Context Retriever overview]({{< relref "/develop/ai/context-engine/context-retriever" >}}).
23+
24+
## Get started with Context Retriever on Redis Cloud
25+
26+
{{< embed-md "rc-context-retriever-get-started.md" >}}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
alwaysopen: false
3+
categories:
4+
- docs
5+
- operate
6+
- rc
7+
description: Create a Context Retriever service in Redis Cloud to expose schema-first retrieval tools to AI agents.
8+
hideListLinks: true
9+
linktitle: Create service
10+
title: Create a Context Retriever service
11+
weight: 5
12+
---
13+
14+
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.
15+
16+
## Prerequisites and limitations
17+
18+
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]({{< relref "/operate/rc/databases/create-database" >}}). If your source data lives in a relational database, use [Redis Data Integration (RDI)]({{< relref "/operate/rc/databases/rdi" >}}) to ingest it into a Redis Cloud database first.
19+
20+
{{< note >}}
21+
Agent Memory does not support the following databases during public preview:
22+
- [Redis Flex]({{< relref "operate/rc/databases/create-database/create-flex-database">}}) databases
23+
- [Active-Active]({{< relref "/operate/rc/databases/active-active" >}}) databases
24+
{{< /note >}}
25+
26+
## Create a Context Retriever service
27+
28+
From the [Redis Cloud console](https://cloud.redis.io/), select **Context Retriever** from the left-hand menu.
29+
30+
If 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.
31+
32+
{{<image filename="images/rc/langcache-new-service.png" alt="The New service button." width="150px" >}}
33+
34+
From here, you can either:
35+
36+
- 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/context-surfaces/).
37+
- Select **Create custom service** to manually configure your own context retriever settings.
38+
39+
For this guide, select **Create custom service**.
40+
41+
### General settings
42+
43+
The **General settings** section defines basic properties of your service.
44+
45+
{{<image filename="images/rc/context-retriever-general-settings.png" alt="The General settings section." >}}
46+
47+
| Setting name | Description |
48+
|:-------------|:------------|
49+
| **Service name** | Enter a name for your Context Retriever service. We recommend you use a name that describes your service's purpose. |
50+
| **Select database** | Select the Redis Cloud database to use for this service from the list. |
51+
| **Description** | Enter a description for your context retriever. |
52+
53+
Select **Entities** to continue.
54+
55+
### Define entities
56+
57+
In the **Define Entities** step, you'll define the objects that Context Retriever will use to generate retrieval tools.
58+
59+
{{<image filename="images/rc/context-retriever-define-entities.png" alt="The Entities section." >}}
60+
61+
Select **Add Entity** to add an entity.
62+
63+
{{<image filename="images/rc/context-retriever-define-entities-table.png" alt="The Entity table with the Entity Name, Key template, and description." >}}
64+
65+
- In the **Entity name** field, enter the name of one of the business objects that is in your database.
66+
67+
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".
68+
69+
- 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.
70+
71+
For the example above, the key template would be `product:{id}`.
72+
73+
- You can also enter a description to describe the entity.
74+
75+
- Select the checkmark to confirm the entity.
76+
77+
After you are done adding all of the entities, select **Fields** to continue.
78+
79+
### Configure fields
80+
81+
In the **Configure fields** step, you'll define the fields of each entity and the relationships between them.
82+
83+
From here, you can either:
84+
85+
- Select **Auto-detect fields** to scan your database automatically using a model that will detect the fields for you.
86+
87+
You'll need to agree to let the model scan your key names and schemas to automatically populate the fields.
88+
89+
{{< note >}}
90+
If you use Auto-detect fields, make sure that the fields and relationships that the model generates are accurate.
91+
{{< /note >}}
92+
93+
- Select **Manually enter fields** to manually enter the fields yourself.
94+
95+
{{<image filename="images/rc/context-retriever-fields.png" alt="The Configure fields step." >}}
96+
97+
Expand each entry to view the currently defined fields for that entry. Select **Add field** to add a field.
98+
99+
{{<image filename="images/rc/context-retriever-add-field.png" alt="The Add field table." >}}
100+
101+
- Enter the field name in the **Field** cell.
102+
- Select the **PK** checkbox if the field is a primary key. You must have at least one primary key.
103+
- 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. For example, you might have an
104+
- Select the field's **Type** from the dropdown.
105+
- In the **Index** cell, select one or more index types to enable searching and filtering on that field.
106+
- You can also add a description in the **Description** cell.
107+
108+
After you set all fields for all of your entities, select **Create** to create your Context Retriever service.
109+
110+
## Next steps
111+
112+
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/context-surfaces/) for more information on how to call your tools.
113+
114+
You can also [view your service]({{< relref "/operate/rc/context-engine/context-retriever/view-service" >}}).
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
alwaysopen: false
3+
categories:
4+
- docs
5+
- operate
6+
- rc
7+
description: View and manage Context Retriever admin keys in Redis Cloud.
8+
hideListLinks: true
9+
linktitle: View admin keys
10+
title: View and manage Context Retriever admin keys
11+
weight: 25
12+
---
13+
14+
After you have [created your first Context Retriever service]({{< relref "/operate/rc/context-engine/context-retriever/create-service" >}}), you can view and manage your admin keys from the **Admin keys** tab in the **Context Retriever** section of the Redis Cloud console.
15+
16+
A Context Retriever **admin key** authorizes administrative operations against Context Retriever in your Redis Cloud account, such as creating, updating, or deleting services and their entity models. You can use it with the [Context Surfaces Python Client](https://pypi.org/project/context-surfaces/) and `cxtctl` CLI to create an Agent key and call your tools.
17+
18+
## Admin keys tab
19+
20+
From the [Redis Cloud console](https://cloud.redis.io/), select **Context Retriever** from the left-hand menu, then select the **Admin keys** tab.
21+
22+
{{<image filename="images/rc/context-retriever-admin-keys-list.png" alt="The Admin keys tab showing the list of admin keys." >}}
23+
24+
This tab shows a list of all admin keys associated with Context Retriever in your account. Here, you can generate a new admin key or remove any keys that are no longer in use. You can generate or remove admin keys at any time.
25+
26+
| Column | Description |
27+
|:-------|:------------|
28+
| **Name** | The name you assigned to the admin key when you created it. |
29+
| **Value** | An abbreviated value of the admin key. |
30+
| **Created** | The date and time the admin key was generated. |
31+
32+
## Generate a new admin key
33+
34+
To generate a new admin key:
35+
36+
1. Select **New admin key**.
37+
38+
{{<image filename="images/rc/context-retriever-new-admin-key.png" alt="The New admin key button." width=150px >}}
39+
40+
1. Enter a name for your admin key.
41+
42+
{{<image filename="images/rc/context-retriever-add-admin-key.png" alt="The Add admin key window." >}}
43+
44+
1. Select **Generate key** to generate your new admin key.
45+
46+
1. The new key will appear in a dialog box. Select **Copy** to copy the key to the clipboard.
47+
48+
{{<image filename="images/rc/context-retriever-admin-key.png" alt="The Context Retriever admin key window. Use the Copy button to save the admin key to the clipboard." width=80% >}}
49+
50+
{{<warning>}}
51+
This is the only time the value of the admin key is available. Save it to a secure location before closing the dialog box.<br/><br/>
52+
53+
If you lose the admin key value, you will need to generate a new admin key.
54+
{{</warning>}}
55+
56+
## Delete an admin key
57+
58+
To delete an admin key, select the **Delete admin key** button next to the key you want to remove.
59+
60+
{{<image filename="images/rc/icon-delete-lb.png" width="36px" alt="Delete button." >}}
61+
62+
Deleting an admin key immediately revokes any administrative operations that rely on it. This action cannot be undone.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
alwaysopen: false
3+
categories:
4+
- docs
5+
- operate
6+
- rc
7+
description: View and manage your Context Retriever service in Redis Cloud.
8+
hideListLinks: true
9+
linktitle: View service
10+
title: View and manage Context Retriever service
11+
weight: 15
12+
---
13+
14+
After you have [created your first Context Retriever service]({{< relref "/operate/rc/context-engine/context-retriever/create-service" >}}), selecting **Context Retriever** from the Redis Cloud Console menu will take you to the **Context Retriever Services** page.
15+
16+
This page displays a list of all Context Retriever services associated with your account.
17+
18+
{{<image filename="images/rc/context-retriever-service-list.png" alt="The Context Retriever service in the Context Retriever service list." >}}
19+
20+
Select your Context Retriever service from the list to view the service's details.
21+
22+
## Overview tab
23+
24+
The **Overview** tab lets you view the details of your Context Retriever service. It contains the following sections:
25+
26+
- The **Details** section provides the connection details and general settings for your Context Retriever service.
27+
- The **Entities** section shows the entities, fields, and relationships that Context Retriever exposes as tools.
28+
- The **Tools** section shows which tools are available to Agents.
29+
- The **Actions** section lets you delete your Context Retriever service.
30+
31+
### Details
32+
33+
The **Details** section provides general settings for your Context Retriever service.
34+
35+
{{<image filename="images/rc/context-retriever-view-details.png" alt="The General settings for the Context Retriever service." >}}
36+
37+
| Setting name | Description |
38+
|:-------------|:------------|
39+
| **Description** | The description of your Context Retriever service. |
40+
| **Created** | The creation date for your service. |
41+
| **Updated** | The date your service was last updated. |
42+
43+
### Entities
44+
45+
The **Entities** section shows the entities, fields, and relationships that Context Retriever uses to generate retrieval tools.
46+
47+
{{<image filename="images/rc/context-retriever-view-entities.png" alt="The Entities section for the Context Retriever service." >}}
48+
49+
Expand each entity to view its fields, primary keys, related entities, types, and indexes.
50+
51+
### Tools
52+
53+
The **Tools** section shows the tools that are available to your Agents.
54+
55+
{{<image filename="images/rc/context-retriever-view-tools.png" alt="The Entities section for the Context Retriever service." >}}
56+
57+
You can use your Agents to call your tools. For more information, see the [Context Surfaces Python Client](https://pypi.org/project/context-surfaces/)
58+
59+
### Actions
60+
61+
The **Actions** section lets you delete your Context Retriever service.
62+
63+
{{<image filename="images/rc/context-retriever-view-actions.png" alt="The actions for the Context Retriever service." >}}
64+
65+
#### Delete service
66+
67+
Deleting your Context Retriever service permanently removes the service configuration, its entity model, and the generated tools. It also immediately terminates all API keys associated with the service. Data stored in the underlying Redis Cloud database remains unaffected.
68+
69+
To delete your Context Retriever service:
70+
71+
1. Select **Delete**.
72+
73+
1. A confirmation dialog will appear. Select the checkbox to confirm that you want to delete the service.
74+
75+
1. Select **Delete** again to confirm.
76+
77+
Deleting the Context Retriever service is permanent and cannot be undone.
78+
17 KB
Loading
17 KB
Loading

0 commit comments

Comments
 (0)