From 5c4721ad00ad7fc4611e620beb348a37cdc79efe Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Thu, 30 Jul 2026 14:20:59 +0200 Subject: [PATCH 01/14] docs: update ../agent-memory/developer-guide.md with a more precise list of available features --- .../agent-memory/developer-guide.md | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/content/develop/ai/context-engine/agent-memory/developer-guide.md b/content/develop/ai/context-engine/agent-memory/developer-guide.md index 36abc4e3af..f64c26aa30 100644 --- a/content/develop/ai/context-engine/agent-memory/developer-guide.md +++ b/content/develop/ai/context-engine/agent-memory/developer-guide.md @@ -21,13 +21,36 @@ Everything you need to start building with Redis Agent Memory — REST API refer ## What you can build -Redis Agent Memory gives your agents a two-tier memory layer available via REST API and Python SDK: +Redis Agent Memory gives your agents a two-tier memory layer available through the REST API, Python SDK, and TypeScript SDK. + +### Session memory + + + +### Long-term memory + + + +### Memory retrieval and management ## REST quickstart @@ -43,7 +66,7 @@ The guides below show how to implement agent memory patterns **directly using Re Use these guides if you prefer to self-host, want full control over the implementation, or use a language that doesn't have an Agent Memory SDK. -For the managed service, follow the [Redis Cloud REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}). +For the managed service, follow the [Redis Cloud Agent Memory REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}). {{< /note >}} Step-by-step examples for building agent memory into your application using your preferred Redis client library: @@ -60,6 +83,6 @@ Step-by-step examples for building agent memory into your application using your ## Set up authentication -Redis Cloud API requests require an Agent Memory API key and a Store ID. Send the key as a bearer token in the `Authorization` header, and include the Store ID in the request path. +Redis Cloud Agent Memory API requests require an Agent Memory API key and a Store ID. Send the key as a bearer token in the `Authorization` header, and include the Store ID in the request path. -The [Redis Cloud REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) shows how to get these values and use them in a request. +The [Redis Cloud Agent Memory REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) shows how to get these values and use them in a request. From 94fac1916a0db3f94e31cc6126d9ec061b806933 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Thu, 30 Jul 2026 14:29:28 +0200 Subject: [PATCH 02/14] docs: remove duplicate warning from ../context-engine/use-agent-memory.md --- .../rc/context-engine/agent-memory/use-agent-memory.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md index 2b8f0ccdf5..58064ee279 100644 --- a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md +++ b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md @@ -13,10 +13,6 @@ weight: 10 Use this quickstart to create an Agent Memory service on Redis Cloud and make your first REST API requests. -{{< note >}} -Redis Agent Memory on Redis Cloud is available as a public preview. Features and behavior can change before general availability. -{{< /note >}} - ## Before you begin To complete this quickstart, you need: From 8388d74125d696dc8b6700259ff3f99503e9ae85 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Thu, 30 Jul 2026 14:41:10 +0200 Subject: [PATCH 03/14] docs: updating "Save the connection values" section from ../context-engine/use-agent-memory.md with more precise terminology --- .../agent-memory/use-agent-memory.md | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md index 58064ee279..892d0a8f6a 100644 --- a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md +++ b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md @@ -44,21 +44,31 @@ For screenshots and configuration details, see [create an Agent Memory service]( ## Save the connection values 1. Open the Agent Memory service in the Redis Cloud console. -1. On the **Configuration** tab, copy the **API Base URL** and **Store ID**. -1. Export the values in your shell. Replace each placeholder with the value from Redis Cloud: +1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. +1. Export the connection values in your shell. Replace each placeholder with the value from Redis Cloud: ```sh - export AGENT_MEMORY_URL='' + export AGENT_MEMORY_ENDPOINT='' export STORE_ID='' export API_KEY='' export SESSION_ID='quickstart-session' export OWNER_ID='quickstart-user' export MEMORY_ID='quickstart-preference' ``` + +1. Define identifiers for the resources created in this quickstart: -Use the complete API base URL returned by Redis Cloud. Don't add another URL scheme, such as `https://`, to `AGENT_MEMORY_URL`. + ```sh + export SESSION_ID='quickstart-session' + export OWNER_ID='quickstart-user' + export MEMORY_ID='quickstart-preference' + ``` + +`AGENT_MEMORY_URL` must contain the complete endpoint shown in Redis Cloud, including `https://`. + +Send `API_KEY` as a bearer token in the `Authorization` header. Keep API keys out of source control, application logs, and other unsecured locations. -Send the API key as a bearer token in the `Authorization` header. Keep the key out of source control, application logs, and other unsecured locations. +`SESSION_ID`, `OWNER_ID`, and `MEMORY_ID` are example identifiers used throughout this quickstart. You can replace them with identifiers from your application. ## Add a session event From c567cd62610fb35e44fe73ddf6100f3c1dd68e79 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Thu, 30 Jul 2026 14:52:00 +0200 Subject: [PATCH 04/14] docs: updating "Add a session event" section from ../context-engine/use-agent-memory.md - curl command now returns HTTP status code - fixed URL to AddSessionEvent documentation --- .../operate/rc/context-engine/agent-memory/use-agent-memory.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md index 892d0a8f6a..31388b88bd 100644 --- a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md +++ b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md @@ -82,6 +82,7 @@ Add a user event to session memory: ```sh curl --fail-with-body --silent --show-error \ + --write-out '\nHTTP status: %{http_code}\n' \ --request POST \ --header "Authorization: Bearer $API_KEY" \ --header 'Content-Type: application/json' \ @@ -103,7 +104,7 @@ JSON A successful request returns `201 Created`. The response contains the stored event and its server-generated event ID. -For request and response details, see [`AddSessionEvent`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/session-memory/operation/AddSessionEvent" >}}). +For request and response details, see [`AddSessionEvent`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference/#tag/Session-Memory/operation/AddSessionEvent" >}}). ## Retrieve the session From 141cc2c30e28554552f523ef2c20692c4eff0298 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Thu, 30 Jul 2026 15:21:06 +0200 Subject: [PATCH 05/14] docs: updating ./context-engine/use-agent-memory.md - Adding jq to curl commands to prettify API response - Creating two long term memories to showcase semantic search more effectively - Fixing broken endpoints --- .../agent-memory/use-agent-memory.md | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md index 31388b88bd..cdfb4fbfc1 100644 --- a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md +++ b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md @@ -82,12 +82,11 @@ Add a user event to session memory: ```sh curl --fail-with-body --silent --show-error \ - --write-out '\nHTTP status: %{http_code}\n' \ --request POST \ --header "Authorization: Bearer $API_KEY" \ --header 'Content-Type: application/json' \ --data @- \ - "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/session-memory/events" <}}). +For request and response details, see [`BulkCreateLongTermMemories`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference/#tag/Long-Term-Memory/operation/BulkCreateLongTermMemories" >}}). ## Search long-term memory @@ -165,22 +171,22 @@ curl --fail-with-body --silent --show-error \ --header "Authorization: Bearer $API_KEY" \ --header 'Content-Type: application/json' \ --data @- \ - "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/long-term-memory/search" <}}). +For request and response details, see [`SearchLongTermMemory`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference/#tag/Long-Term-Memory/operation/SearchLongTermMemory" >}}). ## Next steps From bead70e440230857e59ed1739ade4955bc5af8c1 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Fri, 31 Jul 2026 13:39:38 +0200 Subject: [PATCH 06/14] docs: adding quick starts for Python and Typescript SDKs --- .../ai/context-engine/agent-memory/_index.md | 10 +- .../agent-memory/api-examples.md | 6 +- .../agent-memory/developer-guide.md | 16 +- .../agent-memory/python-sdk-quickstart.md | 266 ++++++++++++++++ .../agent-memory/typescript-sdk-quickstart.md | 285 ++++++++++++++++++ ...-agent-memory-quickstart-create-service.md | 11 + ...c-agent-memory-quickstart-prerequisites.md | 8 + .../agent-memory/use-agent-memory.md | 33 +- 8 files changed, 595 insertions(+), 40 deletions(-) create mode 100644 content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md create mode 100644 content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md create mode 100644 content/embeds/rc-agent-memory-quickstart-create-service.md create mode 100644 content/embeds/rc-agent-memory-quickstart-prerequisites.md diff --git a/content/develop/ai/context-engine/agent-memory/_index.md b/content/develop/ai/context-engine/agent-memory/_index.md index 71a6f26f43..d47194c70d 100644 --- a/content/develop/ai/context-engine/agent-memory/_index.md +++ b/content/develop/ai/context-engine/agent-memory/_index.md @@ -19,8 +19,8 @@ Transform your AI agents from simple chatbots into intelligent assistants with R
{{< image-card image="images/ai-brain.svg" alt="Quick start icon" title="REST quickstart — Create an Agent Memory service on Redis Cloud and make your first API requests" url="/operate/rc/context-engine/agent-memory/use-agent-memory" >}} - {{< image-card image="images/ai-LLM-memory.svg" alt="Use cases icon" title="API and SDK Examples — See real-world usage patterns with session events and long-term memory" url="/develop/ai/context-engine/agent-memory/api-examples" >}} - {{< image-card image="images/ai-brain-2.svg" alt="Python SDK icon" title="Python SDK — Install the redis-agent-memory package from PyPI" url="https://pypi.org/project/redis-agent-memory/" >}} + {{< image-card image="images/ai-brain-2.svg" alt="Python SDK quickstart icon" title="Python SDK quickstart — Connect to Agent Memory and make your first SDK requests" url="/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}} + {{< image-card image="images/ai-LLM-memory.svg" alt="TypeScript SDK quickstart icon" title="TypeScript SDK quickstart — Connect to Agent Memory and make your first SDK requests" url="/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}
## What is Redis Agent Memory? @@ -59,7 +59,7 @@ Redis Agent Memory is a production-ready memory system for AI agents and applica ## Quick example -Add a session event to short-term memory: +Add a session event to session memory: ```json POST /v1/stores/{storeId}/session-memory/events @@ -103,7 +103,7 @@ Follow the [Redis Cloud Agent Memory REST quickstart]({{< relref "/operate/rc/co 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. +- **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. @@ -111,7 +111,7 @@ The promotion from short term memory to long-term memory is automatic. When you 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. +The session 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 diff --git a/content/develop/ai/context-engine/agent-memory/api-examples.md b/content/develop/ai/context-engine/agent-memory/api-examples.md index a127958d85..b9307d003f 100644 --- a/content/develop/ai/context-engine/agent-memory/api-examples.md +++ b/content/develop/ai/context-engine/agent-memory/api-examples.md @@ -6,8 +6,8 @@ categories: - ai description: Learn to use the Redis Agent Memory API for agent memory and semantic memory search. hideListLinks: true -linktitle: API and SDK examples -title: Use the Redis Agent Memory API and SDK +linktitle: REST API examples +title: Use the Redis Agent Memory REST API weight: 10 --- @@ -15,7 +15,7 @@ If you're new to Agent Memory on Redis Cloud, complete the [REST quickstart]({{< The examples on this page supplement the quickstart. Use the [Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) for complete request and response schemas. -You can use any standard REST client or library to access the API. If your app is written in Python, you can also use the [Agent Memory Software Development Kit](https://pypi.org/project/redis-agent-memory/) (SDK) to access the API. +You can use any standard REST client or library to access the API. To use an SDK, follow the [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}) or [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}). ## Authentication diff --git a/content/develop/ai/context-engine/agent-memory/developer-guide.md b/content/develop/ai/context-engine/agent-memory/developer-guide.md index f64c26aa30..267f33b54d 100644 --- a/content/develop/ai/context-engine/agent-memory/developer-guide.md +++ b/content/develop/ai/context-engine/agent-memory/developer-guide.md @@ -15,8 +15,8 @@ Everything you need to start building with Redis Agent Memory — REST API refer
{{< image-card image="images/ai-brain.svg" alt="REST quickstart icon" title="REST quickstart — Create a service on Redis Cloud and make your first API requests" url="/operate/rc/context-engine/agent-memory/use-agent-memory" >}} - {{< image-card image="images/ai-cube.svg" alt="API reference icon" title="API Reference — Full OpenAPI reference for all Agent Memory endpoints" url="/develop/ai/context-engine/agent-memory/api-reference" >}} - {{< image-card image="images/ai-lib.svg" alt="Language guides icon" title="Build Your Own — Self-hosted agent memory using Redis client libraries (Python, Node.js, Go, Java, .NET, and more)" url="/develop/use-cases/agent-memory" >}} + {{< image-card image="images/ai-lib.svg" alt="Python SDK quickstart icon" title="Python SDK quickstart — Connect to Agent Memory and make your first SDK requests" url="/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}} + {{< image-card image="images/ai-lib.svg" alt="TypeScript SDK quickstart icon" title="TypeScript SDK quickstart — Connect to Agent Memory and make your first SDK requests" url="/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}
## What you can build @@ -53,11 +53,15 @@ Redis Agent Memory gives your agents a two-tier memory layer available through t
  • Multiple client options: Access session and long-term memory through the REST API, Python SDK, or TypeScript SDK, so the same memory service can be used across different application stacks.
  • -## REST quickstart +## Quickstarts -Follow the [Redis Cloud Agent Memory REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) to create a service and run complete `curl` commands for session memory and long-term memory. +Choose a client and make your first session-memory and long-term-memory requests: -After you finish the quickstart, review the [Agent Memory API examples]({{< relref "/develop/ai/context-engine/agent-memory/api-examples" >}}) and [API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). +- [REST API]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) +- [Python SDK]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}) +- [TypeScript SDK]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}) + +For complete endpoint and schema details, see the [Agent Memory API examples]({{< relref "/develop/ai/context-engine/agent-memory/api-examples" >}}) and [API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). ## Language guides @@ -66,7 +70,7 @@ The guides below show how to implement agent memory patterns **directly using Re Use these guides if you prefer to self-host, want full control over the implementation, or use a language that doesn't have an Agent Memory SDK. -For the managed service, follow the [Redis Cloud Agent Memory REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}). +For the managed service, use the REST API, Python SDK, or TypeScript SDK quickstart above. {{< /note >}} Step-by-step examples for building agent memory into your application using your preferred Redis client library: diff --git a/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md new file mode 100644 index 0000000000..8580cd104e --- /dev/null +++ b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md @@ -0,0 +1,266 @@ +--- +alwaysopen: false +categories: +- docs +- develop +- ai +description: Connect to Redis Cloud Agent Memory with the Python SDK and make session-memory and long-term-memory requests. +hideListLinks: true +linktitle: Python SDK quickstart +title: Redis Agent Memory Python SDK quickstart +weight: 7 +--- + +Use this quickstart to connect to a Redis Cloud Agent Memory service with the Python SDK. You will add and retrieve a session event, create two long-term memories, and search them by meaning. + +## Before you begin + +To complete this quickstart, you need: + +{{< embed-md "rc-agent-memory-quickstart-prerequisites.md" >}} + +You also need Python 3.10 or later. + +## Create an Agent Memory service + +{{< embed-md "rc-agent-memory-quickstart-create-service.md" >}} + +## Save the connection values + +1. Open the Agent Memory service in the Redis Cloud console. +1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. +1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). +1. Export the API key in your shell: + + ```sh + export API_KEY='' + ``` + +Keep the API key out of source control, application logs, and other unsecured locations. + +## Install the SDK + +Install the `redis-agent-memory` package: + +```sh +python -m pip install redis-agent-memory +``` + +## Create the client and check the service health + +Replace `` and `` with the values you copied from Redis Cloud. The endpoint must include `https://`. + +The client uses these values and the API key from your environment to authenticate each request. Call `health` before writing any memory to verify that the service is reachable and the API key is accepted: + +```python +import os +from datetime import datetime, timezone + +from redis_agent_memory import AgentMemory, models + + +ENDPOINT = "" +STORE_ID = "" +SESSION_ID = "quickstart-session" +USER_ID = "quickstart-user" +MEMORY_ID = "quickstart-preference" + + +def show(label, response): + print(f"{label}:") + print(response.model_dump_json(by_alias=True, indent=2)) + + +def main(): + with AgentMemory( + ENDPOINT, + store_id=STORE_ID, + api_key=os.environ["API_KEY"], + ) as agent_memory: + health = agent_memory.health() + show("Service health", health) + + +if __name__ == "__main__": + main() +``` + +The health response describes the status of the Agent Memory service. The first store request in the next step validates the Store ID. The context manager closes the SDK client after the requests finish. + +## Add a session event + +Add a user message to session memory. If the session doesn't exist, Agent Memory creates it when it stores the event. + +Add this code after the call to `health`: + +```python + event = agent_memory.add_session_event( + session_id=SESSION_ID, + actor_id=USER_ID, + role=models.MessageRole.USER, + content=[{"text": "I prefer vegetarian restaurants."}], + created_at=datetime.now(timezone.utc), + ) + show("Created event", event) +``` + +The response contains the stored event and its server-generated event ID. + +## Retrieve the session + +Retrieve the session to reconstruct its conversation history. Add this code after the call to `add_session_event`: + +```python + session = agent_memory.get_session_memory( + session_id=SESSION_ID, + ) + show("Session memory", session) +``` + +The response contains the session and its stored events, including the event added in the previous step. + +## Create long-term memories + +Create two long-term memories directly. This lets the quickstart demonstrate semantic ranking without waiting for Agent Memory to extract memories from session events. Add this code after the session retrieval: + +```python + created = agent_memory.bulk_create_long_term_memories( + memories=[ + { + "id": f"{MEMORY_ID}-0", + "text": "The user prefers cozy restaurants.", + "memory_type": "semantic", + "session_id": SESSION_ID, + "owner_id": USER_ID, + }, + { + "id": f"{MEMORY_ID}-1", + "text": "The user prefers spicy food.", + "memory_type": "semantic", + "session_id": SESSION_ID, + "owner_id": USER_ID, + }, + ], + ) + show("Created memories", created) +``` + +The response has a `created` array containing the IDs of the two long-term memories. + +## Search long-term memory + +Search by meaning and filter the results to memories associated with the example user. Add this code after the bulk create request: + +```python + results = agent_memory.search_long_term_memory( + request={ + "text": "What kind of meal does the user prefer?", + "filter_": { + "owner_id": { + "eq": USER_ID, + } + }, + "limit": 1, + }, + ) + show("Search results", results) +``` + +The response has an `items` array containing the highest-ranked matching memory. The memory about spicy food should be the strongest match for this query. + +The Python SDK uses snake case for method arguments and request fields. The serialized API requests and responses use camel case. + +## Run the quickstart + +Create `quickstart.py` from the complete example in the next section, then run it once: + +```sh +python quickstart.py +``` + +The session, user, and memory IDs are example identifiers. The example uses the same user identifier for the event's `actorId` and the long-term memory's `ownerId`. + +The example derives two fixed memory IDs from `MEMORY_ID`. Delete the existing memories or change `MEMORY_ID` before running the program again. + +## Complete example + +```python +import os +from datetime import datetime, timezone + +from redis_agent_memory import AgentMemory, models + + +ENDPOINT = "" +STORE_ID = "" +SESSION_ID = "quickstart-session" +USER_ID = "quickstart-user" +MEMORY_ID = "quickstart-preference" + + +def show(label, response): + print(f"{label}:") + print(response.model_dump_json(by_alias=True, indent=2)) + + +with AgentMemory( + ENDPOINT, + store_id=STORE_ID, + api_key=os.environ["API_KEY"], +) as agent_memory: + health = agent_memory.health() + show("Service health", health) + + event = agent_memory.add_session_event( + session_id=SESSION_ID, + actor_id=USER_ID, + role=models.MessageRole.USER, + content=[{"text": "I prefer vegetarian restaurants."}], + created_at=datetime.now(timezone.utc), + ) + show("Created event", event) + + session = agent_memory.get_session_memory( + session_id=SESSION_ID, + ) + show("Session memory", session) + + created = agent_memory.bulk_create_long_term_memories( + memories=[ + { + "id": f"{MEMORY_ID}-0", + "text": "The user prefers cozy restaurants.", + "memory_type": "semantic", + "session_id": SESSION_ID, + "owner_id": USER_ID, + }, + { + "id": f"{MEMORY_ID}-1", + "text": "The user prefers spicy food.", + "memory_type": "semantic", + "session_id": SESSION_ID, + "owner_id": USER_ID, + }, + ], + ) + show("Created memories", created) + + results = agent_memory.search_long_term_memory( + request={ + "text": "What kind of meal does the user prefer?", + "filter_": { + "owner_id": { + "eq": USER_ID, + } + }, + "limit": 1, + }, + ) + show("Search results", results) +``` + +## Next steps + +- Review the [Python SDK package and reference](https://pypi.org/project/redis-agent-memory/). +- Review the [Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). +- Try the [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}). diff --git a/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md new file mode 100644 index 0000000000..93e0ac4d4f --- /dev/null +++ b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md @@ -0,0 +1,285 @@ +--- +alwaysopen: false +categories: +- docs +- develop +- ai +description: Connect to Redis Cloud Agent Memory with the TypeScript SDK and make session-memory and long-term-memory requests. +hideListLinks: true +linktitle: TypeScript SDK quickstart +title: Redis Agent Memory TypeScript SDK quickstart +weight: 8 +--- + +Use this quickstart to connect to a Redis Cloud Agent Memory service with the TypeScript SDK. You will add and retrieve a session event, create two long-term memories, and search them. + +## Before you begin + +To complete this quickstart, you need: + +{{< embed-md "rc-agent-memory-quickstart-prerequisites.md" >}} + +You also need Node.js and npm. + +## Create an Agent Memory service + +{{< embed-md "rc-agent-memory-quickstart-create-service.md" >}} + +## Save the connection values + +1. Open the Agent Memory service in the Redis Cloud console. +1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. +1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). +1. Export the API key in your shell: + + ```sh + export API_KEY='' + ``` + +Keep the API key out of source control, application logs, and other unsecured locations. + +## Install the SDK + +Create a project and install the Agent Memory SDK: + +```sh +mkdir agent-memory-quickstart +cd agent-memory-quickstart +npm init -y +npm install @redis-iris/agent-memory +npm install --save-dev tsx +``` + +## Create the client and check the service health + +In the code sample, replace `` and `` with the values you copied from the service's **Configuration** tab. The endpoint must include `https://`. + +The session, user, and memory IDs are example identifiers defined in the code. This quickstart uses the same user identifier for the event's `actorId` and the long-term memory's `ownerId`. + +Create a file named `quickstart.ts` and initialize an `AgentMemory` client. The client uses the endpoint, Store ID, and API key to send requests to your Agent Memory service. + +Call `health` before writing any memory to verify that the service is reachable and accepts the API key: + +```typescript +import { AgentMemory } from "@redis-iris/agent-memory"; + +const apiKey = process.env.API_KEY; +if (!apiKey) { + throw new Error("Set the API_KEY environment variable."); +} + +const serverURL = ""; +const storeId = ""; +const sessionId = "quickstart-session"; +const userId = "quickstart-user"; +const memoryId = "quickstart-preference"; + +const agentMemory = new AgentMemory({ + serverURL, + storeId, + apiKey, +}); + +async function run() { + const health = await agentMemory.health(); + console.log("Health check:"); + console.dir(health, { depth: null }); +} + +run().catch((error) => { + console.error(error); + process.exitCode = 1; +}); +``` + +A successful health check confirms that the service is reachable and accepts the API key. The first store request validates the Store ID. + +## Add a session event + +A session contains an ordered sequence of events. Add the following code inside `run`, after the health check, to add a user message to the example session: + +```typescript + const event = await agentMemory.addSessionEvent({ + sessionId, + actorId: userId, + role: "USER", + content: [{ text: "I prefer vegetarian restaurants." }], + createdAt: new Date(), + }); + console.log("Created event:"); + console.dir(event, { depth: null }); +``` + +A successful request returns the stored event, including its generated event ID and system timestamp. If the session does not exist, Agent Memory creates it when the event is added. + +## Retrieve the session + +Retrieve the session to access its stored events. Add this code to `run` after the call to `addSessionEvent`: + +```typescript + const session = await agentMemory.getSessionMemory( + sessionId, + ); + console.log("Session memory:"); + console.dir(session, { depth: null }); +``` + +The response contains the session and the events currently stored for it. + +## Create long-term memories + +Long-term memories can be extracted from session events or written directly. This quickstart writes two memories directly so you can search them immediately and see semantic ranking in the results. Add this code after the session retrieval: + +```typescript + const created = await agentMemory.bulkCreateLongTermMemories({ + memories: [ + { + id: `${memoryId}-0`, + text: "The user prefers cozy restaurants.", + memoryType: "semantic", + sessionId, + ownerId: userId, + }, + { + id: `${memoryId}-1`, + text: "The user prefers spicy food.", + memoryType: "semantic", + sessionId, + ownerId: userId, + }, + ], + }); + console.log("Created memories:"); + console.dir(created, { depth: null }); +``` + +The response contains a `created` array with the ID of each long-term memory created by the request. + +## Search long-term memory + +Search uses the meaning of the query to rank relevant long-term memories. The owner filter restricts the results to memories associated with the example user, and `limit: 1` returns only the strongest match. Add this code after the bulk create request: + +```typescript + const results = await agentMemory.searchLongTermMemory({ + text: "What kind of meal does the user prefer?", + filter: { + ownerId: { + eq: userId, + }, + }, + limit: 1, + }); + console.log("Search results:"); + console.dir(results, { depth: null }); +``` + +The response contains an `items` array with the matching long-term memories. The memory about spicy food should be the strongest semantic match for this query. + +## Run the quickstart + +Run the completed file once: + +```sh +npx tsx quickstart.ts +``` + +The program prints: + +- The health check response. +- The session event and its generated event ID. +- The session and its stored events. +- A `created` array containing the two long-term memory IDs. +- An `items` array containing the strongest match for the semantic search. The result should be the memory about spicy food. + +The example derives two fixed memory IDs from `memoryId`. Delete the existing memories or change `memoryId` before running the program again. + +## Complete example + +Your completed `quickstart.ts` file should contain: + +```typescript +import { AgentMemory } from "@redis-iris/agent-memory"; + +const apiKey = process.env.API_KEY; +if (!apiKey) { + throw new Error("Set the API_KEY environment variable."); +} + +const serverURL = ""; +const storeId = ""; +const sessionId = "quickstart-session"; +const userId = "quickstart-user"; +const memoryId = "quickstart-preference"; + +const agentMemory = new AgentMemory({ + serverURL, + storeId, + apiKey, +}); + +async function run() { + const health = await agentMemory.health(); + console.log("Health check:"); + console.dir(health, { depth: null }); + + const event = await agentMemory.addSessionEvent({ + sessionId, + actorId: userId, + role: "USER", + content: [{ text: "I prefer vegetarian restaurants." }], + createdAt: new Date(), + }); + console.log("Created event:"); + console.dir(event, { depth: null }); + + const session = await agentMemory.getSessionMemory( + sessionId, + ); + console.log("Session memory:"); + console.dir(session, { depth: null }); + + const created = await agentMemory.bulkCreateLongTermMemories({ + memories: [ + { + id: `${memoryId}-0`, + text: "The user prefers cozy restaurants.", + memoryType: "semantic", + sessionId, + ownerId: userId, + }, + { + id: `${memoryId}-1`, + text: "The user prefers spicy food.", + memoryType: "semantic", + sessionId, + ownerId: userId, + }, + ], + }); + console.log("Created memories:"); + console.dir(created, { depth: null }); + + const results = await agentMemory.searchLongTermMemory({ + text: "What kind of meal does the user prefer?", + filter: { + ownerId: { + eq: userId, + }, + }, + limit: 1, + }); + console.log("Search results:"); + console.dir(results, { depth: null }); +} + +run().catch((error) => { + console.error(error); + process.exitCode = 1; +}); +``` + +## Next steps + +- Review the [TypeScript SDK package and reference](https://www.npmjs.com/package/@redis-iris/agent-memory). +- Review the [Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). +- Try the [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}). diff --git a/content/embeds/rc-agent-memory-quickstart-create-service.md b/content/embeds/rc-agent-memory-quickstart-create-service.md new file mode 100644 index 0000000000..0a7281e4ee --- /dev/null +++ b/content/embeds/rc-agent-memory-quickstart-create-service.md @@ -0,0 +1,11 @@ +1. Sign in to the [Redis Cloud console](https://cloud.redis.io/). +2. Select **Agent Memory** from the navigation menu. +3. If Redis Cloud displays the public-preview terms, review and accept them. +4. Select **Quick create** to use the default settings, or select **Create custom** and choose an eligible database. +5. After Redis Cloud creates the service, copy the Agent Memory API key and store it securely. + +{{< warning >}} +Redis Cloud displays the Agent Memory API key only once. If you lose it, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). +{{< /warning >}} + +For screenshots and configuration details, see [create an Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}). diff --git a/content/embeds/rc-agent-memory-quickstart-prerequisites.md b/content/embeds/rc-agent-memory-quickstart-prerequisites.md new file mode 100644 index 0000000000..cfee3f4122 --- /dev/null +++ b/content/embeds/rc-agent-memory-quickstart-prerequisites.md @@ -0,0 +1,8 @@ +* A Redis Cloud account that can create Agent Memory services. +* An eligible Redis Cloud database, or permission to create one. + +The database must be active, run a supported Redis version, and use a Pro or Essentials plan. It must also have a public endpoint, Redis Search, and the default user enabled. + +Agent Memory doesn't support Flex, Active-Active, or AWS PrivateLink databases during public preview. + +For the complete list, see [prerequisites and limitations]({{< relref "/operate/rc/context-engine/agent-memory/create-service#prerequisites-and-limitations" >}}). diff --git a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md index cdfb4fbfc1..e2fb593ae5 100644 --- a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md +++ b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md @@ -17,29 +17,13 @@ Use this quickstart to create an Agent Memory service on Redis Cloud and make yo To complete this quickstart, you need: -- A Redis Cloud account that can create Agent Memory services. -- An eligible Redis Cloud database, or permission to create one. -- A shell with `curl` installed. +{{< embed-md "rc-agent-memory-quickstart-prerequisites.md" >}} -An eligible database is active, uses a Pro or Essentials plan, has a public endpoint and Query Engine, runs a supported Redis version, and has the default user enabled. - -Agent Memory doesn't support Flex, Active-Active, or AWS PrivateLink databases during public preview. - -For the complete list, see [prerequisites and limitations]({{< relref "/operate/rc/context-engine/agent-memory/create-service#prerequisites-and-limitations" >}}). +You also need a shell with `curl` and `jq` installed. ## Create an Agent Memory service -1. Sign in to the [Redis Cloud console](https://cloud.redis.io/). -1. Select **Agent Memory** from the navigation menu. -1. If Redis Cloud displays the public-preview terms, review and accept them. -1. Select **Quick create** to use the default settings, or select **Create custom** and choose an eligible database. -1. After Redis Cloud creates the service, copy the Agent Memory API key and store it securely. - -{{< warning >}} -Redis Cloud displays the Agent Memory API key only once. If you lose it, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). -{{< /warning >}} - -For screenshots and configuration details, see [create an Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}). +{{< embed-md "rc-agent-memory-quickstart-create-service.md" >}} ## Save the connection values @@ -48,12 +32,9 @@ For screenshots and configuration details, see [create an Agent Memory service]( 1. Export the connection values in your shell. Replace each placeholder with the value from Redis Cloud: ```sh - export AGENT_MEMORY_ENDPOINT='' + export AGENT_MEMORY_URL='' export STORE_ID='' export API_KEY='' - export SESSION_ID='quickstart-session' - export OWNER_ID='quickstart-user' - export MEMORY_ID='quickstart-preference' ``` 1. Define identifiers for the resources created in this quickstart: @@ -157,7 +138,7 @@ curl --fail-with-body --silent --show-error \ JSON ``` -A successful request returns `201 Created`. The `created` array in the response contains the value of `MEMORY_ID`. +A successful request returns `201 Created`. The `created` array contains the IDs of both long-term memories. For request and response details, see [`BulkCreateLongTermMemories`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference/#tag/Long-Term-Memory/operation/BulkCreateLongTermMemories" >}}). @@ -173,7 +154,7 @@ curl --fail-with-body --silent --show-error \ --data @- \ "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/long-term-memory/search" <}}). From 63a83bf47fe7c6b8e4b98a5dd2872ef3642f05af Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Fri, 31 Jul 2026 16:25:01 +0200 Subject: [PATCH 07/14] docs: refactoring agent memory index and integration pages --- content/develop/ai/_index.md | 6 +- content/develop/ai/context-engine/_index.md | 10 +- .../ai/context-engine/agent-memory/_index.md | 186 +++++++---------- .../agent-memory/api-examples.md | 129 ------------ .../api-reference/openapi-agent-memory.json | 2 +- .../agent-memory/developer-guide.md | 192 ++++++++++++------ .../agent-memory/python-sdk-quickstart.md | 16 +- .../agent-memory/rest-api-quickstart.md | 175 ++++++++++++++++ .../agent-memory/self-managed/reference.md | 10 +- .../agent-memory/typescript-sdk-quickstart.md | 16 +- content/embeds/rc-agent-memory-get-started.md | 4 +- ...-agent-memory-quickstart-create-service.md | 6 +- ...c-agent-memory-quickstart-prerequisites.md | 4 +- 13 files changed, 421 insertions(+), 335 deletions(-) delete mode 100644 content/develop/ai/context-engine/agent-memory/api-examples.md create mode 100644 content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md diff --git a/content/develop/ai/_index.md b/content/develop/ai/_index.md index 3597673f9a..d96084dc22 100644 --- a/content/develop/ai/_index.md +++ b/content/develop/ai/_index.md @@ -71,7 +71,7 @@ AI agents are autonomous systems that combine LLMs with memory, tools, and plann The [Context Engine]({{< relref "/develop/ai/context-engine" >}}) (Redis Iris) includes four fully-managed services available on Redis Cloud: - [LangCache]({{< relref "/develop/ai/context-engine/langcache" >}}) — Semantic caching that reduces LLM API costs and improves response times by reusing cached responses for similar queries. -- [Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) — Two-tier persistent memory (session and long-term) for agents, available as a REST API and Python SDK. +- [Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) — Two-tier persistent memory (session and long-term) for agents, available as a REST API and Python SDK. - [Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever" >}}) — Turns your business data into structured, governed tools that agents can reliably use, defined once and reused across all agents. - [Data Integration]({{< relref "/develop/ai/context-engine/data-integration" >}}) — Keeps your Redis Cloud database in sync with relational databases in near real time using Change Data Capture. @@ -83,7 +83,7 @@ The [Context Engine]({{< relref "/develop/ai/context-engine" >}}) (Redis Iris) i 1. [**Configure vector queries at runtime**]({{< relref "develop/ai/search-and-query/vectors#runtime-query-parameters" >}}): Select the best filter mode to optimize query execution. 1. [**Build an AI agent**]({{< relref "/develop/ai/agent-builder" >}}): Use the interactive agent builder to generate complete working code for conversational assistants and recommendation engines. 1. [**Add semantic caching**]({{< relref "/develop/ai/context-engine/langcache" >}}): Reduce LLM API calls by caching and reusing responses for semantically similar queries. -1. [**Add agent memory**]({{< relref "/develop/ai/context-engine/agent-memory" >}}): Give your agent persistent session and long-term memory using the Agent Memory REST API. +1. [**Add agent memory**]({{< relref "/develop/ai/context-engine/agent-memory" >}}): Give your agent persistent session and long-term memory using the Redis Agent Memory REST API. 1. [**Access structured business data**]({{< relref "/develop/ai/context-engine/context-retriever" >}}): Use Context Retriever to define your business data as governed tools that any agent can query reliably. 1. [**Sync live data to Redis**]({{< relref "/develop/ai/context-engine/data-integration" >}}): Use Data Integration to keep your Redis Cloud database in sync with your primary relational database using Change Data Capture. @@ -140,7 +140,7 @@ AI agents can act autonomously to plan and execute tasks for the user. The Context Engine provides managed services for agent memory and data access. * [Get started with LangCache]({{< relref "/develop/ai/context-engine/langcache" >}}) — Add semantic caching to reduce LLM costs in minutes. -* [Get started with Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) — Add persistent two-tier memory to any agent using the REST API. +* [Get started with Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) — Add persistent two-tier memory to any agent using the REST API. * [Get started with Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever" >}}) — Expose your business data as governed tools that agents can reliably query. * [Get started with Data Integration]({{< relref "/develop/ai/context-engine/data-integration" >}}) — Keep Redis in sync with your primary database so agents always have fresh data. diff --git a/content/develop/ai/context-engine/_index.md b/content/develop/ai/context-engine/_index.md index 2a45b5d790..83c35c0e8b 100644 --- a/content/develop/ai/context-engine/_index.md +++ b/content/develop/ai/context-engine/_index.md @@ -16,7 +16,7 @@ Give your AI agents the context layer they need to reliably act on business data Redis Iris eliminates the infrastructure burden of building context-aware AI agents — persistent memory, semantic caching, governed data access, and live data sync, all on Redis Cloud.
    - {{< image-card image="images/ai-brain.svg" alt="Agent Memory icon" title="Agent Memory — Persistent short-term and long-term memory across agent interactions" url="/develop/ai/context-engine/agent-memory" >}} + {{< image-card image="images/ai-brain.svg" alt="Redis Agent Memory icon" title="Redis Agent Memory — Persistent short-term and long-term memory across agent interactions" url="/develop/ai/context-engine/agent-memory" >}} {{< image-card image="images/ai-LLM-memory.svg" alt="LangCache icon" title="LangCache — Semantic caching to reduce LLM costs and improve response times" url="/develop/ai/context-engine/langcache" >}} {{< image-card image="images/ai-cube.svg" alt="Context Retriever icon" title="Context Retriever — Governed, schema-first data access tools for agents" url="/develop/ai/context-engine/context-retriever" >}}
    @@ -77,12 +77,12 @@ POST /v1/caches/{cacheId}/entries } ``` -See [LangCache API examples]({{< relref "/develop/ai/context-engine/langcache/api-examples" >}}) and [Agent Memory API examples]({{< relref "/develop/ai/context-engine/agent-memory/api-examples" >}}) for more. +See [LangCache API examples]({{< relref "/develop/ai/context-engine/langcache/api-examples" >}}) and the [Redis Agent Memory REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}) for more. Redis Iris context engine includes four services: - **[LangCache]({{< relref "/develop/ai/context-engine/langcache" >}})**: A semantic caching service that stores and reuses LLM responses for similar queries, reducing API costs and improving response latency. -- **[Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}})**: A persistent memory service that maintains short-term session memory and long-term memory across agent interactions. +- **[Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}})**: A persistent memory service that maintains short-term session memory and long-term memory across agent interactions. - **[Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever" >}})**: Turns your business data into structured tools that AI agents can safely and reliably use, defined once and reused across all agents. - **[Data integration]({{< relref "/develop/ai/context-engine/data-integration" >}})**: Syncs live data from your existing relational databases into Redis Cloud so agents always have access to fresh, accurate business data. @@ -103,7 +103,7 @@ LangCache works well for AI assistants, chatbots, RAG applications, AI agents, a [Get started with LangCache]({{< relref "/develop/ai/context-engine/langcache" >}}) -## Agent Memory +## Redis Agent Memory [Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) gives AI agents a structured, persistent memory layer using a two-tier model: @@ -112,7 +112,7 @@ LangCache works well for AI assistants, chatbots, RAG applications, AI agents, a Promotion from session memory to long-term memory is automatic and non-blocking. As a conversation progresses, the service asynchronously extracts and stores important information in the background, keeping agent interactions responsive. You can also create long-term memories directly using the API for bulk imports or external knowledge sources. -Agent Memory is available as a REST API and Python SDK. +Redis Agent Memory is available as a REST API and Python SDK. [Get started with Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) diff --git a/content/develop/ai/context-engine/agent-memory/_index.md b/content/develop/ai/context-engine/agent-memory/_index.md index d47194c70d..509fd05e79 100644 --- a/content/develop/ai/context-engine/agent-memory/_index.md +++ b/content/develop/ai/context-engine/agent-memory/_index.md @@ -6,116 +6,54 @@ categories: - develop - ai description: Store agent memory for AI applications in Redis. -linkTitle: Agent Memory +linkTitle: Redis Agent Memory hideListLinks: true weight: 20 bannerText: Redis Agent Memory is currently available in preview. Features and behavior are subject to change. bannerChildren: true --- -Give your AI agents persistent memory and context that gets smarter over time. +Redis Agent Memory stores conversation history and durable information for AI applications. Use session memory to reconstruct a conversation and long-term memory to retrieve relevant information across sessions. -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. +Access Redis Agent Memory through its REST API or the Python and TypeScript SDKs. It works with any agent framework or LLM provider. -
    - {{< image-card image="images/ai-brain.svg" alt="Quick start icon" title="REST quickstart — Create an Agent Memory service on Redis Cloud and make your first API requests" url="/operate/rc/context-engine/agent-memory/use-agent-memory" >}} - {{< image-card image="images/ai-brain-2.svg" alt="Python SDK quickstart icon" title="Python SDK quickstart — Connect to Agent Memory and make your first SDK requests" url="/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}} - {{< image-card image="images/ai-LLM-memory.svg" alt="TypeScript SDK quickstart icon" title="TypeScript SDK quickstart — Connect to Agent Memory and make your first SDK requests" url="/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}} -
    - -## What is Redis Agent Memory? +## Redis Agent Memory capabilities -Redis Agent Memory is a production-ready memory system for AI agents and applications that: +* **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. +* **Automatic session summarization:** Automatically summarize older conversation events while retaining recent messages in full. +* **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. +* **Relevant retrieval:** Search long-term memory using semantic, keyword, or hybrid search. +* **Multi-session recall:** Retrieve relevant memories across conversations and filter results by owner, session, namespace, topic, or memory type. +* **Custom memory types:** Define memory types for your business domain, with structured fields and instructions that control what Redis Agent Memory extracts. -
      -
    • 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
    • -
    +## Two-tier memory model -## Why use Redis Agent Memory? +Redis Agent Memory provides two memory tiers:
    -

    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
    • +

      Session memory

      +

      Stores the ordered events and metadata for a conversation.

      +
        +
      • Configurable retention: Set a TTL to control how long session events are retained.
      • +
      • Automatic summarization: Condense older events after a configured threshold while retaining recent events in full, reducing the conversation history sent to the model's context window.
    -

    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
    • +

      Long-term memory

      +

      Stores durable information that can be retrieved across sessions using semantic, keyword, or hybrid search.

      +
        +
      • Automatic extraction: Process session events asynchronously and store important information with vector embeddings and metadata.
      • +
      • Custom memory types: Define domain-specific memories with structured fields and extraction instructions.
      • +
      • Direct memory creation: Create memories through the API or import knowledge from external sources.
      • +
      • Configurable retention: Set a separate TTL for long-term memories.
    -## Quick example - -Add a session event to session memory: - -```json -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: - -```json -POST /v1/stores/{storeId}/long-term-memory -{ - "memories": [ - { - "id": "cofIXpuMmg", - "text": "The user prefers vegetarian food.", - "memoryType": "episodic", - "sessionId": "abcd-efgh", - "ownerId": "user-name" - } - ] -} -``` - -Follow the [Redis Cloud Agent Memory REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) to run complete `curl` commands. - -## Two-tier memory model - -Redis Agent Memory uses a two-tier memory model: +### Example: Travel planning agent -- **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 session 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: +Consider a travel agent helping a user plan a trip: ```text User: I'm planning a trip to Japan next month and need help finding some restaurants for the trip. @@ -124,32 +62,62 @@ 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". +
    +
    +

    Session memory

    +

    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.

    +
    +
    +

    Automatic session summarization

    +

    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.

    +
    +
    +

    Automatic long-term memory extraction

    +

    Extracts durable information in the background, such as "The user is vegetarian." Later sessions can retrieve it after the original session expires.

    +
    +
    +

    Custom memory types

    +

    Stores domain-specific information in a custom trip_preference type with fields such as destination, travel_period, and dietary_requirement.

    +
    +
    ## Get started with Redis Agent Memory {#get-started} -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. +Get started with Redis Agent Memory on Redis Cloud or join the private preview for Redis Software. -{{< multitabs id="agent-memory-get-started" - tab1="Redis Cloud" - tab2="Redis Software (private preview)" - tab3="Open source" >}} - -{{< embed-md "rc-agent-memory-get-started.md" >}} - --tab-sep- - -Redis Agent Memory is available for self-managed deployment on Kubernetes as a private -preview. See -[Self-managed Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory/self-managed" >}}). +
    +
    +

    Redis Cloud

    +

    Create a managed Redis Agent Memory service and make your first requests.

    +

    Open the Redis Cloud setup guide

    +
    +
    +

    Redis Software private preview

    +

    Deploy Redis Agent Memory on Kubernetes with Redis Software.

    +

    Open the self-managed deployment guide

    +
    +
    -You need a license key to deploy. Contact your Redis representative or -[contact sales](https://redis.io/contact/). +### Choose a quickstart --tab-sep- +After your Redis Agent Memory service is ready, choose a client to make your first session-memory and long-term-memory requests. -The open-source version of Redis Agent Memory is [available on GitHub](https://github.com/redis/agent-memory-server). See [Redis Agent Memory server](https://redis.github.io/agent-memory-server/) for comprehensive docs, quick start guides, and API references. +
    +
    +

    REST API

    +

    Use curl to call the Redis Agent Memory API directly.

    +

    Open the REST API quickstart

    +
    +
    +

    Python SDK

    +

    Install the Python SDK and make your first memory requests.

    +

    Open the Python quickstart

    +
    +
    +

    TypeScript SDK

    +

    Install the TypeScript SDK and make your first memory requests.

    +

    Open the TypeScript quickstart

    +
    +
    -{{< /multitabs >}} +For shared integration concepts, identifiers, and authentication, see [Integrate Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory/developer-guide" >}}). diff --git a/content/develop/ai/context-engine/agent-memory/api-examples.md b/content/develop/ai/context-engine/agent-memory/api-examples.md deleted file mode 100644 index b9307d003f..0000000000 --- a/content/develop/ai/context-engine/agent-memory/api-examples.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -alwaysopen: false -categories: -- docs -- develop -- ai -description: Learn to use the Redis Agent Memory API for agent memory and semantic memory search. -hideListLinks: true -linktitle: REST API examples -title: Use the Redis Agent Memory REST API -weight: 10 ---- - -If you're new to Agent Memory on Redis Cloud, complete the [REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) first. It covers service creation, authentication, and runnable requests. - -The examples on this page supplement the quickstart. Use the [Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) for complete request and response schemas. - -You can use any standard REST client or library to access the API. To use an SDK, follow the [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}) or [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}). - -## Authentication - -To access the Agent Memory API, you need: - -- Agent Memory API endpoint -- an Agent Memory API user key -- a Store ID - -When you call the API, you need to pass the Agent Memory API key in the `Authorization` header as a Bearer token and the store ID as the `storeId` path parameter. - -The [REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory#save-the-connection-values" >}}) uses the following environment variables: - -- **$AGENT_MEMORY_URL** - the complete Agent Memory API base URL -- **$STORE_ID** - the Store ID of your Agent Memory service -- **$API_KEY** - the Agent Memory API key - -## Examples - -### Add session event - -Use [`POST /v1/stores/{storeId}/session-memory/events`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/session-memory/operation/AddSessionEvent" >}}) to add an event to a session in short-term memory. If a session doesn't exist yet, it will be created. - -```json -{ - "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" - } -} -``` - -Use this endpoint to store conversations between your users and your AI agent. You can use the `metadata` object to store additional metadata for your application. - -The Agent Memory model will automatically promote relevant short-term memories to long-term memory. - -### Add Long-term memories - -You may want to add one or more long-term memories to add specific preference information. - -Use [`POST /v1/stores/{storeId}/long-term-memory`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/long-term-memory/operation/BulkCreateLongTermMemories" >}}) to add one or more long-term memories to long-term memory storage. - -```json -{ - "memories": [ - { - "id": "cofIXpuMmg", - "text": "The user prefers vegetarian food.", - "memoryType": "episodic", - "sessionId": "abcd-efgh", - "ownerId": "user-name" - } - ] -} -``` - -### Search Long-term memories - -Use [`POST /v1/stores/{storeId}/long-term-memory/search`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/long-term-memory/operation/SearchLongTermMemory" >}}) to search for long-term memories. - -```json -{ - "text": "user preferences", - "similarityThreshold": 0.48725898820184166, - "filter": { - "sessionId": { - "eq": "abcd-efgh" - }, - "ownerId": { - "in": [ - "user1", - "user2" - ] - } - }, - "filterOp": "any" -} -``` - -In the `filter` object of the request body, you can filter the search by any of the following values: - -| Filter | Data type | Definition | Supported operators | -|--------|----------|------------|---------------------| -| `sessionId` | string | The session ID the memory comes from. | `eq`, `ne`, `in`, `all` | -| `ownerId` | string | The owner ID of the memory. | `eq`, `ne`, `in`, `all` | -| `namespace` | string | The namespace of the memory. | `eq`, `ne`, `in`, `all` | -| `topics` | string | The topics of the memory. | `eq`, `ne`, `in`, `all` | -| `memoryType` | string | The type of memory (`semantic`, `episodic`, `message`). | `eq`, `ne`, `in`, `all` | -| `createdAt` | string (ISO 8601) | The timestamp when the memory was created. | `eq`, `gt`, `lt`, `gte`, `lte` | - -For all values, you must set only one of these operators: - -| Operator | Definition | -|----------|---------------------| -| `eq` | Returns memories with the value equal to the provided value. | -| `ne` | Returns memories where the value is not the provided value. | -| `in` | Returns memories where the value is one of a list of provided values. | -| `all` | Returns memories where the value matches all of the provided values. | -| `gt` | Returns memories where the value is greater than the provided value. | -| `lt` | Returns memories where the value is less than the provided value. | -| `gte` | Returns memories where the value is greater than or equal to the provided value. | -| `lte` | Returns memories where the value is less than or equal to the provided value. | diff --git a/content/develop/ai/context-engine/agent-memory/api-reference/openapi-agent-memory.json b/content/develop/ai/context-engine/agent-memory/api-reference/openapi-agent-memory.json index 18ae937465..3d6a042312 100644 --- a/content/develop/ai/context-engine/agent-memory/api-reference/openapi-agent-memory.json +++ b/content/develop/ai/context-engine/agent-memory/api-reference/openapi-agent-memory.json @@ -3,7 +3,7 @@ "info": { "title": "Redis Agent Memory API", "version": "1.0.0", - "description": "API for storing, retrieving, and searching Redis Agent Memory session memory and long-term memory.\n\nAuthentication depends on your deployment. Use the credential issued for your Agent Memory service or store. For self-managed deployments, see the self-managed Agent Memory guide for authentication options.\n" + "description": "API for storing, retrieving, and searching Redis Agent Memory session memory and long-term memory.\n\nAuthentication depends on your deployment. Use the credential issued for your Redis Agent Memory service or store. For self-managed deployments, see the self-managed Redis Agent Memory guide for authentication options.\n" }, "paths": { "/health": { diff --git a/content/develop/ai/context-engine/agent-memory/developer-guide.md b/content/develop/ai/context-engine/agent-memory/developer-guide.md index 267f33b54d..37cd59ed21 100644 --- a/content/develop/ai/context-engine/agent-memory/developer-guide.md +++ b/content/develop/ai/context-engine/agent-memory/developer-guide.md @@ -4,89 +4,161 @@ categories: - docs - develop - ai -description: API reference, SDK examples, and language-specific guides for building with Redis Agent Memory. +description: Connect an application to Redis Agent Memory and work with session memory and long-term memory through REST, Python, or TypeScript. hideListLinks: true -linktitle: Developer guide -title: Build with Redis Agent Memory +linktitle: Integration guide +title: Integrate Redis Agent Memory weight: 5 --- -Everything you need to start building with Redis Agent Memory — REST API reference, SDK examples, and language-specific guides. +Use the REST API, Python SDK, or TypeScript SDK to add session events, retrieve conversation context, create long-term memories, and search for relevant information. -
    - {{< image-card image="images/ai-brain.svg" alt="REST quickstart icon" title="REST quickstart — Create a service on Redis Cloud and make your first API requests" url="/operate/rc/context-engine/agent-memory/use-agent-memory" >}} - {{< image-card image="images/ai-lib.svg" alt="Python SDK quickstart icon" title="Python SDK quickstart — Connect to Agent Memory and make your first SDK requests" url="/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}} - {{< image-card image="images/ai-lib.svg" alt="TypeScript SDK quickstart icon" title="TypeScript SDK quickstart — Connect to Agent Memory and make your first SDK requests" url="/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}} -
    +## Integration workflow -## What you can build +1. Connect to a Redis Agent Memory service with its endpoint, Store ID, and API key. +1. Add conversation events to session memory. +1. Retrieve session memory before an agent turn to reconstruct the conversation context. +1. Search long-term memory for information relevant to the current interaction. -Redis Agent Memory gives your agents a two-tier memory layer available through the REST API, Python SDK, and TypeScript SDK. +Redis Agent Memory can automatically summarize older session events and extract long-term memories in the background. Applications can also create long-term memories directly. -### Session memory +## Choose a client -
      -
    • Conversation history: Store each conversation as a sequence of events and retrieve it by session ID, so the agent can continue with context from previous turns.
    • -
    • Configurable retention: Set a TTL for session memory, so conversation data follows your retention requirements and expires when it is no longer needed.
    • -
    • Automatic summarization: Summarize older session events after a configurable threshold while retaining the most recent events in full, so long conversations remain usable without retrieving the complete history for every turn.
    • -
    • Event attribution and metadata: Record the actor, message role, timestamp, and application metadata for each session event, so conversations retain their participants, ordering, and application context.
    • -
    +| Client | Use it when | Package and quickstart | +|:-------|:------------|:-----------------------| +| REST API | You need language-independent HTTP access or don't want an SDK dependency. | No package required. Follow the [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}). | +| Python SDK | Your application or agent uses Python. | Install [`redis-agent-memory`](https://pypi.org/project/redis-agent-memory/) and follow the [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}). | +| TypeScript SDK | Your application or agent uses JavaScript or TypeScript. | Install [`@redis-iris/agent-memory`](https://www.npmjs.com/package/@redis-iris/agent-memory) and follow the [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}). | -### Long-term memory +## Connect to a Redis Agent Memory service -
      -
    • Automatic memory extraction: Extract and persist important facts, preferences, and patterns from session events, so the agent can use relevant information after the original conversation has ended.
    • -
    • Configurable extraction cadence: Control when session events are processed, so long-term memory updates can match the needs and activity level of your application.
    • -
    • Custom memory types: Define memory types with their own descriptions and extraction prompts, so the agent captures information specific to your application and domain.
    • -
    • Structured memory fields: Add typed fields using strings, integers, floats, booleans, lists, and objects, so extracted memories have a consistent structure that applications can validate and use.
    • -
    • Direct memory writes: Create long-term memories in bulk from external sources without processing them through a session, so existing user data and application knowledge can be imported directly.
    • -
    • Configurable retention: Set a TTL for long-term memory, so persisted information follows your retention requirements.
    • -
    +Every client requires: -### Memory retrieval and management +* The Redis Agent Memory endpoint. +* The Store ID. +* A Redis Agent Memory API key. -
      -
    • Memory classification: Organize long-term memories as semantic, episodic, or message memories and associate them with owners, sessions, namespaces, and topics, so retrieval can be scoped to the current application context.
    • -
    • Semantic recall: Search long-term memories by meaning, so the agent can retrieve relevant information without relying on exact keyword matches.
    • -
    • Multi-session recall: Retrieve memories across sessions and users, so the agent can use relevant information from more than one conversation.
    • -
    • Filtered retrieval: Filter results by session, owner, namespace, topic, and memory type, so applications can control which memories are available in each context.
    • -
    • Multiple client options: Access session and long-term memory through the REST API, Python SDK, or TypeScript SDK, so the same memory service can be used across different application stacks.
    • -
    +Send the API key as a bearer token when you use the REST API. The Store ID appears in REST request paths. The Python and TypeScript SDKs accept the endpoint, Store ID, and API key when you create the client. -## Quickstarts +Follow the [Redis Cloud setup guide]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}) if you don't have a service. After you create one, copy its endpoint and Store ID from the **Configuration** tab and save the API key securely. -Choose a client and make your first session-memory and long-term-memory requests: +## Identify users and conversations -- [REST API]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) -- [Python SDK]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}) -- [TypeScript SDK]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}) +| Identifier | Purpose | +|:-----------|:--------| +| `sessionId` | Identifies a conversation or interaction session. | +| `actorId` | Identifies the actor that produced a session event. | +| `ownerId` | Identifies the user or entity associated with a long-term memory. | +| Memory ID | Uniquely identifies a long-term memory within the store. | -For complete endpoint and schema details, see the [Agent Memory API examples]({{< relref "/develop/ai/context-engine/agent-memory/api-examples" >}}) and [API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). +An application can use the same user identifier for `actorId` and `ownerId`, but the fields describe different relationships. -## Language guides +## Work with session memory -{{< note >}} -The guides below show how to implement agent memory patterns **directly using Redis client libraries** without the managed Agent Memory service. +Use a stable `sessionId` to store a conversation as an ordered sequence of events. Add an event for each user, assistant, or system message that your application needs to retain. -Use these guides if you prefer to self-host, want full control over the implementation, or use a language that doesn't have an Agent Memory SDK. +Each stored event can include: -For the managed service, use the REST API, Python SDK, or TypeScript SDK quickstart above. -{{< /note >}} +| Field | Purpose | +|:------|:--------| +| `eventId` | Server-generated identifier for the event. | +| `sessionId` | Session that contains the event. | +| `actorId` | User, agent, or other actor that produced the event. | +| `role` | Role of the message in the conversation. | +| `content` | Message content, including its text. | +| `createdAt` | Time the event occurred in the application. | +| `systemTimestamp` | Time Redis Agent Memory stored the event. | +| `metadata` | Optional application-specific information associated with the event. | -Step-by-step examples for building agent memory into your application using your preferred Redis client library: +Before an agent turn, retrieve the session by `sessionId` and provide the relevant events to the agent. This lets the application reconstruct the conversation without maintaining a separate conversation store. -- [Python (redis-py)]({{< relref "/develop/use-cases/agent-memory/redis-py" >}}) -- [Node.js (node-redis)]({{< relref "/develop/use-cases/agent-memory/nodejs" >}}) -- [Go]({{< relref "/develop/use-cases/agent-memory/go" >}}) -- [Java (Jedis)]({{< relref "/develop/use-cases/agent-memory/java-jedis" >}}) -- [Java (Lettuce)]({{< relref "/develop/use-cases/agent-memory/java-lettuce" >}}) -- [.NET]({{< relref "/develop/use-cases/agent-memory/dotnet" >}}) -- [PHP]({{< relref "/develop/use-cases/agent-memory/php" >}}) -- [Ruby]({{< relref "/develop/use-cases/agent-memory/ruby" >}}) -- [Rust]({{< relref "/develop/use-cases/agent-memory/rust" >}}) +### Session retention -## Set up authentication +The session-memory TTL controls how long sessions remain available. Configure it according to the retention requirements of your application. When a session expires, its events are no longer available through session-memory retrieval. -Redis Cloud Agent Memory API requests require an Agent Memory API key and a Store ID. Send the key as a bearer token in the `Authorization` header, and include the Store ID in the request path. +See [memory configuration]({{< relref "/operate/rc/context-engine/agent-memory/create-service#memory-configuration" >}}) to configure the session-memory TTL in Redis Cloud. -The [Redis Cloud Agent Memory REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) shows how to get these values and use them in a request. +### Automatic session summarization + +Automatic summarization limits the amount of conversation history that must be added to a model's context window. Configure: + +* **Summarize after:** The number of messages a session can contain before older messages are summarized. +* **Keep most recent:** The number of recent messages that remain available in full. + +For example, with **Summarize after** set to 20 and **Keep most recent** set to 10, Redis Agent Memory summarizes the older 10 messages when the session reaches 20 messages and retains the 10 most recent messages in full. + +See [automatic summarization]({{< relref "/operate/rc/context-engine/agent-memory/create-service#automatic-summarization" >}}) to enable summarization and configure both thresholds in Redis Cloud. + +Follow any of the client quickstarts to add and retrieve a session event. For complete schemas, see the [session-memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/session-memory" >}}). + +## Work with long-term memory + +Long-term memory stores information that remains useful beyond one conversation. A long-term memory record includes content and fields that let applications classify, scope, and retrieve it: + +| Field | Purpose | +|:------|:--------| +| `id` | Unique identifier for the memory. | +| `text` | Memory content used for retrieval. | +| `memoryType` | Built-in or custom memory type. | +| `sessionId` | Session associated with the memory. | +| `ownerId` | User or entity associated with the memory. | +| `namespace` | Logical grouping for the memory. | +| `topics` | Topic tags used to categorize the memory. | +| `createdAt` | Time the memory was created. | +| `updatedAt` | Time the memory was last updated. | + +### Create long-term memories + +Redis Agent Memory provides two creation paths: + +* **Automatic extraction:** Redis Agent Memory processes session events asynchronously and creates durable memories from relevant information. Configure the extraction cadence to control how often session events are processed. +* **Direct creation:** Your application creates one or more long-term memories through the API or an SDK. Use direct creation when importing existing information or when your application determines exactly what to store. + +Configure the long-term-memory TTL separately from the session-memory TTL. + +See [memory configuration]({{< relref "/operate/rc/context-engine/agent-memory/create-service#memory-configuration" >}}) to configure the extraction cadence and long-term-memory TTL in Redis Cloud. + +### Search long-term memory + +Search long-term memory using semantic, keyword, or hybrid retrieval. Scope results with filters for owners, sessions, namespaces, topics, and memory types. + +Use `ownerId` to restrict recall to the relevant user or entity. Add narrower filters when the application needs memories from a particular session, namespace, topic, or memory type. + +For request fields, filter operators, and response schemas, see [`SearchLongTermMemory`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/long-term-memory/operation/SearchLongTermMemory" >}}). + +### Define custom memory types + +Custom memory types capture structured information specific to your business domain. Define them in the Redis Agent Memory service configuration with: + +| Setting | Purpose | +|:--------|:--------| +| **Name** | Unique name used as the memory's `memoryType`. | +| **Description** | Description of the information represented by the type. | +| **Extraction prompt** | Instructions that tell Redis Agent Memory when and how to extract the custom memory from session events. | +| **Enabled** | Controls whether Redis Agent Memory extracts new memories for the type. | +| **Custom fields** | Structured fields added to memories of this type. | + +Custom fields support `str`, `int`, `float`, `bool`, `list[str]`, `list[float]`, and `object`. Each field has a name and description that explain what it captures. Every custom memory also includes the built-in long-term memory fields listed above. + +For example, a travel application could define a `trip_preference` type with these fields: + +| Field | Type | Captures | +|:------|:-----|:---------| +| `destination` | `str` | City or country the user plans to visit. | +| `travel_period` | `str` | Dates or period of the trip. | +| `dietary_requirements` | `list[str]` | Dietary requirements that affect recommendations. | + +When this type is enabled, Redis Agent Memory can extract a structured `trip_preference` memory from relevant session events. Each enabled custom type processes session events independently. + +See [custom memory types]({{< relref "/operate/rc/context-engine/agent-memory/create-service#custom-memory-types" >}}) for configuration requirements and limits. + +Follow any of the client quickstarts to create and search long-term memory. For complete schemas, see the [long-term-memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/long-term-memory" >}}). + +## References + +* [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}) +* [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}) +* [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}) +* [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) +* [Python SDK reference](https://pypi.org/project/redis-agent-memory/) +* [TypeScript SDK reference](https://www.npmjs.com/package/@redis-iris/agent-memory) diff --git a/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md index 8580cd104e..e2acd6d7ec 100644 --- a/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md @@ -4,14 +4,14 @@ categories: - docs - develop - ai -description: Connect to Redis Cloud Agent Memory with the Python SDK and make session-memory and long-term-memory requests. +description: Connect to Redis Agent Memory on Redis Cloud with the Python SDK and make session-memory and long-term-memory requests. hideListLinks: true linktitle: Python SDK quickstart title: Redis Agent Memory Python SDK quickstart weight: 7 --- -Use this quickstart to connect to a Redis Cloud Agent Memory service with the Python SDK. You will add and retrieve a session event, create two long-term memories, and search them by meaning. +Use this quickstart to connect to a Redis Agent Memory service on Redis Cloud with the Python SDK. You will add and retrieve a session event, create two long-term memories, and search them by meaning. ## Before you begin @@ -21,13 +21,13 @@ To complete this quickstart, you need: You also need Python 3.10 or later. -## Create an Agent Memory service +## Create a Redis Agent Memory service {{< embed-md "rc-agent-memory-quickstart-create-service.md" >}} ## Save the connection values -1. Open the Agent Memory service in the Redis Cloud console. +1. Open the Redis Agent Memory service in the Redis Cloud console. 1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. 1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). 1. Export the API key in your shell: @@ -85,11 +85,11 @@ if __name__ == "__main__": main() ``` -The health response describes the status of the Agent Memory service. The first store request in the next step validates the Store ID. The context manager closes the SDK client after the requests finish. +The health response describes the status of the Redis Agent Memory service. The first store request in the next step validates the Store ID. The context manager closes the SDK client after the requests finish. ## Add a session event -Add a user message to session memory. If the session doesn't exist, Agent Memory creates it when it stores the event. +Add a user message to session memory. If the session doesn't exist, Redis Agent Memory creates it when it stores the event. Add this code after the call to `health`: @@ -121,7 +121,7 @@ The response contains the session and its stored events, including the event add ## Create long-term memories -Create two long-term memories directly. This lets the quickstart demonstrate semantic ranking without waiting for Agent Memory to extract memories from session events. Add this code after the session retrieval: +Create two long-term memories directly. This lets the quickstart demonstrate semantic ranking without waiting for Redis Agent Memory to extract memories from session events. Add this code after the session retrieval: ```python created = agent_memory.bulk_create_long_term_memories( @@ -262,5 +262,5 @@ with AgentMemory( ## Next steps - Review the [Python SDK package and reference](https://pypi.org/project/redis-agent-memory/). -- Review the [Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). +- Review the [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). - Try the [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}). diff --git a/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md b/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md new file mode 100644 index 0000000000..68b7cc41a3 --- /dev/null +++ b/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md @@ -0,0 +1,175 @@ +--- +alwaysopen: false +categories: +- docs +- develop +- ai +description: Connect to Redis Agent Memory with the REST API and make session-memory and long-term-memory requests. +hideListLinks: true +linktitle: REST quickstart +title: Redis Agent Memory REST API quickstart +weight: 6 +aliases: +- /operate/rc/context-engine/agent-memory/use-agent-memory/ +- /develop/ai/context-engine/agent-memory/api-examples/ +--- + +Use this quickstart to connect to a Redis Agent Memory service on Redis Cloud with the REST API. You will add and retrieve a session event, create two long-term memories, and search them by meaning. + +## Before you begin + +To complete this quickstart, you need: + +* A Redis Agent Memory service on Redis Cloud. If you don't have one, [create a Redis Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}). +* The API key for the service. +* A shell with `curl` and `jq` installed. + +## Save the connection values + +1. Open the Redis Agent Memory service in the Redis Cloud console. +1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. +1. Export the connection values in your shell. Replace each placeholder with the value from Redis Cloud: + + ```sh + export AGENT_MEMORY_URL='' + export STORE_ID='' + export API_KEY='' + ``` + +1. Define identifiers for the resources created in this quickstart: + + ```sh + export SESSION_ID='quickstart-session' + export OWNER_ID='quickstart-user' + export MEMORY_ID='quickstart-preference' + ``` + +`AGENT_MEMORY_URL` must contain the complete endpoint shown in Redis Cloud, including `https://`. + +Send `API_KEY` as a bearer token in the `Authorization` header. Keep API keys out of source control, application logs, and other unsecured locations. + +`SESSION_ID`, `OWNER_ID`, and `MEMORY_ID` are example identifiers used throughout this quickstart. You can replace them with identifiers from your application. + +## Add a session event + +Set the event timestamp to the current Coordinated Universal Time (UTC): + +```sh +export EVENT_CREATED_AT="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" +``` + +Add a user event to session memory: + +```sh +curl --fail-with-body --silent --show-error \ + --request POST \ + --header "Authorization: Bearer $API_KEY" \ + --header 'Content-Type: application/json' \ + --data @- \ + "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/session-memory/events" <}}). + +## Retrieve the session + +Retrieve the session event that you added: + +```sh +curl --fail-with-body --silent --show-error \ + --header "Authorization: Bearer $API_KEY" \ + "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/session-memory/$SESSION_ID" | jq +``` + +A successful request returns `200 OK`. The response contains the session ID, owner ID, and stored events. + +For request and response details, see [`GetSessionMemory`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/session-memory/operation/GetSessionMemory" >}}). + +## Understand automatic extraction + +Redis Agent Memory processes session events asynchronously and extracts relevant information into long-term memory. By default, extraction runs on a five-minute cadence, so extracted memories might not appear immediately. + +The next step creates a long-term memory directly. This approach lets you verify long-term-memory search without waiting for automatic extraction. + +## Create a long-term memory + +Create two long-term memories for the same owner and session: + +```sh +curl --fail-with-body --silent --show-error \ + --request POST \ + --header "Authorization: Bearer $API_KEY" \ + --header 'Content-Type: application/json' \ + --data @- \ + "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/long-term-memory" <}}). + +## Search long-term memory + +Search for the long-term memory by meaning and owner: + +```sh +curl --fail-with-body --silent --show-error \ + --request POST \ + --header "Authorization: Bearer $API_KEY" \ + --header 'Content-Type: application/json' \ + --data @- \ + "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/long-term-memory/search" <}}). + +## Next steps + +- Review the [Redis Cloud service setup guide]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}) for service configuration options. +- Use the [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) for endpoint and schema details. +- [View and manage the service]({{< relref "/operate/rc/context-engine/agent-memory/view-service" >}}) to update configuration, manage API keys, review metrics, flush memories, or delete the service. diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/reference.md b/content/develop/ai/context-engine/agent-memory/self-managed/reference.md index 92a466f68a..a742fba5db 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/reference.md +++ b/content/develop/ai/context-engine/agent-memory/self-managed/reference.md @@ -20,7 +20,7 @@ Use these files to configure a self-managed deployment: | `ram-values.yaml` | Helm values for images, replicas, services, Secret names, and optional Control Plane settings. | | `memory-dataplane.config.yaml` | Data Plane stores, Redis URLs, auth mode, embedding provider, and worker callback settings. | | `controlplane-onprem.config.yaml` | Control Plane metadata Redis, store Redis, admin-token auth, and embedding settings. | -| `license` | Agent Memory license file provided by Redis. | +| `license` | Redis Agent Memory license file provided by Redis. | ### External secret managers @@ -29,7 +29,7 @@ admin-token material to the chart as Kubernetes Secrets and set the chart's `existingSecret` values to those Secret names. Direct CSI file mounts that bypass Kubernetes Secrets are not supported for the -Agent Memory license, Data Plane config, Control Plane config, or Control Plane +Redis Agent Memory license, Data Plane config, Control Plane config, or Control Plane admin-token paths. For Secrets Store CSI Driver, use sync-to-Kubernetes-Secret @@ -44,7 +44,7 @@ CSI-synced Secrets, make sure a Control Plane pod also mounts the corresponding | --- | --- | --- | | `helm search repo redis-ai/redis-agent-memory --versions` returns no results | Helm repo not added/updated, or the chart version has not been published to the repo yet | Run `helm repo add`, `helm repo update`, or install from the chart package provided by Redis. | | Docker pull fails for the configured image tag | Image tag is wrong or has not been published to the configured registry | Use the image tag listed for the release on Docker Hub or provided by Redis. | -| Pod is stuck in `ImagePullBackOff` or `ErrImagePull` | Cluster cannot pull the configured image, image tag is wrong, registry requires credentials, or `imagePullSecrets` is missing/wrong | Verify `image.repository`, `image.tag`, registry reachability, and `imagePullSecrets`; use the Agent Memory release image tag. | +| Pod is stuck in `ImagePullBackOff` or `ErrImagePull` | Cluster cannot pull the configured image, image tag is wrong, registry requires credentials, or `imagePullSecrets` is missing/wrong | Verify `image.repository`, `image.tag`, registry reachability, and `imagePullSecrets`; use the Redis Agent Memory release image tag. | | `helm install --atomic --wait` times out and rolls back | Cluster is small or image pull/startup takes longer than Helm's default timeout | Install without `--atomic --wait`, or set a longer `--timeout` and ensure enough cluster capacity. | | Pods are pending during install or upgrade | CPU/memory capacity is insufficient for default replicas and rollout overlap | Add nodes/headroom or lower replicas for test deployments. | | Data Plane health fails | Pod not ready, config invalid, Redis unavailable, or license invalid | Check pod logs and call `/health`, `/health/liveness`, and `/health/readiness`. | @@ -69,5 +69,5 @@ CSI-synced Secrets, make sure a Control Plane pod also mounts the corresponding | NetworkPolicy reference | `deployment/redis-agent-memory/networkpolicy.reference.yaml` | | Redis Agent Memory API reference | [Redis Agent Memory API]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) | | Control Plane API reference | [Control Plane API reference]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference" >}}) | -| Agent Memory Data Plane image tags | [Docker Hub: redislabs/agent-memory](https://hub.docker.com/r/redislabs/agent-memory/tags) | -| Agent Memory Control Plane image tags | [Docker Hub: redislabs/agent-memory-control-plane](https://hub.docker.com/r/redislabs/agent-memory-control-plane/tags) | +| Redis Agent Memory Data Plane image tags | [Docker Hub: redislabs/agent-memory](https://hub.docker.com/r/redislabs/agent-memory/tags) | +| Redis Agent Memory Control Plane image tags | [Docker Hub: redislabs/agent-memory-control-plane](https://hub.docker.com/r/redislabs/agent-memory-control-plane/tags) | diff --git a/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md index 93e0ac4d4f..8d024b0da0 100644 --- a/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md @@ -4,14 +4,14 @@ categories: - docs - develop - ai -description: Connect to Redis Cloud Agent Memory with the TypeScript SDK and make session-memory and long-term-memory requests. +description: Connect to Redis Agent Memory on Redis Cloud with the TypeScript SDK and make session-memory and long-term-memory requests. hideListLinks: true linktitle: TypeScript SDK quickstart title: Redis Agent Memory TypeScript SDK quickstart weight: 8 --- -Use this quickstart to connect to a Redis Cloud Agent Memory service with the TypeScript SDK. You will add and retrieve a session event, create two long-term memories, and search them. +Use this quickstart to connect to a Redis Agent Memory service on Redis Cloud with the TypeScript SDK. You will add and retrieve a session event, create two long-term memories, and search them. ## Before you begin @@ -21,13 +21,13 @@ To complete this quickstart, you need: You also need Node.js and npm. -## Create an Agent Memory service +## Create a Redis Agent Memory service {{< embed-md "rc-agent-memory-quickstart-create-service.md" >}} ## Save the connection values -1. Open the Agent Memory service in the Redis Cloud console. +1. Open the Redis Agent Memory service in the Redis Cloud console. 1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. 1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). 1. Export the API key in your shell: @@ -40,7 +40,7 @@ Keep the API key out of source control, application logs, and other unsecured lo ## Install the SDK -Create a project and install the Agent Memory SDK: +Create a project and install the Redis Agent Memory SDK: ```sh mkdir agent-memory-quickstart @@ -56,7 +56,7 @@ In the code sample, replace `` and `` with the values you co The session, user, and memory IDs are example identifiers defined in the code. This quickstart uses the same user identifier for the event's `actorId` and the long-term memory's `ownerId`. -Create a file named `quickstart.ts` and initialize an `AgentMemory` client. The client uses the endpoint, Store ID, and API key to send requests to your Agent Memory service. +Create a file named `quickstart.ts` and initialize an `AgentMemory` client. The client uses the endpoint, Store ID, and API key to send requests to your Redis Agent Memory service. Call `health` before writing any memory to verify that the service is reachable and accepts the API key: @@ -110,7 +110,7 @@ A session contains an ordered sequence of events. Add the following code inside console.dir(event, { depth: null }); ``` -A successful request returns the stored event, including its generated event ID and system timestamp. If the session does not exist, Agent Memory creates it when the event is added. +A successful request returns the stored event, including its generated event ID and system timestamp. If the session does not exist, Redis Agent Memory creates it when the event is added. ## Retrieve the session @@ -281,5 +281,5 @@ run().catch((error) => { ## Next steps - Review the [TypeScript SDK package and reference](https://www.npmjs.com/package/@redis-iris/agent-memory). -- Review the [Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). +- Review the [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). - Try the [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}). diff --git a/content/embeds/rc-agent-memory-get-started.md b/content/embeds/rc-agent-memory-get-started.md index 6dffc53331..ea3f9d8351 100644 --- a/content/embeds/rc-agent-memory-get-started.md +++ b/content/embeds/rc-agent-memory-get-started.md @@ -1,3 +1,3 @@ -Follow the [Redis Cloud Agent Memory REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) to create a service and make your first session-memory and long-term-memory requests. +Follow the [Redis Cloud setup guide]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}) to create a Redis Agent Memory service. Then use the [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}) to make your first session-memory and long-term-memory requests. -After you set up Agent Memory, you can [view and manage your service]({{< relref "/operate/rc/context-engine/agent-memory/view-service" >}}). +After you set up Redis Agent Memory, you can [view and manage your service]({{< relref "/operate/rc/context-engine/agent-memory/view-service" >}}). diff --git a/content/embeds/rc-agent-memory-quickstart-create-service.md b/content/embeds/rc-agent-memory-quickstart-create-service.md index 0a7281e4ee..7ff6eba33f 100644 --- a/content/embeds/rc-agent-memory-quickstart-create-service.md +++ b/content/embeds/rc-agent-memory-quickstart-create-service.md @@ -2,10 +2,10 @@ 2. Select **Agent Memory** from the navigation menu. 3. If Redis Cloud displays the public-preview terms, review and accept them. 4. Select **Quick create** to use the default settings, or select **Create custom** and choose an eligible database. -5. After Redis Cloud creates the service, copy the Agent Memory API key and store it securely. +5. After Redis Cloud creates the service, copy the Redis Agent Memory API key and store it securely. {{< warning >}} -Redis Cloud displays the Agent Memory API key only once. If you lose it, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). +Redis Cloud displays the Redis Agent Memory API key only once. If you lose it, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). {{< /warning >}} -For screenshots and configuration details, see [create an Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}). +For screenshots and configuration details, see [create a Redis Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}). diff --git a/content/embeds/rc-agent-memory-quickstart-prerequisites.md b/content/embeds/rc-agent-memory-quickstart-prerequisites.md index cfee3f4122..015c42aa80 100644 --- a/content/embeds/rc-agent-memory-quickstart-prerequisites.md +++ b/content/embeds/rc-agent-memory-quickstart-prerequisites.md @@ -1,8 +1,8 @@ -* A Redis Cloud account that can create Agent Memory services. +* A Redis Cloud account that can create Redis Agent Memory services. * An eligible Redis Cloud database, or permission to create one. The database must be active, run a supported Redis version, and use a Pro or Essentials plan. It must also have a public endpoint, Redis Search, and the default user enabled. -Agent Memory doesn't support Flex, Active-Active, or AWS PrivateLink databases during public preview. +Redis Agent Memory doesn't support Flex, Active-Active, or AWS PrivateLink databases during public preview. For the complete list, see [prerequisites and limitations]({{< relref "/operate/rc/context-engine/agent-memory/create-service#prerequisites-and-limitations" >}}). From 51ff3f033cf3197700a7795afcae174e9bb29f91 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Mon, 3 Aug 2026 15:16:58 +0200 Subject: [PATCH 08/14] docs: move self-managed Agent Memory under Redis Iris --- .../ai/context-engine/agent-memory/_index.md | 2 +- .../self-managed/plan-deployment.md | 44 ------------------ content/operate/_index.md | 4 +- content/operate/iris/_index.md | 16 +++---- content/operate/iris/agent-memory/_index.md | 28 +++++++++++ .../iris}/agent-memory/self-managed/_index.md | 44 +++++++++--------- .../agent-memory/self-managed/api-examples.md | 12 +++-- .../self-managed/authentication.md | 44 +++++++++--------- .../control-plane-api-reference.md | 2 + .../openapi-control-plane.json | 0 .../self-managed/data-plane-configuration.md | 10 ++-- .../self-managed/deploy-control-plane.md | 13 +++--- .../self-managed/deploy-static.md | 9 ++-- .../agent-memory/self-managed/operations.md | 24 +++++----- .../self-managed/plan-deployment.md | 46 +++++++++++++++++++ .../self-managed/prerequisites.md | 40 ++++++++-------- .../agent-memory/self-managed/reference.md | 8 ++-- layouts/operate/list.html | 12 ++--- 18 files changed, 200 insertions(+), 158 deletions(-) delete mode 100644 content/develop/ai/context-engine/agent-memory/self-managed/plan-deployment.md create mode 100644 content/operate/iris/agent-memory/_index.md rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/_index.md (66%) rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/api-examples.md (92%) rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/authentication.md (81%) rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/control-plane-api-reference.md (71%) rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/control-plane-api-reference/openapi-control-plane.json (100%) rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/data-plane-configuration.md (92%) rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/deploy-control-plane.md (90%) rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/deploy-static.md (91%) rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/operations.md (90%) create mode 100644 content/operate/iris/agent-memory/self-managed/plan-deployment.md rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/prerequisites.md (84%) rename content/{develop/ai/context-engine => operate/iris}/agent-memory/self-managed/reference.md (97%) diff --git a/content/develop/ai/context-engine/agent-memory/_index.md b/content/develop/ai/context-engine/agent-memory/_index.md index 509fd05e79..6e3715d31e 100644 --- a/content/develop/ai/context-engine/agent-memory/_index.md +++ b/content/develop/ai/context-engine/agent-memory/_index.md @@ -94,7 +94,7 @@ Get started with Redis Agent Memory on Redis Cloud or join the private preview f

    Redis Software private preview

    Deploy Redis Agent Memory on Kubernetes with Redis Software.

    -

    Open the self-managed deployment guide

    +

    Open the self-managed deployment guide

    diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/plan-deployment.md b/content/develop/ai/context-engine/agent-memory/self-managed/plan-deployment.md deleted file mode 100644 index f4fe07ba97..0000000000 --- a/content/develop/ai/context-engine/agent-memory/self-managed/plan-deployment.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -Title: Plan a self-managed Agent Memory deployment -alwaysopen: false -categories: -- docs -- develop -- ai -description: Choose a self-managed Redis Agent Memory deployment mode before installing the Helm chart. -linkTitle: Plan a deployment -weight: 10 -hideListLinks: true ---- - -Choose the deployment mode before you create Redis databases, configuration -Secrets, or Helm values. - -## Deployment modes - -{{< table-scrollable >}} -| Mode | What it deploys | Redis databases | Data Plane auth | Start here | -| --- | --- | --- | --- | --- | -| Static stores | Data Plane and, when enabled, Agent Memory workers. Stores are declared directly in `memory-dataplane.config.yaml`. | Store Redis. Job Redis when workers are enabled. | Disabled at the Agent Memory layer. Protect access with Kubernetes, ingress, gateway, or service-mesh controls. | [Deploy with static stores]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/deploy-static" >}}) | -| Control Plane managed stores | Data Plane, Control Plane, and, when enabled, Agent Memory workers. Stores and agent keys are managed at runtime. | Store Redis, Metadata Redis, and Job Redis when workers are enabled. | Auth-disabled Data Plane or Agent Memory agent keys. | [Deploy with Control Plane managed stores]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/deploy-control-plane" >}}) | -{{< /table-scrollable >}} - -## Mode rules - -Do not combine static `metadata.stores` with Control Plane managed store -metadata in the same Data Plane config. Static stores do not use Metadata Redis. -Control Plane managed stores use `metadata.source: live` and require Metadata -Redis. - -Agent-key authentication requires Control Plane managed stores because the Data -Plane reads agent-key records and store grants from Metadata Redis. - -The walkthroughs in this section use `redis-agent-memory` as the Helm release -name. If you choose a different release name, update release-derived service and -deployment names in the verification commands. - -## Before you deploy - -1. Review [prerequisites]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/prerequisites" >}}). -1. Prepare the appropriate [Data Plane configuration]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/data-plane-configuration" >}}). -1. Follow either [Deploy with static stores]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/deploy-static" >}}) or [Deploy with Control Plane managed stores]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/deploy-control-plane" >}}). diff --git a/content/operate/_index.md b/content/operate/_index.md index 83a45069bd..e63af0ab41 100644 --- a/content/operate/_index.md +++ b/content/operate/_index.md @@ -12,8 +12,8 @@ hideListLinks: true |
    • [Install Redis 8 in Redis Open Source]({{< relref "/operate/oss_and_stack/install/install-stack" >}})
    • [Install Redis Stack]({{< relref "/operate/oss_and_stack/install/archive/install-stack/" >}}) (≤ 7.4)
    • [Manage Redis]({{< relref "/operate/oss_and_stack/management" >}})
    |
    • [Deploy Redis for Kubernetes]({{< relref "/operate/kubernetes/deployment" >}})
    • [Architecture]({{< relref "/operate/kubernetes/architecture" >}})
    • [API Reference]({{< relref "/operate/kubernetes/reference" >}})
    | | {{}} **Redis Insight** | {{}} **Redis Data Integration (RDI)** | |
    • [Install Redis Insight]({{< relref "/operate/redisinsight/install" >}})
    • [Use Redis Insight]({{< relref "/develop/tools/insight" >}})
    • [Download Redis Insight](https://redis.io/downloads/#insight)
    |
    • [RDI overview]({{< relref "/integrate/redis-data-integration/" >}})
    • [Install RDI]({{< relref "/integrate/redis-data-integration/installation" >}})
    • [RDI pipelines]({{< relref "/integrate/redis-data-integration/data-pipelines" >}})
    | -| {{}} **Redis Iris** | {{}} **Redis Feature Form** | -|
    • [Redis Iris overview]({{< relref "/operate/iris" >}})
    • [Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}})
    • [Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever" >}})
    • [Redis Iris on Redis Cloud]({{< relref "/operate/rc/context-engine" >}})
    |
    • [Feature Form overview]({{< relref "/operate/featureform" >}})
    • [Deploy Feature Form]({{< relref "/operate/featureform/deploy" >}})
    • [Configure authentication]({{< relref "/operate/featureform/configure-auth" >}})
    | +| {{}} **Redis Iris context engine** | {{}} **Redis Feature Form** | +|
    • [Redis Iris context engine overview]({{< relref "/operate/iris" >}})
    • [Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}})
    • [Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever" >}})
    • [Redis Iris on Redis Cloud]({{< relref "/operate/rc/context-engine" >}})
    |
    • [Feature Form overview]({{< relref "/operate/featureform" >}})
    • [Deploy Feature Form]({{< relref "/operate/featureform/deploy" >}})
    • [Configure authentication]({{< relref "/operate/featureform/configure-auth" >}})
    | ## Product features diff --git a/content/operate/iris/_index.md b/content/operate/iris/_index.md index bd13763a39..82310e7c4d 100644 --- a/content/operate/iris/_index.md +++ b/content/operate/iris/_index.md @@ -1,7 +1,7 @@ --- -title: Redis Iris -description: Deploy and operate Redis Iris services, including Agent Memory and Context Retriever, on your own infrastructure. -linkTitle: Redis Iris +title: Redis Iris context engine +description: Deploy and operate Redis Iris services, including Redis Agent Memory and Context Retriever, on your own infrastructure. +linkTitle: Redis Iris context engine alwaysopen: false categories: - docs @@ -13,25 +13,25 @@ weight: 45 Give your AI agents the context layer they need to act reliably on business data, deployed on your own infrastructure. -Redis Iris is a suite of AI context services built on Redis. Two of the services, Agent Memory and Context Retriever, are available for self-hosting so you can run them on your own infrastructure while keeping full control of your data. All services are also available as fully managed on [Redis Cloud]({{< relref "/operate/rc/context-engine" >}}). +Redis Iris is a suite of AI context services built on Redis. Two of the services, Redis Agent Memory and Context Retriever, are available for self-hosting so you can run them on your own infrastructure while keeping full control of your data. All services are also available as fully managed on [Redis Cloud]({{< relref "/operate/rc/context-engine" >}}).
    - {{< image-card image="images/ai-brain.svg" alt="Agent Memory icon" title="Agent Memory" url="/develop/ai/context-engine/agent-memory" description="Self-hostable. Store session memory and long-term memory for your agents using Redis." >}} + {{< image-card image="images/ai-brain.svg" alt="Redis Agent Memory icon" title="Redis Agent Memory" url="/operate/iris/agent-memory" description="Deploy and operate Redis Agent Memory on your own infrastructure." >}} {{< image-card image="images/ai-cube.svg" alt="Context Retriever icon" title="Context Retriever" url="/develop/ai/context-engine/context-retriever" description="Self-hostable. Define your data model once and generate the tools agents call at runtime." >}}
    ## Self-hosted Redis Iris services -### Agent Memory +### Redis Agent Memory [Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) gives AI agents a persistent, structured memory layer using a two-tier model: - **Session memory**: Holds the current conversation state with configurable TTL-based expiration. - **Long-term memory**: Stores information extracted from past sessions as text with vector embeddings for semantic retrieval. -Agent Memory is available as a REST API and Python SDK. You can self-host it on your own infrastructure or use it as a fully managed service on Redis Cloud. +Redis Agent Memory is available as a REST API and Python SDK. You can self-host it on your own infrastructure or use it as a fully managed service on Redis Cloud. -[Install Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory/self-managed" >}}) +[Open the self-managed Redis Agent Memory documentation]({{< relref "/operate/iris/agent-memory/self-managed" >}}) ### Context Retriever diff --git a/content/operate/iris/agent-memory/_index.md b/content/operate/iris/agent-memory/_index.md new file mode 100644 index 0000000000..9c7d43b93b --- /dev/null +++ b/content/operate/iris/agent-memory/_index.md @@ -0,0 +1,28 @@ +--- +title: Redis Agent Memory +description: Deploy and operate Redis Agent Memory on your own infrastructure. +linkTitle: Redis Agent Memory +alwaysopen: false +categories: +- docs +- operate +- iris +weight: 10 +hideListLinks: true +--- + +Redis Agent Memory provides persistent session memory and long-term memory for AI agents and applications. + +## Deployment options + +### Self-managed + +Deploy, configure, secure, and operate Redis Agent Memory on your own Kubernetes infrastructure. + +[Open the self-managed Redis Agent Memory documentation]({{< relref "/operate/iris/agent-memory/self-managed" >}}) + +### Redis Cloud + +Use Redis Agent Memory as a managed service on Redis Cloud. + +[Open the Redis Cloud setup guide]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}) diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/_index.md b/content/operate/iris/agent-memory/self-managed/_index.md similarity index 66% rename from content/develop/ai/context-engine/agent-memory/self-managed/_index.md rename to content/operate/iris/agent-memory/self-managed/_index.md index 201174bfa5..9ae637b429 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/_index.md +++ b/content/operate/iris/agent-memory/self-managed/_index.md @@ -3,24 +3,26 @@ Title: Self-managed Redis Agent Memory alwaysopen: false categories: - docs -- develop -- ai +- operate +- iris description: Deploy, configure, secure, and operate Redis Agent Memory on a self-managed Kubernetes cluster. -linkTitle: Self-managed Agent Memory +linkTitle: Self-managed weight: 40 hideListLinks: true +aliases: +- /develop/ai/context-engine/agent-memory/self-managed/ --- Redis Agent Memory provides persistent memory for AI agents and applications. Applications write conversation events and long-term memories to -Agent Memory, then query Agent Memory for relevant context before calling an LLM. +Redis Agent Memory, then query Redis Agent Memory for relevant context before calling an LLM. This guide covers deployment, configuration, security, validation, API examples, -and operations for self-managed Agent Memory. +and operations for self-managed Redis Agent Memory. The [Redis Agent Memory API]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) is the shared Data Plane API for Redis Cloud and self-managed deployments. The -[Control Plane API reference]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference" >}}) +[Control Plane API reference]({{< relref "/operate/iris/agent-memory/self-managed/control-plane-api-reference" >}}) documents the self-managed admin endpoints for stores and agent keys. {{< note >}} @@ -31,15 +33,15 @@ license key to deploy it. Contact your Redis representative or ## What you are deploying -A standard self-managed Agent Memory deployment contains: +A standard self-managed Redis Agent Memory deployment contains: | Component | Purpose | Default service | | --- | --- | --- | -| Agent Memory Data Plane | Store-scoped runtime memory API. | `redis-agent-memory:9000` | -| Agent Memory worker | Background promotion, summarization, and forgetting work. | No public service | -| Agent Memory Control Plane | Optional admin API for creating stores and managing agent keys. | `redis-agent-memory-controlplane:9100` | +| Redis Agent Memory Data Plane | Store-scoped runtime memory API. | `redis-agent-memory:9000` | +| Redis Agent Memory worker | Background promotion, summarization, and forgetting work. | No public service | +| Redis Agent Memory Control Plane | Optional admin API for creating stores and managing agent keys. | `redis-agent-memory-controlplane:9100` | | Store Redis | Holds session memory, long-term memory, indexes, and TTL data. | Customer-provided | -| Job Redis | Holds background work for Agent Memory workers. | Customer-provided | +| Job Redis | Holds background work for Redis Agent Memory workers. | Customer-provided | | Metadata Redis | Holds Control Plane store records and agent-key records. | Required for Control Plane managed stores and agent keys | ### How the components work together @@ -49,9 +51,9 @@ handles store and agent-key administration. | Flow | Caller | Service | Backing Redis | | --- | --- | --- | --- | -| Store and key administration | Platform admin | Agent Memory Control Plane | Metadata Redis | -| Runtime memory requests | Agent, app, or gateway | Agent Memory Data Plane | Store Redis | -| Background memory processing | Agent Memory worker | Agent Memory Data Plane | Job Redis and Store Redis | +| Store and key administration | Platform admin | Redis Agent Memory Control Plane | Metadata Redis | +| Runtime memory requests | Agent, app, or gateway | Redis Agent Memory Data Plane | Store Redis | +| Background memory processing | Redis Agent Memory worker | Redis Agent Memory Data Plane | Job Redis and Store Redis | 1. Platform admins use the Control Plane to create stores and agent keys. 1. The Control Plane stores store records and agent-key grants in Metadata Redis. @@ -77,21 +79,21 @@ Session memory keeps conversation continuity within a session. Long-term memory provides searchable context across sessions. Long-term memory `memoryType` is an open identifier. When omitted on create, -Agent Memory stores the record as `semantic`; built-in names include `semantic`, +Redis Agent Memory stores the record as `semantic`; built-in names include `semantic`, `episodic`, `message`, and `session_summary_view`. ## Deployment modes -Start with [Plan a deployment]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/plan-deployment" >}}) +Start with [Plan a deployment]({{< relref "/operate/iris/agent-memory/self-managed/plan-deployment" >}}) to choose between static stores and Control Plane managed stores. | If you need to | Go to | | --- | --- | -| Review software, Redis, network, Secret, image, and sizing requirements | [Prerequisites]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/prerequisites" >}}) | -| Prepare `memory-dataplane.config.yaml` for either deployment mode | [Data Plane configuration]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/data-plane-configuration" >}}) | -| Deploy a first-install or single-store setup without the Control Plane | [Deploy with static stores]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/deploy-static" >}}) | -| Deploy runtime store and agent-key administration | [Deploy with Control Plane managed stores]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/deploy-control-plane" >}}) | +| Review software, Redis, network, Secret, image, and sizing requirements | [Prerequisites]({{< relref "/operate/iris/agent-memory/self-managed/prerequisites" >}}) | +| Prepare `memory-dataplane.config.yaml` for either deployment mode | [Data Plane configuration]({{< relref "/operate/iris/agent-memory/self-managed/data-plane-configuration" >}}) | +| Deploy a first-install or single-store setup without the Control Plane | [Deploy with static stores]({{< relref "/operate/iris/agent-memory/self-managed/deploy-static" >}}) | +| Deploy runtime store and agent-key administration | [Deploy with Control Plane managed stores]({{< relref "/operate/iris/agent-memory/self-managed/deploy-control-plane" >}}) | Do not combine static `metadata.stores` with Control Plane managed store metadata in the same Data Plane config. Static stores do not use Metadata Redis. @@ -100,7 +102,7 @@ Redis. {{< warning >}} Do not expose an auth-disabled Data Plane to untrusted callers. In auth-disabled -mode, Agent Memory does not authenticate or authorize Data Plane requests; any caller that +mode, Redis Agent Memory does not authenticate or authorize Data Plane requests; any caller that can reach the API can read or write memory for configured stores. Use that mode only when Kubernetes NetworkPolicy, private service exposure, ingress/gateway policy, service mesh, or equivalent controls restrict access to trusted diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/api-examples.md b/content/operate/iris/agent-memory/self-managed/api-examples.md similarity index 92% rename from content/develop/ai/context-engine/agent-memory/self-managed/api-examples.md rename to content/operate/iris/agent-memory/self-managed/api-examples.md index 0cb05abd8a..d4efc28457 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/api-examples.md +++ b/content/operate/iris/agent-memory/self-managed/api-examples.md @@ -3,23 +3,25 @@ Title: Self-managed API examples alwaysopen: false categories: - docs -- develop -- ai +- operate +- iris description: Use curl examples with the Redis Agent Memory self-managed Control Plane and Data Plane APIs. linkTitle: Self-managed API examples weight: 70 hideListLinks: true +aliases: +- /develop/ai/context-engine/agent-memory/self-managed/api-examples/ --- These examples show self-managed Control Plane and Data Plane requests. They assume either an auth-disabled private Data Plane or agent-key auth -configured as described in [Authentication and authorization]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/authentication" >}}). +configured as described in [Authentication and authorization]({{< relref "/operate/iris/agent-memory/self-managed/authentication" >}}). For the complete shared Data Plane schema, see the [Redis Agent Memory API]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). For the self-managed admin schema, see the -[Control Plane API reference]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference" >}}). +[Control Plane API reference]({{< relref "/operate/iris/agent-memory/self-managed/control-plane-api-reference" >}}). ## Control Plane API examples @@ -136,7 +138,7 @@ Request body fields: | `role` | Required. Use `USER`, `ASSISTANT`, or `SYSTEM`. | | `content` | Required. For text, use a content object such as `{"text": "..."}`. | | `createdAt` | Required. Use an RFC 3339 timestamp, for example `2026-06-25T18:00:00Z`. | -| `sessionId` | Optional. If omitted, Agent Memory generates one. | +| `sessionId` | Optional. If omitted, Redis Agent Memory generates one. | ### Read session memory diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/authentication.md b/content/operate/iris/agent-memory/self-managed/authentication.md similarity index 81% rename from content/develop/ai/context-engine/agent-memory/self-managed/authentication.md rename to content/operate/iris/agent-memory/self-managed/authentication.md index 87823aba56..ff75435fc6 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/authentication.md +++ b/content/operate/iris/agent-memory/self-managed/authentication.md @@ -3,20 +3,22 @@ Title: Authentication and authorization alwaysopen: false categories: - docs -- develop -- ai +- operate +- iris description: Configure Redis Agent Memory self-managed Control Plane authentication, Data Plane auth modes, worker callbacks, and gateway integration. linkTitle: Authentication and authorization weight: 60 hideListLinks: true +aliases: +- /develop/ai/context-engine/agent-memory/self-managed/authentication/ --- -Self-managed Agent Memory uses separate authentication models for the Control +Self-managed Redis Agent Memory uses separate authentication models for the Control Plane and Data Plane. The Control Plane uses an admin token for management endpoints. The Data Plane -can run behind infrastructure controls with Agent Memory auth disabled, or it -can validate Agent Memory agent keys and enforce store-level grants. +can run behind infrastructure controls with Redis Agent Memory auth disabled, or it +can validate Redis Agent Memory agent keys and enforce store-level grants. ## Control Plane admin token @@ -47,7 +49,7 @@ Choose the Data Plane auth mode based on how callers reach the Data Plane. | Mode | Config | Use when | | --- | --- | --- | | Auth-disabled Data Plane | `auth.method: none` | The Data Plane is reachable only by trusted internal components. | -| Agent-key authentication | `auth.method: agent_key` | Agent Memory should validate keys and enforce per-store grants. | +| Agent-key authentication | `auth.method: agent_key` | Redis Agent Memory should validate keys and enforce per-store grants. | ### Auth-disabled Data Plane @@ -61,7 +63,7 @@ components. {{< warning >}} Do not expose an auth-disabled Data Plane to untrusted callers. In auth-disabled -mode, Agent Memory does not authenticate or authorize Data Plane requests; any +mode, Redis Agent Memory does not authenticate or authorize Data Plane requests; any caller that can reach the API can read or write memory for configured stores. {{< /warning >}} @@ -79,7 +81,7 @@ Starting from static store configuration, make these changes: 4. Add the `embedding` selection block. 5. Keep `embedders_connection_details` for the embedder endpoint and credentials. -6. If Agent Memory workers are enabled, configure worker identity as described in +6. If Redis Agent Memory workers are enabled, configure worker identity as described in [Worker callbacks](#worker-callbacks) so worker-to-Data Plane calls carry an accepted credential. @@ -120,7 +122,7 @@ embedders_connection_details: queue_size: 1000 ``` -When the Data Plane uses `metadata.source: live`, Agent Memory defaults to +When the Data Plane uses `metadata.source: live`, Redis Agent Memory defaults to `auth.method: agent_key` when no auth method is configured. Set it explicitly in production values so the intended security posture is visible in review. If agent-key auth is enabled without `metadata.source: live`, the Data Plane fails @@ -136,7 +138,7 @@ Treat agent keys as opaque credentials. Do not parse their contents. ## Store authorization and grants -For agent-key requests, Agent Memory checks both identity and resource +For agent-key requests, Redis Agent Memory checks both identity and resource authorization: 1. The key exists in metadata Redis and its secret validates. @@ -161,10 +163,10 @@ Operation mapping: ## Worker callbacks -Agent Memory workers consume background jobs and call the Data Plane to read +Redis Agent Memory workers consume background jobs and call the Data Plane to read session events and write extracted long-term memories. -For deployments where Agent Memory Data Plane auth is enabled, workers should +For deployments where Redis Agent Memory Data Plane auth is enabled, workers should authenticate with Kubernetes projected service-account tokens. The Helm `workerAuth.enabled` preset creates or uses a worker ServiceAccount and mounts a projected token into the worker pod. The Data Plane must also be configured to @@ -223,7 +225,7 @@ Configure worker identity to: - Trust one or more exact Kubernetes service-account subjects. - Validate worker tokens by issuer, JWKS URI, audience, and signing algorithm. -- Map each trusted subject to an Agent Memory `Principal` with roles, scopes, +- Map each trusted subject to a Redis Agent Memory `Principal` with roles, scopes, and resource grants. - Grant store access with resource keys such as `mem-store:`. - Use `mem-store:*` for a shared worker identity, or use narrower store grants @@ -232,7 +234,7 @@ Configure worker identity to: `write`. The Helm ServiceAccount/token settings only provide the Kubernetes credential. -Agent Memory authorization still comes from the server-side +Redis Agent Memory authorization still comes from the server-side `auth.worker_identity` subject grants. If worker auth is not configured, keep the Data Plane auth-disabled and reachable only by trusted internal components. @@ -240,7 +242,7 @@ the Data Plane auth-disabled and reachable only by trusted internal components. Use a gateway when it owns external authentication and coarse policy. For example, a gateway can authenticate callers through an identity provider before -it forwards requests to Agent Memory. +it forwards requests to Redis Agent Memory. If the gateway also owns the standard `Authorization` header, forward the Agent Memory key in `X-Api-Key`: @@ -250,15 +252,15 @@ Authorization: Bearer X-Api-Key: ``` -Agent Memory uses `X-Api-Key` as the Agent Memory credential when present. The -gateway token is still available to the gateway, but Agent Memory authorizes the -request from the server-side grants attached to the Agent Memory key. +Redis Agent Memory uses `X-Api-Key` as the Redis Agent Memory credential when present. The +gateway token is still available to the gateway, but Redis Agent Memory authorizes the +request from the server-side grants attached to the Redis Agent Memory key. Gateway rules: - The gateway owns external authentication and perimeter policy. -- Agent Memory owns store-level authorization. -- Agent Memory keys are stored and forwarded by trusted infrastructure or +- Redis Agent Memory owns store-level authorization. +- Redis Agent Memory keys are stored and forwarded by trusted infrastructure or trusted applications. - Callers must not be able to bypass the gateway and reach the Data Plane - directly unless they also present a valid Agent Memory credential. + directly unless they also present a valid Redis Agent Memory credential. diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference.md b/content/operate/iris/agent-memory/self-managed/control-plane-api-reference.md similarity index 71% rename from content/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference.md rename to content/operate/iris/agent-memory/self-managed/control-plane-api-reference.md index a79f0687a0..c8e986bf93 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference.md +++ b/content/operate/iris/agent-memory/self-managed/control-plane-api-reference.md @@ -4,6 +4,8 @@ linkTitle: Control Plane API reference layout: apireference type: page weight: 80 +aliases: +- /develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference/ params: sourcefile: ./openapi-control-plane.json sortOperationsAlphabetically: false diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference/openapi-control-plane.json b/content/operate/iris/agent-memory/self-managed/control-plane-api-reference/openapi-control-plane.json similarity index 100% rename from content/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference/openapi-control-plane.json rename to content/operate/iris/agent-memory/self-managed/control-plane-api-reference/openapi-control-plane.json diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/data-plane-configuration.md b/content/operate/iris/agent-memory/self-managed/data-plane-configuration.md similarity index 92% rename from content/develop/ai/context-engine/agent-memory/self-managed/data-plane-configuration.md rename to content/operate/iris/agent-memory/self-managed/data-plane-configuration.md index f5d79e7544..e1151b0287 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/data-plane-configuration.md +++ b/content/operate/iris/agent-memory/self-managed/data-plane-configuration.md @@ -3,12 +3,14 @@ Title: Data Plane configuration alwaysopen: false categories: - docs -- develop -- ai +- operate +- iris description: Configure the Redis Agent Memory Data Plane for static stores or Control Plane managed stores. linkTitle: Data Plane configuration weight: 30 hideListLinks: true +aliases: +- /develop/ai/context-engine/agent-memory/self-managed/data-plane-configuration/ --- The Data Plane reads `memory-dataplane.config.yaml` from a Kubernetes Secret. @@ -169,8 +171,8 @@ promote_session_memory: ``` This Control Plane managed example leaves Data Plane auth disabled at the Agent -Memory layer. To use Agent Memory agent keys, set `auth.method: agent_key` and -follow [Authentication and authorization]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/authentication" >}}). +Memory layer. To use Redis Agent Memory agent keys, set `auth.method: agent_key` and +follow [Authentication and authorization]({{< relref "/operate/iris/agent-memory/self-managed/authentication" >}}). ## Secret key diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/deploy-control-plane.md b/content/operate/iris/agent-memory/self-managed/deploy-control-plane.md similarity index 90% rename from content/develop/ai/context-engine/agent-memory/self-managed/deploy-control-plane.md rename to content/operate/iris/agent-memory/self-managed/deploy-control-plane.md index 04f871bd08..99c0fbdc2b 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/deploy-control-plane.md +++ b/content/operate/iris/agent-memory/self-managed/deploy-control-plane.md @@ -3,23 +3,24 @@ Title: Deploy with Control Plane managed stores alwaysopen: false categories: - docs -- develop -- ai +- operate +- iris description: Deploy Redis Agent Memory with stores managed by the self-managed Control Plane. linkTitle: Deploy with Control Plane managed stores weight: 50 hideListLinks: true aliases: - /develop/ai/context-engine/agent-memory/self-managed/control-plane/ +- /develop/ai/context-engine/agent-memory/self-managed/deploy-control-plane/ --- Use Control Plane managed stores when operators need to create stores or agent keys at runtime. In this mode, the Data Plane reads store and agent-key records from Metadata Redis. -Before you begin, review [prerequisites]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/prerequisites" >}}) +Before you begin, review [prerequisites]({{< relref "/operate/iris/agent-memory/self-managed/prerequisites" >}}) and create `memory-dataplane.config.yaml` from the -[Control Plane managed stores example]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/data-plane-configuration#control-plane-managed-stores-example" >}}). +[Control Plane managed stores example]({{< relref "/operate/iris/agent-memory/self-managed/data-plane-configuration#control-plane-managed-stores-example" >}}). ## Create the namespace @@ -226,7 +227,7 @@ curl -H "Authorization: Bearer " \ ``` For the full self-managed admin API schema, see the -[Control Plane API reference]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference" >}}). +[Control Plane API reference]({{< relref "/operate/iris/agent-memory/self-managed/control-plane-api-reference" >}}). After you deploy Control Plane managed stores, configure Data Plane auth in -[Authentication and authorization]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/authentication" >}}). +[Authentication and authorization]({{< relref "/operate/iris/agent-memory/self-managed/authentication" >}}). diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/deploy-static.md b/content/operate/iris/agent-memory/self-managed/deploy-static.md similarity index 91% rename from content/develop/ai/context-engine/agent-memory/self-managed/deploy-static.md rename to content/operate/iris/agent-memory/self-managed/deploy-static.md index 77f67c0df9..40048f66c6 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/deploy-static.md +++ b/content/operate/iris/agent-memory/self-managed/deploy-static.md @@ -3,23 +3,24 @@ Title: Deploy with static stores alwaysopen: false categories: - docs -- develop -- ai +- operate +- iris description: Deploy Redis Agent Memory with static stores and no Control Plane. linkTitle: Deploy with static stores weight: 40 hideListLinks: true aliases: - /develop/ai/context-engine/agent-memory/self-managed/install-k8s/ +- /develop/ai/context-engine/agent-memory/self-managed/deploy-static/ --- Use static stores for a first install or a private single-store deployment. In this mode, stores are declared directly in Data Plane configuration. The deployment does not include the Control Plane and does not use Metadata Redis. -Before you begin, review [prerequisites]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/prerequisites" >}}) +Before you begin, review [prerequisites]({{< relref "/operate/iris/agent-memory/self-managed/prerequisites" >}}) and create `memory-dataplane.config.yaml` from the -[static stores example]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/data-plane-configuration#static-stores-example" >}}). +[static stores example]({{< relref "/operate/iris/agent-memory/self-managed/data-plane-configuration#static-stores-example" >}}). ## Create the namespace diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/operations.md b/content/operate/iris/agent-memory/self-managed/operations.md similarity index 90% rename from content/develop/ai/context-engine/agent-memory/self-managed/operations.md rename to content/operate/iris/agent-memory/self-managed/operations.md index b081265e4f..4997f92a4e 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/operations.md +++ b/content/operate/iris/agent-memory/self-managed/operations.md @@ -3,12 +3,14 @@ Title: Operations alwaysopen: false categories: - docs -- develop -- ai +- operate +- iris description: Operate Redis Agent Memory with backups, secret rotation, updates, FIPS posture, and network policy. linkTitle: Operations weight: 90 hideListLinks: true +aliases: +- /develop/ai/context-engine/agent-memory/self-managed/operations/ --- ## Backups @@ -28,7 +30,7 @@ hideListLinks: true ## Secret rotation -Rotate Agent Memory agent keys through the Control Plane API: +Rotate Redis Agent Memory agent keys through the Control Plane API: ```bash curl -sS -X POST "$CP_URL/v1/api-keys//rotate" \ @@ -49,9 +51,9 @@ kubectl -n create secret generic ram-controlplane-admin-token \ -o yaml | kubectl apply -f - ``` -Rotate the Agent Memory license by updating the license Secret and changing +Rotate the Redis Agent Memory license by updating the license Secret and changing `license.existingSecretChecksum` so Helm rolls the Data Plane and worker pods. -Agent Memory reads and validates the license file during process startup; updating only +Redis Agent Memory reads and validates the license file during process startup; updating only the Secret data is not sufficient. ```bash @@ -194,10 +196,10 @@ When the posture is active, the Data Plane and worker reject config that: The Control Plane runs under the same posture and rejects non-`rediss://` `metadata.urls` or `store_db.urls`. -The Agent Memory API listener itself speaks HTTP inside the cluster. Edge TLS termination +The Redis Agent Memory API listener itself speaks HTTP inside the cluster. Edge TLS termination is owned by the hosting environment, such as ingress, service mesh, or external load balancer. Outbound TLS to Redis, embedding providers, LLM providers, and -worker callback endpoints is configured through Agent Memory config and is covered by the +worker callback endpoints is configured through Redis Agent Memory config and is covered by the posture checks. Verify the runtime posture with: @@ -216,7 +218,7 @@ override the container command to configure it. For auth-disabled Data Plane deployments, restrict access to trusted callers. For agent-key deployments behind a gateway, prevent direct bypass paths unless -the direct caller also has a valid Agent Memory credential. +the direct caller also has a valid Redis Agent Memory credential. The chart includes `deployment/redis-agent-memory/networkpolicy.reference.yaml` as a reference manifest. It is not templated because allowed callers are @@ -224,15 +226,15 @@ environment-specific. Customize the placeholders before applying it: -- ``: namespace where Agent Memory is installed. +- ``: namespace where Redis Agent Memory is installed. - `redis-agent-memory`: Helm release name used in this guide. If you use a different release name, update release-derived service and deployment names. `nameOverride` and `fullnameOverride` change rendered resource names, but the `app.kubernetes.io/instance` selector remains the Helm release name. - `` and caller pod labels: ingress controller, service mesh - gateway, application pod, or approved internal caller allowed to call Agent Memory. + gateway, application pod, or approved internal caller allowed to call Redis Agent Memory. -The reference policy default-denies ingress to Agent Memory chart pods, then allows TCP +The reference policy default-denies ingress to Redis Agent Memory chart pods, then allows TCP traffic to server pods on port `9000` from approved callers and the worker Deployment. It also includes a Control Plane stanza for port `9100` when `controlplane.enabled=true`. Review the manifest against the customer's CNI, diff --git a/content/operate/iris/agent-memory/self-managed/plan-deployment.md b/content/operate/iris/agent-memory/self-managed/plan-deployment.md new file mode 100644 index 0000000000..7009d5f620 --- /dev/null +++ b/content/operate/iris/agent-memory/self-managed/plan-deployment.md @@ -0,0 +1,46 @@ +--- +Title: Plan a self-managed Redis Agent Memory deployment +alwaysopen: false +categories: +- docs +- operate +- iris +description: Choose a self-managed Redis Agent Memory deployment mode before installing the Helm chart. +linkTitle: Plan a deployment +weight: 10 +hideListLinks: true +aliases: +- /develop/ai/context-engine/agent-memory/self-managed/plan-deployment/ +--- + +Choose the deployment mode before you create Redis databases, configuration +Secrets, or Helm values. + +## Deployment modes + +{{< table-scrollable >}} +| Mode | What it deploys | Redis databases | Data Plane auth | Start here | +| --- | --- | --- | --- | --- | +| Static stores | Data Plane and, when enabled, Redis Agent Memory workers. Stores are declared directly in `memory-dataplane.config.yaml`. | Store Redis. Job Redis when workers are enabled. | Disabled at the Redis Agent Memory layer. Protect access with Kubernetes, ingress, gateway, or service-mesh controls. | [Deploy with static stores]({{< relref "/operate/iris/agent-memory/self-managed/deploy-static" >}}) | +| Control Plane managed stores | Data Plane, Control Plane, and, when enabled, Redis Agent Memory workers. Stores and agent keys are managed at runtime. | Store Redis, Metadata Redis, and Job Redis when workers are enabled. | Auth-disabled Data Plane or Redis Agent Memory agent keys. | [Deploy with Control Plane managed stores]({{< relref "/operate/iris/agent-memory/self-managed/deploy-control-plane" >}}) | +{{< /table-scrollable >}} + +## Mode rules + +Do not combine static `metadata.stores` with Control Plane managed store +metadata in the same Data Plane config. Static stores do not use Metadata Redis. +Control Plane managed stores use `metadata.source: live` and require Metadata +Redis. + +Agent-key authentication requires Control Plane managed stores because the Data +Plane reads agent-key records and store grants from Metadata Redis. + +The walkthroughs in this section use `redis-agent-memory` as the Helm release +name. If you choose a different release name, update release-derived service and +deployment names in the verification commands. + +## Before you deploy + +1. Review [prerequisites]({{< relref "/operate/iris/agent-memory/self-managed/prerequisites" >}}). +1. Prepare the appropriate [Data Plane configuration]({{< relref "/operate/iris/agent-memory/self-managed/data-plane-configuration" >}}). +1. Follow either [Deploy with static stores]({{< relref "/operate/iris/agent-memory/self-managed/deploy-static" >}}) or [Deploy with Control Plane managed stores]({{< relref "/operate/iris/agent-memory/self-managed/deploy-control-plane" >}}). diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/prerequisites.md b/content/operate/iris/agent-memory/self-managed/prerequisites.md similarity index 84% rename from content/develop/ai/context-engine/agent-memory/self-managed/prerequisites.md rename to content/operate/iris/agent-memory/self-managed/prerequisites.md index cc6fd75198..6d4b24b1ca 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/prerequisites.md +++ b/content/operate/iris/agent-memory/self-managed/prerequisites.md @@ -1,25 +1,27 @@ --- -Title: Self-managed Agent Memory prerequisites +Title: Self-managed Redis Agent Memory prerequisites alwaysopen: false categories: - docs -- develop -- ai +- operate +- iris description: Review software, Redis, network, Secret, image, and sizing prerequisites for self-managed Redis Agent Memory. linkTitle: Prerequisites weight: 20 hideListLinks: true +aliases: +- /develop/ai/context-engine/agent-memory/self-managed/prerequisites/ --- Redis Agent Memory is distributed as container images on Docker Hub plus a Helm -chart in the Redis AI Helm repository. The chart deploys the Agent Memory Data -Plane, Agent Memory workers, and optionally the Agent Memory Control Plane. +chart in the Redis AI Helm repository. The chart deploys the Redis Agent Memory Data +Plane, Redis Agent Memory workers, and optionally the Redis Agent Memory Control Plane. You provide the Redis databases, provider credentials, Kubernetes exposure, and license material used by the deployment. {{< note >}} -This guide is for system administrators deploying Agent Memory on a self-managed +This guide is for system administrators deploying Redis Agent Memory on a self-managed Kubernetes cluster. {{< /note >}} @@ -44,11 +46,11 @@ Kubernetes cluster. ## Redis databases The Helm chart does not deploy Redis databases. Provision the Redis databases -outside the Agent Memory chart and pass their URLs in +outside the Redis Agent Memory chart and pass their URLs in `memory-dataplane.config.yaml` and, when the Control Plane is enabled, `controlplane-onprem.config.yaml`. -Store Redis must support Search and JSON capabilities because Agent Memory +Store Redis must support Search and JSON capabilities because Redis Agent Memory creates JSON and vector search indexes for memory data. Job Redis and Metadata Redis do not need those capabilities when they are deployed as separate Redis databases. @@ -110,7 +112,7 @@ Plane store records and agent-key records. `docker.io` and reach the Redis AI Helm repository. - **Air-gapped install:** mirror the images into an internal registry and use a chart package or locally downloaded chart. -- **Runtime access:** Agent Memory pods must reach the Redis databases and any +- **Runtime access:** Redis Agent Memory pods must reach the Redis databases and any embedding or LLM provider endpoints used by the deployment. - **Data Plane exposure:** use NetworkPolicy, ingress, gateway, service mesh, private load balancer, or equivalent controls to restrict API access. @@ -121,8 +123,8 @@ The chart consumes configuration and license material from Kubernetes Secrets: | Secret | Required when | Default key | | --- | --- | --- | -| Agent Memory license Secret | Always | `license` | -| Agent Memory Data Plane config Secret | Always | `memory-dataplane.config.yaml` | +| Redis Agent Memory license Secret | Always | `license` | +| Redis Agent Memory Data Plane config Secret | Always | `memory-dataplane.config.yaml` | | Control Plane config Secret | Control Plane enabled | `controlplane-onprem.config.yaml` | | Control Plane admin-token Secret | Control Plane enabled | `token` | @@ -131,7 +133,7 @@ keys and Redis URLs may include credentials. ## Release artifacts and image tags -Agent Memory self-managed image tags use the release SemVer value, for example: +Redis Agent Memory self-managed image tags use the release SemVer value, for example: ```yaml image: @@ -145,7 +147,7 @@ Use the chart version supplied by Redis for the release. The published chart is `redis-ai/redis-agent-memory` from `https://helm.redis.io/ai`. Standard customer installs use the public Docker Hub images published by the -Agent Memory self-managed release: `docker.io/redislabs/agent-memory:` +Redis Agent Memory self-managed release: `docker.io/redislabs/agent-memory:` and, when the Control Plane is enabled, `docker.io/redislabs/agent-memory-control-plane:`. @@ -206,9 +208,9 @@ Default chart values: | Component | Default | Purpose | | --------- | ------- | ------- | -| Agent Memory server | 2 replicas with autoscaling enabled and a minimum of 2 | Data Plane API traffic | -| Agent Memory worker | 2 replicas with autoscaling enabled and a minimum of 2 | Background promotion, summarization, and forgetting jobs | -| Agent Memory Control Plane | 1 replica when `controlplane.enabled=true` | Admin API for stores and agent keys | +| Redis Agent Memory server | 2 replicas with autoscaling enabled and a minimum of 2 | Data Plane API traffic | +| Redis Agent Memory worker | 2 replicas with autoscaling enabled and a minimum of 2 | Background promotion, summarization, and forgetting jobs | +| Redis Agent Memory Control Plane | 1 replica when `controlplane.enabled=true` | Admin API for stores and agent keys | During a rolling update, Kubernetes may temporarily run old and new pods at the same time. A small two-node test cluster can run out of CPU during install or @@ -247,10 +249,10 @@ release name. | API server capacity | `server.resources`, `server.autoscaling.*` | Tuning request capacity or memory footprint. | | Worker capacity | `worker.resources`, `worker.autoscaling.*` | Tuning background job throughput. | | Scheduling | `server.nodeSelector`, `worker.nodeSelector`, `server.affinity`, `worker.affinity`, `server.tolerations`, `worker.tolerations` | Controlling pod placement. | -| Networking | `service.type`, `ingress.*` | Exposing Agent Memory outside the cluster. | -| Naming | `fullnameOverride` | Running more than one Agent Memory release in a namespace. | +| Networking | `service.type`, `ingress.*` | Exposing Redis Agent Memory outside the cluster. | +| Naming | `fullnameOverride` | Running more than one Redis Agent Memory release in a namespace. | | Service account | `serviceAccount.*` | Matching customer namespace security policy. | -| Worker authentication | `workerAuth.enabled`, `worker.serviceAccount.*`, `worker.serviceAccount.token.*` | Giving Agent Memory workers a Kubernetes projected service-account token for authenticated Data Plane callbacks. | +| Worker authentication | `workerAuth.enabled`, `worker.serviceAccount.*`, `worker.serviceAccount.token.*` | Giving Redis Agent Memory workers a Kubernetes projected service-account token for authenticated Data Plane callbacks. | | Secret rollouts | `license.existingSecretChecksum`, `config.existingSecretChecksum`, `controlplane.config.existingSecretChecksum` | Rolling pods after externally managed Secret changes. | | Control Plane | `controlplane.enabled`, `controlplane.image.*`, `controlplane.config.existingSecret`, `controlplane.adminToken.*` | Enabling the optional admin API for stores and agent keys. | {{< /table-scrollable >}} diff --git a/content/develop/ai/context-engine/agent-memory/self-managed/reference.md b/content/operate/iris/agent-memory/self-managed/reference.md similarity index 97% rename from content/develop/ai/context-engine/agent-memory/self-managed/reference.md rename to content/operate/iris/agent-memory/self-managed/reference.md index a742fba5db..95bb708b72 100644 --- a/content/develop/ai/context-engine/agent-memory/self-managed/reference.md +++ b/content/operate/iris/agent-memory/self-managed/reference.md @@ -3,12 +3,14 @@ Title: Configuration and troubleshooting alwaysopen: false categories: - docs -- develop -- ai +- operate +- iris description: Review self-managed Redis Agent Memory configuration, troubleshooting guidance, and reference links. linkTitle: Configuration and troubleshooting weight: 100 hideListLinks: true +aliases: +- /develop/ai/context-engine/agent-memory/self-managed/reference/ --- ## Configuration reference @@ -68,6 +70,6 @@ CSI-synced Secrets, make sure a Control Plane pod also mounts the corresponding | FIPS values overlay | `deployment/redis-agent-memory/values-fips.yaml` | | NetworkPolicy reference | `deployment/redis-agent-memory/networkpolicy.reference.yaml` | | Redis Agent Memory API reference | [Redis Agent Memory API]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) | -| Control Plane API reference | [Control Plane API reference]({{< relref "/develop/ai/context-engine/agent-memory/self-managed/control-plane-api-reference" >}}) | +| Control Plane API reference | [Control Plane API reference]({{< relref "/operate/iris/agent-memory/self-managed/control-plane-api-reference" >}}) | | Redis Agent Memory Data Plane image tags | [Docker Hub: redislabs/agent-memory](https://hub.docker.com/r/redislabs/agent-memory/tags) | | Redis Agent Memory Control Plane image tags | [Docker Hub: redislabs/agent-memory-control-plane](https://hub.docker.com/r/redislabs/agent-memory-control-plane/tags) | diff --git a/layouts/operate/list.html b/layouts/operate/list.html index adddd797a3..346043bd59 100644 --- a/layouts/operate/list.html +++ b/layouts/operate/list.html @@ -69,16 +69,10 @@

    {{ else }} - {{ $ancestorDirs := slice }} - {{ with .File }} - {{ $ancestorDirs = split .Dir "/" }} - {{ end }} - {{ $currPage := .Page }} - {{ range $i, $page := $ancestorDirs }} - {{ if and $currPage.Params.bannerText $currPage.Params.bannerChildren }} - {{ partial "banner-article.html" $currPage }} + {{ range .Ancestors }} + {{ if and .Params.bannerText .Params.bannerChildren }} + {{ partial "banner-article.html" . }} {{ end }} - {{ $currPage = $currPage.Parent }} {{ end }} {{ end }} From 50f30846d9636ca18e04dbe07efae4869e1eb938 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Mon, 3 Aug 2026 15:23:34 +0200 Subject: [PATCH 09/14] docs: refine Redis Agent Memory guidance --- content/integrate/google-adk/_index.md | 6 +- content/integrate/google-adk/examples.md | 4 +- .../google-adk/integration-patterns.md | 4 +- .../google-adk/redis-agent-memory.md | 14 +- .../rc/context-engine/agent-memory/_index.md | 6 +- .../agent-memory/create-service.md | 42 ++--- .../agent-memory/use-agent-memory.md | 176 ------------------ .../agent-memory/view-service.md | 50 ++--- 8 files changed, 63 insertions(+), 239 deletions(-) delete mode 100644 content/operate/rc/context-engine/agent-memory/use-agent-memory.md diff --git a/content/integrate/google-adk/_index.md b/content/integrate/google-adk/_index.md index fe5bd1e57b..a285233128 100644 --- a/content/integrate/google-adk/_index.md +++ b/content/integrate/google-adk/_index.md @@ -32,13 +32,13 @@ adk-redis connects three backend systems to the ADK framework: ## Prerequisites - **Redis 8.4+** with vector search support -- **Agent Memory Server** for memory and session services +- **Redis Agent Memory Server** for memory and session services ```bash # Start Redis docker run -d --name redis -p 6379:6379 redis:8.4-alpine -# Start Agent Memory Server +# Start Redis Agent Memory Server docker run -d --name agent-memory-server -p 8088:8088 \ -e REDIS_URL=redis://host.docker.internal:6379 \ -e GEMINI_API_KEY=your-key \ @@ -56,7 +56,7 @@ On Linux, `host.docker.internal` does not resolve by default. Use ## Installation ```bash -# Memory and session services (requires Agent Memory Server) +# Memory and session services (requires Redis Agent Memory Server) pip install adk-redis[memory] # Search tools via RedisVL diff --git a/content/integrate/google-adk/examples.md b/content/integrate/google-adk/examples.md index 64b40239aa..ff165e4c95 100644 --- a/content/integrate/google-adk/examples.md +++ b/content/integrate/google-adk/examples.md @@ -25,7 +25,7 @@ All examples require: - **Python 3.10+** - **Redis 8.4+**: `docker run -d --name redis -p 6379:6379 redis:8.4-alpine` -- **Agent Memory Server** (for memory examples): See [setup instructions](https://github.com/redis/agent-memory-server) +- **Redis Agent Memory Server** (for memory examples): See [setup instructions](https://github.com/redis/agent-memory-server) - **API keys**: Most examples need a `GOOGLE_API_KEY` for Gemini ## `simple_redis_memory` @@ -56,7 +56,7 @@ Uses REST-based memory tools exclusively, without framework-managed services. Th **Capability:** MCP memory tools -Demonstrates MCP-based memory integration. The agent connects to the Agent Memory Server via SSE and manages semantic and episodic memories for workout tracking. +Demonstrates MCP-based memory integration. The agent connects to the Redis Agent Memory Server via SSE and manages semantic and episodic memories for workout tracking. [View on GitHub](https://github.com/redis-developer/adk-redis/tree/main/examples/fitness_coach_mcp) diff --git a/content/integrate/google-adk/integration-patterns.md b/content/integrate/google-adk/integration-patterns.md index bb2aa53b3b..ba9fc99bdf 100644 --- a/content/integrate/google-adk/integration-patterns.md +++ b/content/integrate/google-adk/integration-patterns.md @@ -97,7 +97,7 @@ agent = Agent( ## 3. MCP tools (Model Context Protocol) -Point ADK's `McpToolset` at the Agent Memory Server's SSE endpoint. Tool discovery happens automatically. +Point ADK's `McpToolset` at the Redis Agent Memory Server's SSE endpoint. Tool discovery happens automatically. ```python from adk_redis.tools.mcp_memory import create_memory_mcp_toolset @@ -116,7 +116,7 @@ agent = Agent( Available MCP tools: `search_long_term_memory`, `create_long_term_memories`, `get_long_term_memory`, `edit_long_term_memory`, `delete_long_term_memories`, `memory_prompt`, `set_working_memory`. -**Tradeoffs:** Most standardized and portable approach. Swap memory backends without changing agent code. Requires Agent Memory Server with MCP support on a separate port. +**Tradeoffs:** Most standardized and portable approach. Swap memory backends without changing agent code. Requires Redis Agent Memory Server with MCP support on a separate port. ## Hybrid approach diff --git a/content/integrate/google-adk/redis-agent-memory.md b/content/integrate/google-adk/redis-agent-memory.md index c55ac939ad..cf8556f969 100644 --- a/content/integrate/google-adk/redis-agent-memory.md +++ b/content/integrate/google-adk/redis-agent-memory.md @@ -55,14 +55,14 @@ session_service = RedisWorkingMemorySessionService( | Parameter | Description | Default | |-----------|-------------|---------| -| `api_base_url` | Agent Memory Server URL | Required | +| `api_base_url` | Redis Agent Memory Server URL | Required | | `default_namespace` | Isolates data between applications | Required | | `model_name` | LLM used for summarization | `None` | | `context_window_max` | Token limit that triggers summarization | `None` | ### Auto-summarization -When the token count of stored messages crosses `context_window_max`, the Agent Memory Server uses the model specified in `model_name` to summarize older turns. Recent messages are preserved in full. This avoids the hard tradeoff between truncating context (losing information) and sending the full conversation (hitting token limits and costs). +When the token count of stored messages crosses `context_window_max`, the Redis Agent Memory Server uses the model specified in `model_name` to summarize older turns. Recent messages are preserved in full. This avoids the hard tradeoff between truncating context (losing information) and sending the full conversation (hitting token limits and costs). ### Incremental appends @@ -79,7 +79,7 @@ The service implements all of ADK's session methods: ## Long-term memory -`RedisLongTermMemoryService` implements ADK's `BaseMemoryService`. After each conversation, the Agent Memory Server extracts structured information (facts, preferences, episodic events), embeds them as vectors, and stores them in Redis for semantic search across all past sessions. +`RedisLongTermMemoryService` implements ADK's `BaseMemoryService`. After each conversation, the Redis Agent Memory Server extracts structured information (facts, preferences, episodic events), embeds them as vectors, and stores them in Redis for semantic search across all past sessions. ```python from adk_redis.memory import ( @@ -103,7 +103,7 @@ memory_service = RedisLongTermMemoryService( | Parameter | Description | Default | |-----------|-------------|---------| -| `api_base_url` | Agent Memory Server URL | Required | +| `api_base_url` | Redis Agent Memory Server URL | Required | | `default_namespace` | Namespace for data isolation | Required | | `extraction_strategy` | How conversations are broken into memories: `discrete`, `summary`, or `preferences` | `None` | | `recency_boost` | Enable recency-weighted search | `False` | @@ -193,7 +193,7 @@ Requires prompt engineering to teach the LLM memory management strategy, but giv ## MCP tools -Point ADK's `McpToolset` at the Agent Memory Server's SSE endpoint. Tool discovery happens automatically — no manual tool wiring required. +Point ADK's `McpToolset` at the Redis Agent Memory Server's SSE endpoint. Tool discovery happens automatically — no manual tool wiring required. ```python from adk_redis.tools.mcp_memory import create_memory_mcp_toolset @@ -212,7 +212,7 @@ agent = Agent( Available MCP tools: `search_long_term_memory`, `create_long_term_memories`, `get_long_term_memory`, `edit_long_term_memory`, `delete_long_term_memories`, `memory_prompt`, `set_working_memory`. -The most portable approach — swap memory backends without changing agent code. Requires the Agent Memory Server running with MCP support on a separate port. +The most portable approach — swap memory backends without changing agent code. Requires the Redis Agent Memory Server running with MCP support on a separate port. ## More info @@ -221,5 +221,5 @@ The most portable approach — swap memory backends without changing agent code. - [travel_agent_memory_tools](https://github.com/redis-developer/adk-redis/tree/main/examples/travel_agent_memory_tools): REST tools only - [fitness_coach_mcp](https://github.com/redis-developer/adk-redis/tree/main/examples/fitness_coach_mcp): MCP tools - [travel_agent_memory_hybrid](https://github.com/redis-developer/adk-redis/tree/main/examples/travel_agent_memory_hybrid): Framework services + REST tools combined -- [Agent Memory Server documentation](https://github.com/redis/agent-memory-server) +- [Redis Agent Memory Server documentation](https://github.com/redis/agent-memory-server) diff --git a/content/operate/rc/context-engine/agent-memory/_index.md b/content/operate/rc/context-engine/agent-memory/_index.md index 25a47cc2c3..1e5da5b529 100644 --- a/content/operate/rc/context-engine/agent-memory/_index.md +++ b/content/operate/rc/context-engine/agent-memory/_index.md @@ -6,7 +6,7 @@ categories: - rc description: Store agent memory for AI applications in Redis Cloud. hideListLinks: true -linktitle: Agent Memory +linktitle: Redis Agent Memory title: Redis Agent Memory on Redis Cloud weight: 36 bannerText: Redis Agent Memory on Redis Cloud is currently available as a public preview. Features and behavior are subject to change. @@ -22,10 +22,10 @@ Redis Agent Memory uses a two-tier memory model: - **Session memory** (also known as **short-term** or **working memory**) maintains the current conversation state, session history, and session-specific metadata. You can set a custom time-to-live (TTL) to control how long session data is retained. - **Long-term memory** stores information extracted from past sessions, such as user preferences and learned patterns, as text with vector embeddings for semantic retrieval. -Promotion from short-term to long-term memory happens automatically. When you store a conversation event in session memory, the Agent Memory Server asynchronously extracts important information using the configured extraction strategy (discrete, summary, preferences, or custom) and stores it as long-term memory. The process is non-blocking, so agent interactions remain responsive. Short-term memory that is not promoted expires based on its TTL. You can also create long-term memories directly through the API for bulk creation or to import knowledge from external sources. +Extraction from session memory into long-term memory happens automatically. When you store a conversation event in session memory, Redis Agent Memory asynchronously extracts important information and stores it as long-term memory. The process is non-blocking, so agent interactions remain responsive. Session memory expires based on its TTL. You can also create long-term memories directly through the API for bulk creation or to import knowledge from external sources. For more details, see the [Redis Agent Memory overview]({{< relref "/develop/ai/context-engine/agent-memory" >}}). -## Get started with Agent Memory on Redis Cloud +## Get started with Redis Agent Memory on Redis Cloud {{< embed-md "rc-agent-memory-get-started.md" >}} diff --git a/content/operate/rc/context-engine/agent-memory/create-service.md b/content/operate/rc/context-engine/agent-memory/create-service.md index f5b948583e..62cc852b43 100644 --- a/content/operate/rc/context-engine/agent-memory/create-service.md +++ b/content/operate/rc/context-engine/agent-memory/create-service.md @@ -4,56 +4,56 @@ categories: - docs - operate - rc -description: Create an Agent Memory service in Redis Cloud to store working and long-term memory for AI agents. +description: Create a Redis Agent Memory service in Redis Cloud to store working and long-term memory for AI agents. hideListLinks: true linktitle: Create service -title: Create an Agent Memory service +title: Create a Redis Agent Memory service weight: 5 --- -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. +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 a Redis Agent Memory service in Redis Cloud. ## Prerequisites and limitations To create a Redis Agent Memory service, you will need a Redis Cloud database. If you don't have one, see [Create a database]({{< relref "/operate/rc/databases/create-database" >}}). {{< note >}} -Agent Memory does not support the following databases during public preview: +Redis Agent Memory does not support the following databases during public preview: - [Redis Flex]({{< relref "operate/rc/databases/create-database/create-flex-database">}}) databases - Databases using [AWS PrivateLink]({{< relref "operate/rc/security/aws-privatelink">}}) connectivity - [Active-Active]({{< relref "/operate/rc/databases/active-active" >}}) databases - Databases with the [default user]({{< relref "/operate/rc/security/access-control/data-access-control/default-user" >}}) turned off {{< /note >}} -## Create an Agent Memory service +## Create a Redis Agent Memory service From the [Redis Cloud console](https://cloud.redis.io/), select **Agent Memory** from the left-hand menu. -If 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. +If you have not already created a Redis Agent Memory service, you'll see a page with an introduction to Redis Agent Memory. Otherwise, select **New service** to go to the Redis Agent Memory introduction page. {{The New service button.}} From here: -- Select **Quick create** to create an 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 Agent Memory service for you. +- 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. {{The Quick create button.}} - 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. + After Redis Cloud creates your Redis Agent Memory service, a window containing your Redis Agent Memory service key will appear. Select **Copy** to copy the key to your clipboard. - {{The Agent Memory service key window. Use the Copy button to save the service key to the clipboard.}} + {{The Redis Agent Memory service key window. Use the Copy button to save the service key to the clipboard.}} {{}} This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.

    -If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}) to be able to use the Agent Memory API. +If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}) to be able to use the Redis Agent Memory API. {{
    }} - After Redis Cloud creates your service, [continue with the REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}). + After Redis Cloud creates your service, [continue with the REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}). -- If you want to customize your Agent Memory service, select **Create custom**. +- If you want to customize your Redis Agent Memory service, select **Create custom**. - {{The Create custom button to create an Agent Memory service.}} + {{The Create custom button to create a Redis Agent Memory service.}} This takes you to the **Create Agent Memory Service** page. This page is divided into the following sections: @@ -69,9 +69,9 @@ The **General settings** section defines basic properties of your service. | Setting name |Description| |:----------------------|:----------| -| **Service name** | Enter a name for your Agent Memory service. We recommend you use a name that describes your service's purpose. | +| **Service name** | Enter a name for your Redis Agent Memory service. We recommend you use a name that describes your service's purpose. | | **Select database** | Select the Redis Cloud database to use for this service from the list. | -| **User for this service** | The [database access user]({{< relref "/operate/rc/security/access-control/data-access-control/role-based-access-control" >}}) to use for this service. Agent Memory only supports the [`default` user]({{< relref "/operate/rc/security/access-control/data-access-control/default-user" >}}) during public preview. | +| **User for this service** | The [database access user]({{< relref "/operate/rc/security/access-control/data-access-control/role-based-access-control" >}}) to use for this service. Redis Agent Memory only supports the [`default` user]({{< relref "/operate/rc/security/access-control/data-access-control/default-user" >}}) during public preview. | ### Memory configuration @@ -139,24 +139,24 @@ Each custom memory type can have an **extraction strategy** that controls how th ### Create service -When you are done setting the details of your Agent Memory service, select **Create** to create it. +When you are done setting the details of your Redis Agent Memory service, select **Create** to create it. -{{Use the Create button to create an Agent Memory service.}} +{{Use the Create button to create a Redis Agent Memory service.}} -A window containing your Agent Memory service key will appear. Select **Copy** to copy the key to your clipboard. +A window containing your Redis Agent Memory service key will appear. Select **Copy** to copy the key to your clipboard. -{{The Agent Memory service key window. Use the Copy button to save the service key to the clipboard.}} +{{The Redis Agent Memory service key window. Use the Copy button to save the service key to the clipboard.}} {{}} This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.

    -If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}) to be able to use the Agent Memory API. +If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}) to be able to use the Redis Agent Memory API. {{
    }} If an error occurs, verify that your database is active. For help, [contact support](https://redis.io/support/). ## Next steps -After Redis Cloud creates your service, [continue with the REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}). +After Redis Cloud creates your service, [continue with the REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}). You can also [view and edit the service]({{< relref "/operate/rc/context-engine/agent-memory/view-service" >}}). diff --git a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md b/content/operate/rc/context-engine/agent-memory/use-agent-memory.md deleted file mode 100644 index e2fb593ae5..0000000000 --- a/content/operate/rc/context-engine/agent-memory/use-agent-memory.md +++ /dev/null @@ -1,176 +0,0 @@ ---- -alwaysopen: false -categories: -- docs -- operate -- rc -description: Create an Agent Memory service on Redis Cloud and make your first session-memory and long-term-memory REST API requests. -hideListLinks: true -linktitle: REST quickstart -title: Redis Cloud Agent Memory REST quickstart -weight: 10 ---- - -Use this quickstart to create an Agent Memory service on Redis Cloud and make your first REST API requests. - -## Before you begin - -To complete this quickstart, you need: - -{{< embed-md "rc-agent-memory-quickstart-prerequisites.md" >}} - -You also need a shell with `curl` and `jq` installed. - -## Create an Agent Memory service - -{{< embed-md "rc-agent-memory-quickstart-create-service.md" >}} - -## Save the connection values - -1. Open the Agent Memory service in the Redis Cloud console. -1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. -1. Export the connection values in your shell. Replace each placeholder with the value from Redis Cloud: - - ```sh - export AGENT_MEMORY_URL='' - export STORE_ID='' - export API_KEY='' - ``` - -1. Define identifiers for the resources created in this quickstart: - - ```sh - export SESSION_ID='quickstart-session' - export OWNER_ID='quickstart-user' - export MEMORY_ID='quickstart-preference' - ``` - -`AGENT_MEMORY_URL` must contain the complete endpoint shown in Redis Cloud, including `https://`. - -Send `API_KEY` as a bearer token in the `Authorization` header. Keep API keys out of source control, application logs, and other unsecured locations. - -`SESSION_ID`, `OWNER_ID`, and `MEMORY_ID` are example identifiers used throughout this quickstart. You can replace them with identifiers from your application. - -## Add a session event - -Set the event timestamp to the current Coordinated Universal Time (UTC): - -```sh -export EVENT_CREATED_AT="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" -``` - -Add a user event to session memory: - -```sh -curl --fail-with-body --silent --show-error \ - --request POST \ - --header "Authorization: Bearer $API_KEY" \ - --header 'Content-Type: application/json' \ - --data @- \ - "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/session-memory/events" <}}). - -## Retrieve the session - -Retrieve the session event that you added: - -```sh -curl --fail-with-body --silent --show-error \ - --header "Authorization: Bearer $API_KEY" \ - "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/session-memory/$SESSION_ID" | jq -``` - -A successful request returns `200 OK`. The response contains the session ID, owner ID, and stored events. - -For request and response details, see [`GetSessionMemory`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/session-memory/operation/GetSessionMemory" >}}). - -## Understand automatic extraction - -Agent Memory processes session events asynchronously and extracts relevant information into long-term memory. By default, extraction runs on a five-minute cadence, so extracted memories might not appear immediately. - -The next step creates a long-term memory directly. This approach lets you verify long-term-memory search without waiting for automatic extraction. - -## Create a long-term memory - -Create two long-term memories for the same owner and session: - -```sh -curl --fail-with-body --silent --show-error \ - --request POST \ - --header "Authorization: Bearer $API_KEY" \ - --header 'Content-Type: application/json' \ - --data @- \ - "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/long-term-memory" <}}). - -## Search long-term memory - -Search for the long-term memory by meaning and owner: - -```sh -curl --fail-with-body --silent --show-error \ - --request POST \ - --header "Authorization: Bearer $API_KEY" \ - --header 'Content-Type: application/json' \ - --data @- \ - "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/long-term-memory/search" <}}). - -## Next steps - -- Review more [Agent Memory API examples]({{< relref "/develop/ai/context-engine/agent-memory/api-examples" >}}). -- Use the [Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) for endpoint and schema details. -- [View and manage the service]({{< relref "/operate/rc/context-engine/agent-memory/view-service" >}}) to update configuration, manage API keys, review metrics, flush memories, or delete the service. diff --git a/content/operate/rc/context-engine/agent-memory/view-service.md b/content/operate/rc/context-engine/agent-memory/view-service.md index 7e8990ea5f..b5ae156ffb 100644 --- a/content/operate/rc/context-engine/agent-memory/view-service.md +++ b/content/operate/rc/context-engine/agent-memory/view-service.md @@ -4,54 +4,54 @@ categories: - docs - operate - rc -description: View and manage your Agent Memory service in Redis Cloud. +description: View and manage your Redis Agent Memory service in Redis Cloud. hideListLinks: true linktitle: View service -title: View and manage Agent Memory service +title: View and manage Redis Agent Memory service weight: 15 --- -After you have [created your first Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}), selecting **Agent Memory** from the Redis Cloud Console menu will take you to the **Agent Memory Services** page. +After you have [created your first Redis Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}), selecting **Agent Memory** from the Redis Cloud Console menu will take you to the **Agent Memory Services** page. -This page displays a list of all Agent Memory services associated with your account. +This page displays a list of all Redis Agent Memory services associated with your account. -{{The Agent Memory service in the Agent Memory service list.}} +{{The Redis Agent Memory service in the Redis Agent Memory service list.}} -Select your Agent Memory service from the list to view the service's details. +Select your Redis Agent Memory service from the list to view the service's details. ## Configuration tab -The **Configuration** tab lets you view the details of your Agent Memory service. It contains the following sections: +The **Configuration** tab lets you view the details of your Redis Agent Memory service. It contains the following sections: -- The **General settings** section provides the connection details and general settings for your Agent Memory service. -- The **Memory configuration** section provides the service settings for your Agent Memory service. +- The **General settings** section provides the connection details and general settings for your Redis Agent Memory service. +- The **Memory configuration** section provides the service settings for your Redis Agent Memory service. - The **Memory types & extraction** section shows any custom memory types defined for your service. -- The **Actions** section lets you flush or delete your Agent Memory service. +- The **Actions** section lets you flush or delete your Redis Agent Memory service. Some of these settings can be changed after service creation. To do so, select the **Edit** button. ### General settings -The **General settings** section provides the connection details and general settings for your Agent Memory service. +The **General settings** section provides the connection details and general settings for your Redis Agent Memory service. -{{The General settings for the Agent Memory service.}} +{{The General settings for the Redis Agent Memory service.}} | Setting name |Description| |:----------------------|:----------| | **Service name** | The name of your agent memory service. _(Editable)_ | | **Database** | The name of the database your service uses. | -| **Store ID** | The unique ID of your Agent Memory store. | -| **Endpoint** | The base URL for any Agent Memory requests. | +| **Store ID** | The unique ID of your Redis Agent Memory store. | +| **Endpoint** | The base URL for any Redis Agent Memory requests. | Select the **Copy** button next to the Store ID and API Base URL to copy them to the clipboard. -Follow the [Redis Cloud Agent Memory REST quickstart]({{< relref "/operate/rc/context-engine/agent-memory/use-agent-memory" >}}) to use the connection information and API key. +Follow the [Redis Agent Memory REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}) to use the connection information and API key. ### Memory configuration The **Memory configuration** section shows the time-to-live (TTL) for memory storage, the extraction cadence, and the automatic summarization settings for session memory. -{{The Memory configuration section for the Agent Memory service.}} +{{The Memory configuration section for the Redis Agent Memory service.}} | Setting name |Description| |:----------------------|:----------| @@ -66,7 +66,7 @@ The **Memory configuration** section shows the time-to-live (TTL) for memory sto The **Memory types & extraction** section shows any [custom memory types]({{< relref "/operate/rc/context-engine/agent-memory/create-service#custom-memory-types" >}}) defined for the service, each listed with its name, fields, and extraction strategy. -{{The Memory types & extraction section for the Agent Memory service.}} +{{The Memory types & extraction section for the Redis Agent Memory service.}} #### Custom memory types @@ -83,9 +83,9 @@ To change a custom memory type's name or fields, you must create a new service. ### Actions -The **Actions** section lets you flush or delete your Agent Memory service. +The **Actions** section lets you flush or delete your Redis Agent Memory service. -{{The actions for the Agent Memory service.}} +{{The actions for the Redis Agent Memory service.}} #### Flush memory entries @@ -101,9 +101,9 @@ Flushing the service is permanent and cannot be undone, and will result in empty #### Delete service -Deleting your Agent Memory service permanently deletes all associated memory data, the service configuration, and the Agent Memory search index. It also immediately terminates all API keys associated with the service. Data stored in other indexes within the same database will remain unaffected. +Deleting your Redis Agent Memory service permanently deletes all associated memory data, the service configuration, and the Redis Agent Memory search index. It also immediately terminates all API keys associated with the service. Data stored in other indexes within the same database will remain unaffected. -To delete your Agent Memory service: +To delete your Redis Agent Memory service: 1. Select **Delete**. @@ -111,11 +111,11 @@ To delete your Agent Memory service: 1. Select **Delete** again to confirm. -Deleting the Agent Memory service is permanent and cannot be undone. +Deleting the Redis Agent Memory service is permanent and cannot be undone. ## Metrics tab -The **Metrics** tab provides a series of graphs showing performance data for your Agent Memory service. +The **Metrics** tab provides a series of graphs showing performance data for your Redis Agent Memory service. | Metric | Description | |--------|-------------| @@ -126,7 +126,7 @@ The **Metrics** tab provides a series of graphs showing performance data for you The **API keys** tab shows a list of all API keys for your service. -{{The actions for the Agent Memory service.}} +{{The actions for the Redis Agent Memory service.}} Here, you can generate a new API key or remove any keys that are no longer in use. You can generate or remove service API keys at any time. @@ -146,7 +146,7 @@ To generate a new service key: 1. The new key will appear in a dialog box. Select **Copy** to copy the key to the clipboard. - {{The Agent Memory service key window. Use the Copy button to save the service key to the clipboard.}} + {{The Redis Agent Memory service key window. Use the Copy button to save the service key to the clipboard.}} {{}} This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.

    From 19bacb30332925a9878f619800ad4cb0a5af3306 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Mon, 3 Aug 2026 16:07:08 +0200 Subject: [PATCH 10/14] docs: correct Redis Cloud product names --- content/operate/rc/cloud-integrations/aws-marketplace/_index.md | 2 +- .../rc/context-engine/context-retriever/create-service.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/operate/rc/cloud-integrations/aws-marketplace/_index.md b/content/operate/rc/cloud-integrations/aws-marketplace/_index.md index 74f50b18cd..01262ebed1 100644 --- a/content/operate/rc/cloud-integrations/aws-marketplace/_index.md +++ b/content/operate/rc/cloud-integrations/aws-marketplace/_index.md @@ -19,7 +19,7 @@ Here's how to subscribe to Redis Cloud with AWS Marketplace: 1. Sign in to the [AWS console](https://console.aws.amazon.com/). -1. Search AWS Marketplace for [Redis Cloud: Real-Time Cache, Vector Search & AI Agent Memory](https://aws.amazon.com/marketplace/pp/prodview-mwscixe4ujhkq) and subscribe to the listing. +1. Search AWS Marketplace for [Redis Cloud: Real-Time Data Layer for AI Apps & Agents](https://aws.amazon.com/marketplace/pp/prodview-mwscixe4ujhkq) and subscribe to the listing. {{The Redis Cloud listing on AWS Marketplace}} diff --git a/content/operate/rc/context-engine/context-retriever/create-service.md b/content/operate/rc/context-engine/context-retriever/create-service.md index 6105d87062..f4f7b230c4 100644 --- a/content/operate/rc/context-engine/context-retriever/create-service.md +++ b/content/operate/rc/context-engine/context-retriever/create-service.md @@ -18,7 +18,7 @@ Redis Context Retriever helps teams expose operational context to AI agents thro 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/rdi" >}}) to ingest it into a Redis Cloud database first. {{< note >}} -Agent Memory does not support the following databases during public preview: +Redis Context Retriever does not support the following databases during public preview: - [Redis Flex]({{< relref "operate/rc/databases/create-database/create-flex-database">}}) databases - [Active-Active]({{< relref "/operate/rc/databases/active-active" >}}) databases {{< /note >}} From d65aad7a8d778827105f8ddccaed5723aeff0b77 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Wed, 5 Aug 2026 19:01:27 +0200 Subject: [PATCH 11/14] docs: rename Agent Memory integration guide --- content/develop/ai/context-engine/agent-memory/_index.md | 2 +- .../develop/ai/context-engine/agent-memory/developer-guide.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/develop/ai/context-engine/agent-memory/_index.md b/content/develop/ai/context-engine/agent-memory/_index.md index 6e3715d31e..c0915e4db7 100644 --- a/content/develop/ai/context-engine/agent-memory/_index.md +++ b/content/develop/ai/context-engine/agent-memory/_index.md @@ -120,4 +120,4 @@ After your Redis Agent Memory service is ready, choose a client to make your fir -For shared integration concepts, identifiers, and authentication, see [Integrate Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory/developer-guide" >}}). +For shared integration concepts, identifiers, and authentication, see the [Redis Agent Memory developer guide]({{< relref "/develop/ai/context-engine/agent-memory/developer-guide" >}}). diff --git a/content/develop/ai/context-engine/agent-memory/developer-guide.md b/content/develop/ai/context-engine/agent-memory/developer-guide.md index 37cd59ed21..a190cacccd 100644 --- a/content/develop/ai/context-engine/agent-memory/developer-guide.md +++ b/content/develop/ai/context-engine/agent-memory/developer-guide.md @@ -6,8 +6,8 @@ categories: - ai description: Connect an application to Redis Agent Memory and work with session memory and long-term memory through REST, Python, or TypeScript. hideListLinks: true -linktitle: Integration guide -title: Integrate Redis Agent Memory +linktitle: Developer guide +title: Redis Agent Memory developer guide weight: 5 --- From 7fba6c92b94f5af3015e0042fab1103df87c17c6 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Wed, 5 Aug 2026 19:04:52 +0200 Subject: [PATCH 12/14] docs: list Agent Memory SDKs before REST API --- content/develop/ai/_index.md | 2 +- content/develop/ai/context-engine/_index.md | 4 ++-- .../develop/ai/context-engine/agent-memory/_index.md | 12 ++++++------ .../context-engine/agent-memory/developer-guide.md | 12 ++++++------ .../agent-memory/python-sdk-quickstart.md | 2 +- .../agent-memory/rest-api-quickstart.md | 2 +- .../agent-memory/typescript-sdk-quickstart.md | 2 +- content/operate/iris/_index.md | 2 +- .../operate/rc/context-engine/agent-memory/_index.md | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/content/develop/ai/_index.md b/content/develop/ai/_index.md index d96084dc22..9fd5b08dff 100644 --- a/content/develop/ai/_index.md +++ b/content/develop/ai/_index.md @@ -71,7 +71,7 @@ AI agents are autonomous systems that combine LLMs with memory, tools, and plann The [Context Engine]({{< relref "/develop/ai/context-engine" >}}) (Redis Iris) includes four fully-managed services available on Redis Cloud: - [LangCache]({{< relref "/develop/ai/context-engine/langcache" >}}) — Semantic caching that reduces LLM API costs and improves response times by reusing cached responses for similar queries. -- [Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) — Two-tier persistent memory (session and long-term) for agents, available as a REST API and Python SDK. +- [Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) — Two-tier persistent memory (session and long-term) for agents, available through Python and TypeScript SDKs and a REST API. - [Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever" >}}) — Turns your business data into structured, governed tools that agents can reliably use, defined once and reused across all agents. - [Data Integration]({{< relref "/develop/ai/context-engine/data-integration" >}}) — Keeps your Redis Cloud database in sync with relational databases in near real time using Change Data Capture. diff --git a/content/develop/ai/context-engine/_index.md b/content/develop/ai/context-engine/_index.md index 83c35c0e8b..e01ffa9682 100644 --- a/content/develop/ai/context-engine/_index.md +++ b/content/develop/ai/context-engine/_index.md @@ -49,7 +49,7 @@ Redis Iris is a production-ready context engine for AI agents that:

    For developers

    • Four fully-managed services — no infrastructure to build or maintain
    • -
    • REST API and Python/JS SDKs for all services
    • +
    • Python and JavaScript SDKs and REST APIs for all services
    • Define your data model once, reuse it across all agents
    • Available on Redis Cloud with no database setup required
    @@ -112,7 +112,7 @@ LangCache works well for AI assistants, chatbots, RAG applications, AI agents, a Promotion from session memory to long-term memory is automatic and non-blocking. As a conversation progresses, the service asynchronously extracts and stores important information in the background, keeping agent interactions responsive. You can also create long-term memories directly using the API for bulk imports or external knowledge sources. -Redis Agent Memory is available as a REST API and Python SDK. +Redis Agent Memory is available through Python and TypeScript SDKs and a REST API. [Get started with Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) diff --git a/content/develop/ai/context-engine/agent-memory/_index.md b/content/develop/ai/context-engine/agent-memory/_index.md index c0915e4db7..04ef25f47f 100644 --- a/content/develop/ai/context-engine/agent-memory/_index.md +++ b/content/develop/ai/context-engine/agent-memory/_index.md @@ -15,7 +15,7 @@ bannerChildren: true Redis Agent Memory stores conversation history and durable information for AI applications. Use session memory to reconstruct a conversation and long-term memory to retrieve relevant information across sessions. -Access Redis Agent Memory through its REST API or the Python and TypeScript SDKs. It works with any agent framework or LLM provider. +Access Redis Agent Memory through the Python and TypeScript SDKs or its REST API. It works with any agent framework or LLM provider. ## Redis Agent Memory capabilities @@ -103,11 +103,6 @@ Get started with Redis Agent Memory on Redis Cloud or join the private preview f After your Redis Agent Memory service is ready, choose a client to make your first session-memory and long-term-memory requests.
    -
    -

    REST API

    -

    Use curl to call the Redis Agent Memory API directly.

    -

    Open the REST API quickstart

    -

    Python SDK

    Install the Python SDK and make your first memory requests.

    @@ -118,6 +113,11 @@ After your Redis Agent Memory service is ready, choose a client to make your fir

    Install the TypeScript SDK and make your first memory requests.

    Open the TypeScript quickstart

    +
    +

    REST API

    +

    Use curl to call the Redis Agent Memory API directly.

    +

    Open the REST API quickstart

    +
    For shared integration concepts, identifiers, and authentication, see the [Redis Agent Memory developer guide]({{< relref "/develop/ai/context-engine/agent-memory/developer-guide" >}}). diff --git a/content/develop/ai/context-engine/agent-memory/developer-guide.md b/content/develop/ai/context-engine/agent-memory/developer-guide.md index a190cacccd..bf57ccd9bb 100644 --- a/content/develop/ai/context-engine/agent-memory/developer-guide.md +++ b/content/develop/ai/context-engine/agent-memory/developer-guide.md @@ -4,14 +4,14 @@ categories: - docs - develop - ai -description: Connect an application to Redis Agent Memory and work with session memory and long-term memory through REST, Python, or TypeScript. +description: Connect an application to Redis Agent Memory and work with session memory and long-term memory through Python, TypeScript, or REST. hideListLinks: true linktitle: Developer guide title: Redis Agent Memory developer guide weight: 5 --- -Use the REST API, Python SDK, or TypeScript SDK to add session events, retrieve conversation context, create long-term memories, and search for relevant information. +Use the Python SDK, TypeScript SDK, or REST API to add session events, retrieve conversation context, create long-term memories, and search for relevant information. ## Integration workflow @@ -26,9 +26,9 @@ Redis Agent Memory can automatically summarize older session events and extract | Client | Use it when | Package and quickstart | |:-------|:------------|:-----------------------| -| REST API | You need language-independent HTTP access or don't want an SDK dependency. | No package required. Follow the [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}). | | Python SDK | Your application or agent uses Python. | Install [`redis-agent-memory`](https://pypi.org/project/redis-agent-memory/) and follow the [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}). | | TypeScript SDK | Your application or agent uses JavaScript or TypeScript. | Install [`@redis-iris/agent-memory`](https://www.npmjs.com/package/@redis-iris/agent-memory) and follow the [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}). | +| REST API | You need language-independent HTTP access or don't want an SDK dependency. | No package required. Follow the [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}). | ## Connect to a Redis Agent Memory service @@ -38,7 +38,7 @@ Every client requires: * The Store ID. * A Redis Agent Memory API key. -Send the API key as a bearer token when you use the REST API. The Store ID appears in REST request paths. The Python and TypeScript SDKs accept the endpoint, Store ID, and API key when you create the client. +The Python and TypeScript SDKs accept the endpoint, Store ID, and API key when you create the client. When you use the REST API, send the API key as a bearer token and include the Store ID in request paths. Follow the [Redis Cloud setup guide]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}) if you don't have a service. After you create one, copy its endpoint and Store ID from the **Configuration** tab and save the API key securely. @@ -156,9 +156,9 @@ Follow any of the client quickstarts to create and search long-term memory. For ## References -* [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}) * [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}) * [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}) -* [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) * [Python SDK reference](https://pypi.org/project/redis-agent-memory/) * [TypeScript SDK reference](https://www.npmjs.com/package/@redis-iris/agent-memory) +* [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}) +* [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) diff --git a/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md index e2acd6d7ec..28da663377 100644 --- a/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md @@ -8,7 +8,7 @@ description: Connect to Redis Agent Memory on Redis Cloud with the Python SDK an hideListLinks: true linktitle: Python SDK quickstart title: Redis Agent Memory Python SDK quickstart -weight: 7 +weight: 6 --- Use this quickstart to connect to a Redis Agent Memory service on Redis Cloud with the Python SDK. You will add and retrieve a session event, create two long-term memories, and search them by meaning. diff --git a/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md b/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md index 68b7cc41a3..f4b576d185 100644 --- a/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md @@ -8,7 +8,7 @@ description: Connect to Redis Agent Memory with the REST API and make session-me hideListLinks: true linktitle: REST quickstart title: Redis Agent Memory REST API quickstart -weight: 6 +weight: 8 aliases: - /operate/rc/context-engine/agent-memory/use-agent-memory/ - /develop/ai/context-engine/agent-memory/api-examples/ diff --git a/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md index 8d024b0da0..97f348717b 100644 --- a/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md @@ -8,7 +8,7 @@ description: Connect to Redis Agent Memory on Redis Cloud with the TypeScript SD hideListLinks: true linktitle: TypeScript SDK quickstart title: Redis Agent Memory TypeScript SDK quickstart -weight: 8 +weight: 7 --- Use this quickstart to connect to a Redis Agent Memory service on Redis Cloud with the TypeScript SDK. You will add and retrieve a session event, create two long-term memories, and search them. diff --git a/content/operate/iris/_index.md b/content/operate/iris/_index.md index 82310e7c4d..172e2981e7 100644 --- a/content/operate/iris/_index.md +++ b/content/operate/iris/_index.md @@ -29,7 +29,7 @@ Redis Iris is a suite of AI context services built on Redis. Two of the services - **Session memory**: Holds the current conversation state with configurable TTL-based expiration. - **Long-term memory**: Stores information extracted from past sessions as text with vector embeddings for semantic retrieval. -Redis Agent Memory is available as a REST API and Python SDK. You can self-host it on your own infrastructure or use it as a fully managed service on Redis Cloud. +Redis Agent Memory is available through Python and TypeScript SDKs and a REST API. You can self-host it on your own infrastructure or use it as a fully managed service on Redis Cloud. [Open the self-managed Redis Agent Memory documentation]({{< relref "/operate/iris/agent-memory/self-managed" >}}) diff --git a/content/operate/rc/context-engine/agent-memory/_index.md b/content/operate/rc/context-engine/agent-memory/_index.md index 1e5da5b529..10114afb99 100644 --- a/content/operate/rc/context-engine/agent-memory/_index.md +++ b/content/operate/rc/context-engine/agent-memory/_index.md @@ -13,7 +13,7 @@ bannerText: Redis Agent Memory on Redis Cloud is currently available as a public bannerChildren: true --- -Redis Agent Memory is a memory service for AI Agents available as a REST API and Python SDK. It provides the persistent, structured memory layer that intelligent agents need to store, retrieve, and manage contextual data across interactions. Rather than requiring developers to build custom memory infrastructure from scratch, Redis Agent Memory offers a turnkey solution with dedicated endpoints, secure API key management, configurable memory schemas, and automatic TTL-based lifecycle management. +Redis Agent Memory is a memory service for AI agents available through Python and TypeScript SDKs and a REST API. It provides the persistent, structured memory layer that intelligent agents need to store, retrieve, and manage contextual data across interactions. Rather than requiring developers to build custom memory infrastructure from scratch, Redis Agent Memory offers a turnkey solution with dedicated endpoints, secure API key management, configurable memory schemas, and automatic TTL-based lifecycle management. ## Redis Agent Memory overview From c9a8ace31a0644695a8d7f8067b8a91d5be45a17 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Wed, 5 Aug 2026 19:15:04 +0200 Subject: [PATCH 13/14] docs: move Redis Iris services out of Redis Cloud --- content/develop/ai/context-engine/_index.md | 2 +- .../ai/context-engine/agent-memory/_index.md | 2 +- .../agent-memory/developer-guide.md | 10 ++-- .../agent-memory/python-sdk-quickstart.md | 2 +- .../agent-memory/rest-api-quickstart.md | 8 ++-- .../agent-memory/typescript-sdk-quickstart.md | 2 +- .../context-retriever/_index.md | 6 +-- .../ai/context-engine/langcache/_index.md | 6 +-- content/embeds/rc-agent-memory-get-started.md | 4 +- ...-agent-memory-quickstart-create-service.md | 4 +- ...c-agent-memory-quickstart-prerequisites.md | 2 +- .../rc-context-retriever-get-started.md | 4 +- content/embeds/rc-langcache-get-started.md | 6 +-- content/operate/_index.md | 2 +- content/operate/iris/_index.md | 48 ++++++------------- content/operate/iris/agent-memory/_index.md | 6 ++- .../agent-memory/create-service.md | 11 +++-- .../agent-memory/view-service.md | 9 ++-- .../context-retriever/_index.md | 6 ++- .../context-retriever/create-service.md | 6 ++- .../context-retriever/view-admin-keys.md | 6 ++- .../context-retriever/view-service.md | 7 +-- .../langcache/_index.md | 7 +-- .../langcache/create-service.md | 15 +++--- .../langcache/monitor-cache.md | 5 +- .../langcache/use-langcache.md | 7 +-- .../langcache/view-edit-cache.md | 9 ++-- content/operate/rc/changelog/july-2025.md | 2 +- content/operate/rc/changelog/may-2026.md | 2 +- content/operate/rc/context-engine/_index.md | 12 ----- .../rc/context-engine/agent-memory/_index.md | 31 ------------ 31 files changed, 104 insertions(+), 145 deletions(-) rename content/operate/{rc/context-engine => iris}/agent-memory/create-service.md (94%) rename content/operate/{rc/context-engine => iris}/agent-memory/view-service.md (93%) rename content/operate/{rc/context-engine => iris}/context-retriever/_index.md (95%) rename content/operate/{rc/context-engine => iris}/context-retriever/create-service.md (96%) rename content/operate/{rc/context-engine => iris}/context-retriever/view-admin-keys.md (90%) rename content/operate/{rc/context-engine => iris}/context-retriever/view-service.md (92%) rename content/operate/{rc/context-engine => iris}/langcache/_index.md (90%) rename content/operate/{rc/context-engine => iris}/langcache/create-service.md (90%) rename content/operate/{rc/context-engine => iris}/langcache/monitor-cache.md (96%) rename content/operate/{rc/context-engine => iris}/langcache/use-langcache.md (77%) rename content/operate/{rc/context-engine => iris}/langcache/view-edit-cache.md (92%) delete mode 100644 content/operate/rc/context-engine/_index.md delete mode 100644 content/operate/rc/context-engine/agent-memory/_index.md diff --git a/content/develop/ai/context-engine/_index.md b/content/develop/ai/context-engine/_index.md index e01ffa9682..3787b414ee 100644 --- a/content/develop/ai/context-engine/_index.md +++ b/content/develop/ai/context-engine/_index.md @@ -86,7 +86,7 @@ Redis Iris context engine includes four services: - **[Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever" >}})**: Turns your business data into structured tools that AI agents can safely and reliably use, defined once and reused across all agents. - **[Data integration]({{< relref "/develop/ai/context-engine/data-integration" >}})**: Syncs live data from your existing relational databases into Redis Cloud so agents always have access to fresh, accurate business data. -All four services are available on [Redis Cloud]({{< relref "/operate/rc/context-engine" >}}) using the REST API, with no database setup or management required. +All four services are available on [Redis Cloud]({{< relref "/operate/iris" >}}) using the REST API, with no database setup or management required. ## LangCache diff --git a/content/develop/ai/context-engine/agent-memory/_index.md b/content/develop/ai/context-engine/agent-memory/_index.md index 04ef25f47f..33bbffe805 100644 --- a/content/develop/ai/context-engine/agent-memory/_index.md +++ b/content/develop/ai/context-engine/agent-memory/_index.md @@ -89,7 +89,7 @@ Get started with Redis Agent Memory on Redis Cloud or join the private preview f

    Redis Cloud

    Create a managed Redis Agent Memory service and make your first requests.

    -

    Open the Redis Cloud setup guide

    +

    Open the Redis Cloud setup guide

    Redis Software private preview

    diff --git a/content/develop/ai/context-engine/agent-memory/developer-guide.md b/content/develop/ai/context-engine/agent-memory/developer-guide.md index bf57ccd9bb..ee69a3be5e 100644 --- a/content/develop/ai/context-engine/agent-memory/developer-guide.md +++ b/content/develop/ai/context-engine/agent-memory/developer-guide.md @@ -40,7 +40,7 @@ Every client requires: The Python and TypeScript SDKs accept the endpoint, Store ID, and API key when you create the client. When you use the REST API, send the API key as a bearer token and include the Store ID in request paths. -Follow the [Redis Cloud setup guide]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}) if you don't have a service. After you create one, copy its endpoint and Store ID from the **Configuration** tab and save the API key securely. +Follow the [Redis Cloud setup guide]({{< relref "/operate/iris/agent-memory/create-service" >}}) if you don't have a service. After you create one, copy its endpoint and Store ID from the **Configuration** tab and save the API key securely. ## Identify users and conversations @@ -76,7 +76,7 @@ Before an agent turn, retrieve the session by `sessionId` and provide the releva The session-memory TTL controls how long sessions remain available. Configure it according to the retention requirements of your application. When a session expires, its events are no longer available through session-memory retrieval. -See [memory configuration]({{< relref "/operate/rc/context-engine/agent-memory/create-service#memory-configuration" >}}) to configure the session-memory TTL in Redis Cloud. +See [memory configuration]({{< relref "/operate/iris/agent-memory/create-service#memory-configuration" >}}) to configure the session-memory TTL in Redis Cloud. ### Automatic session summarization @@ -87,7 +87,7 @@ Automatic summarization limits the amount of conversation history that must be a For example, with **Summarize after** set to 20 and **Keep most recent** set to 10, Redis Agent Memory summarizes the older 10 messages when the session reaches 20 messages and retains the 10 most recent messages in full. -See [automatic summarization]({{< relref "/operate/rc/context-engine/agent-memory/create-service#automatic-summarization" >}}) to enable summarization and configure both thresholds in Redis Cloud. +See [automatic summarization]({{< relref "/operate/iris/agent-memory/create-service#automatic-summarization" >}}) to enable summarization and configure both thresholds in Redis Cloud. Follow any of the client quickstarts to add and retrieve a session event. For complete schemas, see the [session-memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/session-memory" >}}). @@ -116,7 +116,7 @@ Redis Agent Memory provides two creation paths: Configure the long-term-memory TTL separately from the session-memory TTL. -See [memory configuration]({{< relref "/operate/rc/context-engine/agent-memory/create-service#memory-configuration" >}}) to configure the extraction cadence and long-term-memory TTL in Redis Cloud. +See [memory configuration]({{< relref "/operate/iris/agent-memory/create-service#memory-configuration" >}}) to configure the extraction cadence and long-term-memory TTL in Redis Cloud. ### Search long-term memory @@ -150,7 +150,7 @@ For example, a travel application could define a `trip_preference` type with the When this type is enabled, Redis Agent Memory can extract a structured `trip_preference` memory from relevant session events. Each enabled custom type processes session events independently. -See [custom memory types]({{< relref "/operate/rc/context-engine/agent-memory/create-service#custom-memory-types" >}}) for configuration requirements and limits. +See [custom memory types]({{< relref "/operate/iris/agent-memory/create-service#custom-memory-types" >}}) for configuration requirements and limits. Follow any of the client quickstarts to create and search long-term memory. For complete schemas, see the [long-term-memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/long-term-memory" >}}). diff --git a/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md index 28da663377..8be70d0e68 100644 --- a/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md @@ -29,7 +29,7 @@ You also need Python 3.10 or later. 1. Open the Redis Agent Memory service in the Redis Cloud console. 1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. -1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). +1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/iris/agent-memory/view-service#replace-service-api-key" >}}). 1. Export the API key in your shell: ```sh diff --git a/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md b/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md index f4b576d185..d0e2326ea5 100644 --- a/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md @@ -10,7 +10,7 @@ linktitle: REST quickstart title: Redis Agent Memory REST API quickstart weight: 8 aliases: -- /operate/rc/context-engine/agent-memory/use-agent-memory/ +- /operate/iris/agent-memory/use-agent-memory/ - /develop/ai/context-engine/agent-memory/api-examples/ --- @@ -20,7 +20,7 @@ Use this quickstart to connect to a Redis Agent Memory service on Redis Cloud wi To complete this quickstart, you need: -* A Redis Agent Memory service on Redis Cloud. If you don't have one, [create a Redis Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}). +* A Redis Agent Memory service on Redis Cloud. If you don't have one, [create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}). * The API key for the service. * A shell with `curl` and `jq` installed. @@ -170,6 +170,6 @@ For request and response details, see [`SearchLongTermMemory`]({{< relref "/deve ## Next steps -- Review the [Redis Cloud service setup guide]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}) for service configuration options. +- Review the [Redis Cloud service setup guide]({{< relref "/operate/iris/agent-memory/create-service" >}}) for service configuration options. - Use the [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) for endpoint and schema details. -- [View and manage the service]({{< relref "/operate/rc/context-engine/agent-memory/view-service" >}}) to update configuration, manage API keys, review metrics, flush memories, or delete the service. +- [View and manage the service]({{< relref "/operate/iris/agent-memory/view-service" >}}) to update configuration, manage API keys, review metrics, flush memories, or delete the service. diff --git a/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md index 97f348717b..f4216fe8cd 100644 --- a/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md @@ -29,7 +29,7 @@ You also need Node.js and npm. 1. Open the Redis Agent Memory service in the Redis Cloud console. 1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. -1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). +1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/iris/agent-memory/view-service#replace-service-api-key" >}}). 1. Export the API key in your shell: ```sh diff --git a/content/develop/ai/context-engine/context-retriever/_index.md b/content/develop/ai/context-engine/context-retriever/_index.md index ebba100486..218cb22dbd 100644 --- a/content/develop/ai/context-engine/context-retriever/_index.md +++ b/content/develop/ai/context-engine/context-retriever/_index.md @@ -18,9 +18,9 @@ Give your agents structured, governed access to business data — without buildi Context Retriever lets you define your data model once. It automatically generates the retrieval tools agents call at runtime, so agents always work with accurate, live data through a controlled interface rather than guessing at SQL or calling databases directly.
    - {{< image-card image="images/ai-cube.svg" alt="Quick start icon" title="Quick Start — Create a Context Retriever service on Redis Cloud" url="/operate/rc/context-engine/context-retriever/create-service" >}} + {{< image-card image="images/ai-cube.svg" alt="Quick start icon" title="Quick Start — Create a Context Retriever service on Redis Cloud" url="/operate/iris/context-retriever/create-service" >}} {{< image-card image="images/ai-lib.svg" alt="Python SDK icon" title="Python SDK and CLI — Model entities and deploy tools with the redis-context-retriever package" url="https://pypi.org/project/redis-context-retriever/" >}} - {{< image-card image="images/ai-brain.svg" alt="Admin keys icon" title="Manage Access — Create and manage agent keys to control what each agent can access" url="/operate/rc/context-engine/context-retriever/view-admin-keys" >}} + {{< image-card image="images/ai-brain.svg" alt="Admin keys icon" title="Manage Access — Create and manage agent keys to control what each agent can access" url="/operate/iris/context-retriever/view-admin-keys" >}}
    ## What is Context Retriever? @@ -68,7 +68,7 @@ pip install redis-context-retriever Use the `ctxctl` CLI, the Python client, or the Redis Cloud UI to model your entities and relationships. Context Retriever uses that model to automatically generate retrieval tools that agents call at runtime through its MCP interface — agents never access your database directly. -See the [Redis Cloud setup guide]({{< relref "/operate/rc/context-engine/context-retriever/create-service" >}}) to create your first Context Retriever service. +See the [Redis Cloud setup guide]({{< relref "/operate/iris/context-retriever/create-service" >}}) to create your first Context Retriever service. 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. diff --git a/content/develop/ai/context-engine/langcache/_index.md b/content/develop/ai/context-engine/langcache/_index.md index 1b32151322..99c0791679 100644 --- a/content/develop/ai/context-engine/langcache/_index.md +++ b/content/develop/ai/context-engine/langcache/_index.md @@ -20,9 +20,9 @@ Cut LLM costs and improve response times with semantic caching. LangCache checks whether a semantically similar prompt has been answered before and returns the cached response instantly — no LLM call required. When there's no match, your app calls the LLM as usual and stores the result for future use.
    - {{< image-card image="images/ai-LLM-memory.svg" alt="Quick start icon" title="Quick Start — Create a LangCache service on Redis Cloud and make your first API call" url="/operate/rc/context-engine/langcache/create-service" >}} + {{< image-card image="images/ai-LLM-memory.svg" alt="Quick start icon" title="Quick Start — Create a LangCache service on Redis Cloud and make your first API call" url="/operate/iris/langcache/create-service" >}} {{< image-card image="images/ai-search.svg" alt="API examples icon" title="API and SDK Examples — Search, store, and manage cache entries with REST, Python, or JS" url="/develop/ai/context-engine/langcache/api-examples" >}} - {{< image-card image="images/ai-brain-2.svg" alt="Monitor icon" title="Monitor Cache — Track hit rates, usage, and performance in Redis Cloud" url="/operate/rc/context-engine/langcache/monitor-cache" >}} + {{< image-card image="images/ai-brain-2.svg" alt="Monitor icon" title="Monitor Cache — Track hit rates, usage, and performance in Redis Cloud" url="/operate/iris/langcache/monitor-cache" >}}
    ## What is LangCache? @@ -134,7 +134,7 @@ See the [LangCache API and SDK examples]({{< relref "/develop/ai/context-engine/ LangCache is currently in preview: -- Public preview on [Redis Cloud]({{< relref "/operate/rc/context-engine/langcache" >}}) +- Public preview on [Redis Cloud]({{< relref "/operate/iris/langcache" >}}) - Fully-managed [private preview](https://redis.io/langcache/) {{< multitabs id="langcache-get-started" diff --git a/content/embeds/rc-agent-memory-get-started.md b/content/embeds/rc-agent-memory-get-started.md index ea3f9d8351..a91027b30a 100644 --- a/content/embeds/rc-agent-memory-get-started.md +++ b/content/embeds/rc-agent-memory-get-started.md @@ -1,3 +1,3 @@ -Follow the [Redis Cloud setup guide]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}) to create a Redis Agent Memory service. Then use the [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}) to make your first session-memory and long-term-memory requests. +Follow the [Redis Cloud setup guide]({{< relref "/operate/iris/agent-memory/create-service" >}}) to create a Redis Agent Memory service. Then use the [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}) to make your first session-memory and long-term-memory requests. -After you set up Redis Agent Memory, you can [view and manage your service]({{< relref "/operate/rc/context-engine/agent-memory/view-service" >}}). +After you set up Redis Agent Memory, you can [view and manage your service]({{< relref "/operate/iris/agent-memory/view-service" >}}). diff --git a/content/embeds/rc-agent-memory-quickstart-create-service.md b/content/embeds/rc-agent-memory-quickstart-create-service.md index 7ff6eba33f..b9951f012d 100644 --- a/content/embeds/rc-agent-memory-quickstart-create-service.md +++ b/content/embeds/rc-agent-memory-quickstart-create-service.md @@ -5,7 +5,7 @@ 5. After Redis Cloud creates the service, copy the Redis Agent Memory API key and store it securely. {{< warning >}} -Redis Cloud displays the Redis Agent Memory API key only once. If you lose it, [generate a new API key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}). +Redis Cloud displays the Redis Agent Memory API key only once. If you lose it, [generate a new API key]({{< relref "/operate/iris/agent-memory/view-service#replace-service-api-key" >}}). {{< /warning >}} -For screenshots and configuration details, see [create a Redis Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}). +For screenshots and configuration details, see [create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}). diff --git a/content/embeds/rc-agent-memory-quickstart-prerequisites.md b/content/embeds/rc-agent-memory-quickstart-prerequisites.md index 015c42aa80..4f18586894 100644 --- a/content/embeds/rc-agent-memory-quickstart-prerequisites.md +++ b/content/embeds/rc-agent-memory-quickstart-prerequisites.md @@ -5,4 +5,4 @@ The database must be active, run a supported Redis version, and use a Pro or Ess Redis Agent Memory doesn't support Flex, Active-Active, or AWS PrivateLink databases during public preview. -For the complete list, see [prerequisites and limitations]({{< relref "/operate/rc/context-engine/agent-memory/create-service#prerequisites-and-limitations" >}}). +For the complete list, see [prerequisites and limitations]({{< relref "/operate/iris/agent-memory/create-service#prerequisites-and-limitations" >}}). diff --git a/content/embeds/rc-context-retriever-get-started.md b/content/embeds/rc-context-retriever-get-started.md index 1dcb619363..771545170f 100644 --- a/content/embeds/rc-context-retriever-get-started.md +++ b/content/embeds/rc-context-retriever-get-started.md @@ -1,5 +1,5 @@ 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/rdi" >}}) to ingest data into a Redis Cloud database. -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. +When you have a database, [Create a context retriever service]({{< relref "/operate/iris/context-retriever/create-service" >}}) for your database on Redis Cloud. -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/redis-context-retriever/) for more information on how to call your tools. \ No newline at end of file +After you set up Context Retriever, you can [view your service]({{< relref "/operate/iris/context-retriever/view-service" >}}). See the [Context Surfaces Python Client](https://pypi.org/project/redis-context-retriever/) for more information on how to call your tools. \ No newline at end of file diff --git a/content/embeds/rc-langcache-get-started.md b/content/embeds/rc-langcache-get-started.md index 7227acf44f..ea0bdfd9b6 100644 --- a/content/embeds/rc-langcache-get-started.md +++ b/content/embeds/rc-langcache-get-started.md @@ -1,10 +1,10 @@ To set up LangCache on Redis Cloud: 1. [Create a database]({{< relref "/operate/rc/databases/create-database" >}}) on Redis Cloud. -2. [Create a LangCache service]({{< relref "/operate/rc/context-engine/langcache/create-service" >}}) for your database on Redis Cloud. -3. [Use the LangCache API]({{< relref "/operate/rc/context-engine/langcache/use-langcache" >}}) from your client app. +2. [Create a LangCache service]({{< relref "/operate/iris/langcache/create-service" >}}) for your database on Redis Cloud. +3. [Use the LangCache API]({{< relref "/operate/iris/langcache/use-langcache" >}}) from your client app. -After you set up LangCache, you can [view and edit the cache]({{< relref "/operate/rc/context-engine/langcache/view-edit-cache" >}}) and [monitor the cache's performance]({{< relref "/operate/rc/context-engine/langcache/monitor-cache" >}}). +After you set up LangCache, you can [view and edit the cache]({{< relref "/operate/iris/langcache/view-edit-cache" >}}) and [monitor the cache's performance]({{< relref "/operate/iris/langcache/monitor-cache" >}}). See also our [Redis LangCache setup](https://www.youtube.com/watch?v=UOGhMZlZLko) tutorial video for advice on how to get started. diff --git a/content/operate/_index.md b/content/operate/_index.md index e63af0ab41..73e60bada2 100644 --- a/content/operate/_index.md +++ b/content/operate/_index.md @@ -13,7 +13,7 @@ hideListLinks: true | {{}} **Redis Insight** | {{}} **Redis Data Integration (RDI)** | |
    • [Install Redis Insight]({{< relref "/operate/redisinsight/install" >}})
    • [Use Redis Insight]({{< relref "/develop/tools/insight" >}})
    • [Download Redis Insight](https://redis.io/downloads/#insight)
    |
    • [RDI overview]({{< relref "/integrate/redis-data-integration/" >}})
    • [Install RDI]({{< relref "/integrate/redis-data-integration/installation" >}})
    • [RDI pipelines]({{< relref "/integrate/redis-data-integration/data-pipelines" >}})
    | | {{}} **Redis Iris context engine** | {{}} **Redis Feature Form** | -|
    • [Redis Iris context engine overview]({{< relref "/operate/iris" >}})
    • [Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}})
    • [Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever" >}})
    • [Redis Iris on Redis Cloud]({{< relref "/operate/rc/context-engine" >}})
    |
    • [Feature Form overview]({{< relref "/operate/featureform" >}})
    • [Deploy Feature Form]({{< relref "/operate/featureform/deploy" >}})
    • [Configure authentication]({{< relref "/operate/featureform/configure-auth" >}})
    | +|
    • [Redis Iris context engine overview]({{< relref "/operate/iris" >}})
    • [Redis Agent Memory]({{< relref "/operate/iris/agent-memory" >}})
    • [Redis Context Retriever]({{< relref "/operate/iris/context-retriever" >}})
    • [LangCache]({{< relref "/operate/iris/langcache" >}})
    |
    • [Feature Form overview]({{< relref "/operate/featureform" >}})
    • [Deploy Feature Form]({{< relref "/operate/featureform/deploy" >}})
    • [Configure authentication]({{< relref "/operate/featureform/configure-auth" >}})
    | ## Product features diff --git a/content/operate/iris/_index.md b/content/operate/iris/_index.md index 172e2981e7..f27b1bef79 100644 --- a/content/operate/iris/_index.md +++ b/content/operate/iris/_index.md @@ -1,6 +1,6 @@ --- title: Redis Iris context engine -description: Deploy and operate Redis Iris services, including Redis Agent Memory and Context Retriever, on your own infrastructure. +description: Deploy and operate Redis Iris context engine services. linkTitle: Redis Iris context engine alwaysopen: false categories: @@ -9,46 +9,28 @@ categories: - iris hideListLinks: true weight: 45 +aliases: +- /operate/rc/context-engine/ --- -Give your AI agents the context layer they need to act reliably on business data, deployed on your own infrastructure. +Redis Iris context engine provides managed and self-managed services for building AI applications with persistent memory, semantic caching, and governed access to business data. -Redis Iris is a suite of AI context services built on Redis. Two of the services, Redis Agent Memory and Context Retriever, are available for self-hosting so you can run them on your own infrastructure while keeping full control of your data. All services are also available as fully managed on [Redis Cloud]({{< relref "/operate/rc/context-engine" >}}). +Use this section to deploy, configure, and operate Redis Iris services. Developer guides and API integration documentation remain under [Develop with Redis]({{< relref "/develop/ai/context-engine" >}}). -
    - {{< image-card image="images/ai-brain.svg" alt="Redis Agent Memory icon" title="Redis Agent Memory" url="/operate/iris/agent-memory" description="Deploy and operate Redis Agent Memory on your own infrastructure." >}} - {{< image-card image="images/ai-cube.svg" alt="Context Retriever icon" title="Context Retriever" url="/develop/ai/context-engine/context-retriever" description="Self-hostable. Define your data model once and generate the tools agents call at runtime." >}} +
    + {{< image-card image="images/ai-brain.svg" alt="Redis Agent Memory icon" title="Redis Agent Memory" url="/operate/iris/agent-memory" description="Create and manage a service on Redis Cloud or deploy it on your own infrastructure." >}} + {{< image-card image="images/ai-cube.svg" alt="Redis Context Retriever icon" title="Redis Context Retriever" url="/operate/iris/context-retriever" description="Create and manage governed retrieval tools for AI agents." >}} + {{< image-card image="images/ai-LLM-memory.svg" alt="LangCache icon" title="LangCache" url="/operate/iris/langcache" description="Create, configure, and monitor semantic caches for AI applications." >}}
    -## Self-hosted Redis Iris services +## Deployment options -### Redis Agent Memory +Redis Iris services are available as managed services on Redis Cloud. Redis Agent Memory and Redis Context Retriever are also available for self-managed deployment. -[Redis Agent Memory]({{< relref "/develop/ai/context-engine/agent-memory" >}}) gives AI agents a persistent, structured memory layer using a two-tier model: +### Redis Cloud -- **Session memory**: Holds the current conversation state with configurable TTL-based expiration. -- **Long-term memory**: Stores information extracted from past sessions as text with vector embeddings for semantic retrieval. +Create and manage Redis Iris services through the Redis Cloud console without deploying the supporting infrastructure yourself. -Redis Agent Memory is available through Python and TypeScript SDKs and a REST API. You can self-host it on your own infrastructure or use it as a fully managed service on Redis Cloud. +### Self-managed -[Open the self-managed Redis Agent Memory documentation]({{< relref "/operate/iris/agent-memory/self-managed" >}}) - -### Context Retriever - -[Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever" >}}) turns your business data into structured tools that AI agents can reliably call at runtime. You define your data model once by specifying the entities and fields your agents need, and Context Retriever automatically generates the retrieval tools. Agents never access your database directly. - -**Key benefits:** - -- **Define once, reuse everywhere**: Business context is captured once and shared across all agents. -- **Automatic tool generation**: Tools are generated from your data model, not hand-coded per agent. -- **Controlled access**: Each agent requires a key, and access tags filter what data each agent can see. - -Context Retriever is self-hostable or available as a fully managed service on Redis Cloud. - -[Install Context Retriever]({{< relref "/develop/ai/context-engine/context-retriever/install" >}}) - -## Also available on Redis Cloud - -All Redis Iris services, including LangCache and Data Integration, are available as fully managed services on Redis Cloud with no infrastructure to set up or maintain. - -[Redis Iris on Redis Cloud]({{< relref "/operate/rc/context-engine" >}}) +Deploy supported Redis Iris services on Kubernetes when you need to operate them on your own infrastructure. diff --git a/content/operate/iris/agent-memory/_index.md b/content/operate/iris/agent-memory/_index.md index 9c7d43b93b..ad799fbb96 100644 --- a/content/operate/iris/agent-memory/_index.md +++ b/content/operate/iris/agent-memory/_index.md @@ -1,6 +1,6 @@ --- title: Redis Agent Memory -description: Deploy and operate Redis Agent Memory on your own infrastructure. +description: Deploy and operate Redis Agent Memory on Redis Cloud or your own infrastructure. linkTitle: Redis Agent Memory alwaysopen: false categories: @@ -9,6 +9,8 @@ categories: - iris weight: 10 hideListLinks: true +aliases: +- /operate/rc/context-engine/agent-memory/ --- Redis Agent Memory provides persistent session memory and long-term memory for AI agents and applications. @@ -25,4 +27,4 @@ Deploy, configure, secure, and operate Redis Agent Memory on your own Kubernetes Use Redis Agent Memory as a managed service on Redis Cloud. -[Open the Redis Cloud setup guide]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}) +[Create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}) or [view and manage an existing service]({{< relref "/operate/iris/agent-memory/view-service" >}}). diff --git a/content/operate/rc/context-engine/agent-memory/create-service.md b/content/operate/iris/agent-memory/create-service.md similarity index 94% rename from content/operate/rc/context-engine/agent-memory/create-service.md rename to content/operate/iris/agent-memory/create-service.md index 62cc852b43..74417532c5 100644 --- a/content/operate/rc/context-engine/agent-memory/create-service.md +++ b/content/operate/iris/agent-memory/create-service.md @@ -3,12 +3,15 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: Create a Redis Agent Memory service in Redis Cloud to store working and long-term memory for AI agents. hideListLinks: true linktitle: Create service title: Create a Redis Agent Memory service weight: 5 +bannerText: Redis Agent Memory on Redis Cloud is currently available as a public preview. Features and behavior are subject to change. +aliases: +- /operate/rc/context-engine/agent-memory/create-service/ --- 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 a Redis Agent Memory service in Redis Cloud. @@ -46,7 +49,7 @@ From here: {{}} This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.

    -If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}) to be able to use the Redis Agent Memory API. +If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/iris/agent-memory/view-service#replace-service-api-key" >}}) to be able to use the Redis Agent Memory API. {{
    }} After Redis Cloud creates your service, [continue with the REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}). @@ -150,7 +153,7 @@ A window containing your Redis Agent Memory service key will appear. Select **Co {{}} This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.

    -If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/rc/context-engine/agent-memory/view-service#replace-service-api-key" >}}) to be able to use the Redis Agent Memory API. +If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/iris/agent-memory/view-service#replace-service-api-key" >}}) to be able to use the Redis Agent Memory API. {{
    }} If an error occurs, verify that your database is active. For help, [contact support](https://redis.io/support/). @@ -159,4 +162,4 @@ If an error occurs, verify that your database is active. For help, [contact supp After Redis Cloud creates your service, [continue with the REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}). -You can also [view and edit the service]({{< relref "/operate/rc/context-engine/agent-memory/view-service" >}}). +You can also [view and edit the service]({{< relref "/operate/iris/agent-memory/view-service" >}}). diff --git a/content/operate/rc/context-engine/agent-memory/view-service.md b/content/operate/iris/agent-memory/view-service.md similarity index 93% rename from content/operate/rc/context-engine/agent-memory/view-service.md rename to content/operate/iris/agent-memory/view-service.md index b5ae156ffb..25d27161ed 100644 --- a/content/operate/rc/context-engine/agent-memory/view-service.md +++ b/content/operate/iris/agent-memory/view-service.md @@ -3,15 +3,18 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: View and manage your Redis Agent Memory service in Redis Cloud. hideListLinks: true linktitle: View service title: View and manage Redis Agent Memory service weight: 15 +bannerText: Redis Agent Memory on Redis Cloud is currently available as a public preview. Features and behavior are subject to change. +aliases: +- /operate/rc/context-engine/agent-memory/view-service/ --- -After you have [created your first Redis Agent Memory service]({{< relref "/operate/rc/context-engine/agent-memory/create-service" >}}), selecting **Agent Memory** from the Redis Cloud Console menu will take you to the **Agent Memory Services** page. +After you have [created your first Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}), selecting **Agent Memory** from the Redis Cloud Console menu will take you to the **Agent Memory Services** page. This page displays a list of all Redis Agent Memory services associated with your account. @@ -64,7 +67,7 @@ The **Memory configuration** section shows the time-to-live (TTL) for memory sto ### Memory types & extraction {#memory-types-and-extraction} -The **Memory types & extraction** section shows any [custom memory types]({{< relref "/operate/rc/context-engine/agent-memory/create-service#custom-memory-types" >}}) defined for the service, each listed with its name, fields, and extraction strategy. +The **Memory types & extraction** section shows any [custom memory types]({{< relref "/operate/iris/agent-memory/create-service#custom-memory-types" >}}) defined for the service, each listed with its name, fields, and extraction strategy. {{The Memory types & extraction section for the Redis Agent Memory service.}} diff --git a/content/operate/rc/context-engine/context-retriever/_index.md b/content/operate/iris/context-retriever/_index.md similarity index 95% rename from content/operate/rc/context-engine/context-retriever/_index.md rename to content/operate/iris/context-retriever/_index.md index 065d3d7399..077c313134 100644 --- a/content/operate/rc/context-engine/context-retriever/_index.md +++ b/content/operate/iris/context-retriever/_index.md @@ -3,14 +3,16 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: Expose schema-first retrieval tools from your Redis Cloud data to AI agents. hideListLinks: true linktitle: Context Retriever title: Redis Context Retriever on Redis Cloud -weight: 37 +weight: 20 bannerText: Redis Context Retriever on Redis Cloud is currently available in preview. Features and behavior are subject to change. bannerChildren: true +aliases: +- /operate/rc/context-engine/context-retriever/ --- 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. diff --git a/content/operate/rc/context-engine/context-retriever/create-service.md b/content/operate/iris/context-retriever/create-service.md similarity index 96% rename from content/operate/rc/context-engine/context-retriever/create-service.md rename to content/operate/iris/context-retriever/create-service.md index f4f7b230c4..f24556e0c6 100644 --- a/content/operate/rc/context-engine/context-retriever/create-service.md +++ b/content/operate/iris/context-retriever/create-service.md @@ -3,12 +3,14 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: Create a Context Retriever service in Redis Cloud to expose schema-first retrieval tools to AI agents. hideListLinks: true linktitle: Create service title: Create a Context Retriever service weight: 5 +aliases: +- /operate/rc/context-engine/context-retriever/create-service/ --- 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. @@ -111,4 +113,4 @@ After you set all fields for all of your entities, select **Create** to create y 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. -You can also [view your service]({{< relref "/operate/rc/context-engine/context-retriever/view-service" >}}). +You can also [view your service]({{< relref "/operate/iris/context-retriever/view-service" >}}). diff --git a/content/operate/rc/context-engine/context-retriever/view-admin-keys.md b/content/operate/iris/context-retriever/view-admin-keys.md similarity index 90% rename from content/operate/rc/context-engine/context-retriever/view-admin-keys.md rename to content/operate/iris/context-retriever/view-admin-keys.md index 7b23bb08e5..6387bdee72 100644 --- a/content/operate/rc/context-engine/context-retriever/view-admin-keys.md +++ b/content/operate/iris/context-retriever/view-admin-keys.md @@ -3,15 +3,17 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: View and manage Context Retriever admin keys in Redis Cloud. hideListLinks: true linktitle: View admin keys title: View and manage Context Retriever admin keys weight: 25 +aliases: +- /operate/rc/context-engine/context-retriever/view-admin-keys/ --- -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. +After you have [created your first Context Retriever service]({{< relref "/operate/iris/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. 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/redis-context-retriever/) and `cxtctl` CLI to create an Agent key and call your tools. diff --git a/content/operate/rc/context-engine/context-retriever/view-service.md b/content/operate/iris/context-retriever/view-service.md similarity index 92% rename from content/operate/rc/context-engine/context-retriever/view-service.md rename to content/operate/iris/context-retriever/view-service.md index 65622a3521..c4ff56371f 100644 --- a/content/operate/rc/context-engine/context-retriever/view-service.md +++ b/content/operate/iris/context-retriever/view-service.md @@ -3,15 +3,17 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: View and manage your Context Retriever service in Redis Cloud. hideListLinks: true linktitle: View service title: View and manage Context Retriever service weight: 15 +aliases: +- /operate/rc/context-engine/context-retriever/view-service/ --- -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. +After you have [created your first Context Retriever service]({{< relref "/operate/iris/context-retriever/create-service" >}}), selecting **Context Retriever** from the Redis Cloud Console menu will take you to the **Context Retriever Services** page. This page displays a list of all Context Retriever services associated with your account. @@ -75,4 +77,3 @@ To delete your Context Retriever service: 1. Select **Delete** again to confirm. Deleting the Context Retriever service is permanent and cannot be undone. - diff --git a/content/operate/rc/context-engine/langcache/_index.md b/content/operate/iris/langcache/_index.md similarity index 90% rename from content/operate/rc/context-engine/langcache/_index.md rename to content/operate/iris/langcache/_index.md index 7888c298d6..b5d91310bd 100644 --- a/content/operate/rc/context-engine/langcache/_index.md +++ b/content/operate/iris/langcache/_index.md @@ -3,16 +3,17 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: Store LLM responses for AI applications in Redis Cloud. hideListLinks: true linktitle: LangCache title: Semantic caching with LangCache on Redis Cloud -weight: 36 +weight: 30 bannerText: LangCache on Redis Cloud is currently available as a public preview. Features and behavior are subject to change. bannerChildren: true aliases: - /operate/rc/langcache +- /operate/rc/context-engine/langcache/ --- LangCache is a semantic caching service available as a REST API that stores LLM responses for fast and cheaper retrieval, built on the Redis vector database. By using semantic caching, you can significantly reduce API costs and lower the average latency of your generative AI applications. @@ -25,4 +26,4 @@ For more information about how LangCache works, see the [LangCache overview]({{< ## Get started with LangCache on Redis Cloud -{{< embed-md "rc-langcache-get-started.md" >}} \ No newline at end of file +{{< embed-md "rc-langcache-get-started.md" >}} diff --git a/content/operate/rc/context-engine/langcache/create-service.md b/content/operate/iris/langcache/create-service.md similarity index 90% rename from content/operate/rc/context-engine/langcache/create-service.md rename to content/operate/iris/langcache/create-service.md index cafa66d7bd..c7d4194a92 100644 --- a/content/operate/rc/context-engine/langcache/create-service.md +++ b/content/operate/iris/langcache/create-service.md @@ -3,7 +3,7 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: null hideListLinks: true linktitle: Create service @@ -11,6 +11,7 @@ title: Create a LangCache service weight: 5 aliases: - /operate/rc/langcache/create-service +- /operate/rc/context-engine/langcache/create-service/ --- Redis LangCache provides vector search capabilities and efficient caching for AI-powered applications. This guide walks you through creating and configuring a LangCache service in Redis Cloud. @@ -51,12 +52,12 @@ From here: {{}} This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.

    -If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/rc/context-engine/langcache/view-edit-cache#replace-service-api-key" >}}) to be able to use the LangCache API. +If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/iris/langcache/view-edit-cache#replace-service-api-key" >}}) to be able to use the LangCache API. {{
    }} - After your cache is created, you can [use the LangCache API]({{< relref "/operate/rc/context-engine/langcache/use-langcache" >}}) from your client app. + After your cache is created, you can [use the LangCache API]({{< relref "/operate/iris/langcache/use-langcache" >}}) from your client app. - You can also [view and edit the cache]({{< relref "/operate/rc/context-engine/langcache/view-edit-cache" >}}) and [monitor the cache's performance]({{< relref "/operate/rc/context-engine/langcache/monitor-cache" >}}). + You can also [view and edit the cache]({{< relref "/operate/iris/langcache/view-edit-cache" >}}) and [monitor the cache's performance]({{< relref "/operate/iris/langcache/monitor-cache" >}}). - If you want to customize your LangCache service, select **Create custom service**. @@ -136,7 +137,7 @@ A window containing your LangCache service key will appear. Select **Copy** to c {{}} This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.

    -If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/rc/context-engine/langcache/view-edit-cache#replace-service-api-key" >}}) to be able to use the LangCache API. +If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/iris/langcache/view-edit-cache#replace-service-api-key" >}}) to be able to use the LangCache API. {{
    }} You'll be taken to your LangCache service's **Configuration** page. You'll also be able to see your LangCache service in the LangCache service list. @@ -152,6 +153,6 @@ For help, [contact support](https://redis.io/support/). ## Next steps -After your cache is created, you can [use the LangCache API]({{< relref "/operate/rc/context-engine/langcache/use-langcache" >}}) from your client app. +After your cache is created, you can [use the LangCache API]({{< relref "/operate/iris/langcache/use-langcache" >}}) from your client app. -You can also [view and edit the cache]({{< relref "/operate/rc/context-engine/langcache/view-edit-cache" >}}) and [monitor the cache's performance]({{< relref "/operate/rc/context-engine/langcache/monitor-cache" >}}). +You can also [view and edit the cache]({{< relref "/operate/iris/langcache/view-edit-cache" >}}) and [monitor the cache's performance]({{< relref "/operate/iris/langcache/monitor-cache" >}}). diff --git a/content/operate/rc/context-engine/langcache/monitor-cache.md b/content/operate/iris/langcache/monitor-cache.md similarity index 96% rename from content/operate/rc/context-engine/langcache/monitor-cache.md rename to content/operate/iris/langcache/monitor-cache.md index 3f2ad3abad..17c79f2578 100644 --- a/content/operate/rc/context-engine/langcache/monitor-cache.md +++ b/content/operate/iris/langcache/monitor-cache.md @@ -3,7 +3,7 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: null hideListLinks: true linktitle: Monitor cache @@ -11,6 +11,7 @@ title: Monitor a LangCache service weight: 20 aliases: - /operate/rc/langcache/monitor-cache +- /operate/rc/context-engine/langcache/monitor-cache/ --- You can monitor a LangCache service's performance from the **Metrics** tab of the service's page. @@ -50,4 +51,4 @@ High cache latency may indicate one of the following: - Inefficient embedding generation from the embedding provider - Large cache requiring longer comparison times - Network latency between the cache and embedding provider -- Resource constraints \ No newline at end of file +- Resource constraints diff --git a/content/operate/rc/context-engine/langcache/use-langcache.md b/content/operate/iris/langcache/use-langcache.md similarity index 77% rename from content/operate/rc/context-engine/langcache/use-langcache.md rename to content/operate/iris/langcache/use-langcache.md index bbae49b6fd..f62e853f33 100644 --- a/content/operate/rc/context-engine/langcache/use-langcache.md +++ b/content/operate/iris/langcache/use-langcache.md @@ -3,7 +3,7 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: null hideListLinks: true linktitle: Use LangCache @@ -11,6 +11,7 @@ title: Use the LangCache API on Redis Cloud weight: 10 aliases: - /operate/rc/langcache/use-langcache +- /operate/rc/context-engine/langcache/use-langcache/ --- You can use the [LangCache API and SDK]({{< relref "/develop/ai/context-engine/langcache/api-examples" >}}) from your client app to store and retrieve LLM, RAG, or agent responses. @@ -21,9 +22,9 @@ To access the LangCache API, you need: - LangCache service API key - Cache ID -For LangCache on Redis Cloud, the base URL and cache ID are available in the LangCache service's **Configuration** page in the [**Connectivity** section]({{< relref "/operate/rc/context-engine/langcache/view-edit-cache#connectivity" >}}). +For LangCache on Redis Cloud, the base URL and cache ID are available in the LangCache service's **Configuration** page in the [**Connectivity** section]({{< relref "/operate/iris/langcache/view-edit-cache#connectivity" >}}). -The LangCache API key is only available immediately after you create the LangCache service. If you lost this value, you will need to [replace the service API key]({{< relref "/operate/rc/context-engine/langcache/view-edit-cache#replace-service-api-key" >}}) to be able to use the LangCache API. +The LangCache API key is only available immediately after you create the LangCache service. If you lost this value, you will need to [replace the service API key]({{< relref "/operate/iris/langcache/view-edit-cache#replace-service-api-key" >}}) to be able to use the LangCache API. When you call the API, you need to pass the LangCache API key in the `Authorization` header as a Bearer token and the Cache ID as the `cacheId` path parameter. diff --git a/content/operate/rc/context-engine/langcache/view-edit-cache.md b/content/operate/iris/langcache/view-edit-cache.md similarity index 92% rename from content/operate/rc/context-engine/langcache/view-edit-cache.md rename to content/operate/iris/langcache/view-edit-cache.md index 626b0e8d53..db3db6372a 100644 --- a/content/operate/rc/context-engine/langcache/view-edit-cache.md +++ b/content/operate/iris/langcache/view-edit-cache.md @@ -3,7 +3,7 @@ alwaysopen: false categories: - docs - operate -- rc +- iris description: null hideListLinks: true linktitle: View and edit cache @@ -11,9 +11,10 @@ title: View and edit LangCache service weight: 15 aliases: - /operate/rc/langcache/view-edit-cache +- /operate/rc/context-engine/langcache/view-edit-cache/ --- -After you have [created your first LangCache service]({{< relref "/operate/rc/context-engine/langcache/create-service" >}}), selecting **LangCache** from the Redis Cloud Console menu will take you to the **LangCache Services** page. +After you have [created your first LangCache service]({{< relref "/operate/iris/langcache/create-service" >}}), selecting **LangCache** from the Redis Cloud Console menu will take you to the **LangCache Services** page. This page displays a list of all LangCache services associated with your account. @@ -43,7 +44,7 @@ The **Connectivity** section provides the connection details for your LangCache Select the **Copy** button next to the Cache ID and API Base URL to copy them to the clipboard. If you lost the API key value or need to rotate the key, you can [generate a new service API key](#replace-service-api-key) at any time. -See [use the LangCache API]({{< relref "/operate/rc/context-engine/langcache/use-langcache" >}}) for more information on how to use these values. +See [use the LangCache API]({{< relref "/operate/iris/langcache/use-langcache" >}}) for more information on how to use these values. #### Generate a new service API key {#replace-service-api-key} @@ -129,4 +130,4 @@ Deleting the LangCache service is permanent and cannot be undone. ## Metrics tab -The **Metrics** tab provides a series of graphs showing performance data for your LangCache service. See [Monitor a LangCache service]({{< relref "/operate/rc/context-engine/langcache/monitor-cache" >}}) for more information. \ No newline at end of file +The **Metrics** tab provides a series of graphs showing performance data for your LangCache service. See [Monitor a LangCache service]({{< relref "/operate/iris/langcache/monitor-cache" >}}) for more information. diff --git a/content/operate/rc/changelog/july-2025.md b/content/operate/rc/changelog/july-2025.md index ae68d183c1..282698336b 100644 --- a/content/operate/rc/changelog/july-2025.md +++ b/content/operate/rc/changelog/july-2025.md @@ -18,7 +18,7 @@ tags: ### LangCache public preview -[LangCache]({{< relref "/operate/rc/context-engine/langcache" >}}) is now available in public preview on Redis Cloud. +[LangCache]({{< relref "/operate/iris/langcache" >}}) is now available in public preview on Redis Cloud. LangCache is a semantic caching service available as a REST API that stores LLM responses for fast and cheaper retrieval, built on the Redis vector database. By using semantic caching, you can significantly reduce API costs and lower the average latency of your generative AI applications. diff --git a/content/operate/rc/changelog/may-2026.md b/content/operate/rc/changelog/may-2026.md index 0a58f0b96f..dda94a09a6 100644 --- a/content/operate/rc/changelog/may-2026.md +++ b/content/operate/rc/changelog/may-2026.md @@ -18,7 +18,7 @@ tags: ### Redis Iris -Redis Iris is a suite of fully-managed services that give AI agents the context engine they need to reliably act on business data. Both [Redis Agent Memory]({{< relref "/operate/rc/context-engine/agent-memory" >}}) and [Redis Context Retriever]({{< relref "/operate/rc/context-engine/context-retriever" >}}) are now available on Redis Cloud as a public preview. +Redis Iris is a suite of fully-managed services that give AI agents the context engine they need to reliably act on business data. Both [Redis Agent Memory]({{< relref "/operate/iris/agent-memory" >}}) and [Redis Context Retriever]({{< relref "/operate/iris/context-retriever" >}}) are now available on Redis Cloud as a public preview. ### Bring your own Cloud resource tags diff --git a/content/operate/rc/context-engine/_index.md b/content/operate/rc/context-engine/_index.md deleted file mode 100644 index a296d98031..0000000000 --- a/content/operate/rc/context-engine/_index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -alwaysopen: false -categories: -- docs -- operate -- rc -description: Deploy AI agents with Redis Cloud. -hideListLinks: false -linktitle: Redis Iris context engine -title: Redis Iris context engine on Redis Cloud -weight: 36 ---- \ No newline at end of file diff --git a/content/operate/rc/context-engine/agent-memory/_index.md b/content/operate/rc/context-engine/agent-memory/_index.md deleted file mode 100644 index 10114afb99..0000000000 --- a/content/operate/rc/context-engine/agent-memory/_index.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -alwaysopen: false -categories: -- docs -- operate -- rc -description: Store agent memory for AI applications in Redis Cloud. -hideListLinks: true -linktitle: Redis Agent Memory -title: Redis Agent Memory on Redis Cloud -weight: 36 -bannerText: Redis Agent Memory on Redis Cloud is currently available as a public preview. Features and behavior are subject to change. -bannerChildren: true ---- - -Redis Agent Memory is a memory service for AI agents available through Python and TypeScript SDKs and a REST API. It provides the persistent, structured memory layer that intelligent agents need to store, retrieve, and manage contextual data across interactions. Rather than requiring developers to build custom memory infrastructure from scratch, Redis Agent Memory offers a turnkey solution with dedicated endpoints, secure API key management, configurable memory schemas, and automatic TTL-based lifecycle management. - -## Redis Agent Memory overview - -Redis Agent Memory uses a two-tier memory model: - -- **Session memory** (also known as **short-term** or **working memory**) maintains the current conversation state, session history, and session-specific metadata. You can set a custom time-to-live (TTL) to control how long session data is retained. -- **Long-term memory** stores information extracted from past sessions, such as user preferences and learned patterns, as text with vector embeddings for semantic retrieval. - -Extraction from session memory into long-term memory happens automatically. When you store a conversation event in session memory, Redis Agent Memory asynchronously extracts important information and stores it as long-term memory. The process is non-blocking, so agent interactions remain responsive. Session memory expires based on its TTL. You can also create long-term memories directly through the API for bulk creation or to import knowledge from external sources. - -For more details, see the [Redis Agent Memory overview]({{< relref "/develop/ai/context-engine/agent-memory" >}}). - -## Get started with Redis Agent Memory on Redis Cloud - -{{< embed-md "rc-agent-memory-get-started.md" >}} From 1cbb67b68a8e2095ec85460e2943cb2711181140 Mon Sep 17 00:00:00 2001 From: Raphael De Lio Date: Thu, 6 Aug 2026 10:49:47 +0200 Subject: [PATCH 14/14] Expand Redis Agent Memory quickstarts --- .../ai/context-engine/agent-memory/_index.md | 10 +- .../agent-memory/developer-guide.md | 12 + .../agent-memory/python-sdk-quickstart.md | 276 ++++++++------- .../agent-memory/rest-api-quickstart.md | 206 +++++++---- .../agent-memory/typescript-sdk-quickstart.md | 329 ++++++++++-------- ...-agent-memory-quickstart-create-service.md | 51 ++- .../iris/agent-memory/create-service.md | 19 + .../operate/iris/agent-memory/view-service.md | 11 + 8 files changed, 573 insertions(+), 341 deletions(-) diff --git a/content/develop/ai/context-engine/agent-memory/_index.md b/content/develop/ai/context-engine/agent-memory/_index.md index 33bbffe805..7ce68b3c2e 100644 --- a/content/develop/ai/context-engine/agent-memory/_index.md +++ b/content/develop/ai/context-engine/agent-memory/_index.md @@ -22,6 +22,7 @@ Access Redis Agent Memory through the Python and TypeScript SDKs or its REST API * **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. * **Automatic session summarization:** Automatically summarize older conversation events while retaining recent messages in full. * **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. +* **Sensitive-data exclusions:** Guide automatic extraction away from specified categories of information that should not be kept in long-term memory. * **Relevant retrieval:** Search long-term memory using semantic, keyword, or hybrid search. * **Multi-session recall:** Retrieve relevant memories across conversations and filter results by owner, session, namespace, topic, or memory type. * **Custom memory types:** Define memory types for your business domain, with structured fields and instructions that control what Redis Agent Memory extracts. @@ -45,6 +46,7 @@ Redis Agent Memory provides two memory tiers:
    • Automatic extraction: Process session events asynchronously and store important information with vector embeddings and metadata.
    • Custom memory types: Define domain-specific memories with structured fields and extraction instructions.
    • +
    • Sensitive-data exclusions: Guide automatic extraction away from specified sensitive information.
    • Direct memory creation: Create memories through the API or import knowledge from external sources.
    • Configurable retention: Set a separate TTL for long-term memories.
    @@ -100,22 +102,22 @@ Get started with Redis Agent Memory on Redis Cloud or join the private preview f ### Choose a quickstart -After your Redis Agent Memory service is ready, choose a client to make your first session-memory and long-term-memory requests. +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.

    Python SDK

    -

    Install the Python SDK and make your first memory requests.

    +

    Explore the Redis Agent Memory workflow with the Python SDK.

    Open the Python quickstart

    TypeScript SDK

    -

    Install the TypeScript SDK and make your first memory requests.

    +

    Explore the Redis Agent Memory workflow with the TypeScript SDK.

    Open the TypeScript quickstart

    REST API

    -

    Use curl to call the Redis Agent Memory API directly.

    +

    Explore the Redis Agent Memory workflow with curl.

    Open the REST API quickstart

    diff --git a/content/develop/ai/context-engine/agent-memory/developer-guide.md b/content/develop/ai/context-engine/agent-memory/developer-guide.md index ee69a3be5e..4a22c6b68f 100644 --- a/content/develop/ai/context-engine/agent-memory/developer-guide.md +++ b/content/develop/ai/context-engine/agent-memory/developer-guide.md @@ -118,6 +118,18 @@ Configure the long-term-memory TTL separately from the session-memory TTL. See [memory configuration]({{< relref "/operate/iris/agent-memory/create-service#memory-configuration" >}}) to configure the extraction cadence and long-term-memory TTL in Redis Cloud. +### Exclude sensitive data from automatic extraction + +Semantic exclusions guide Redis Agent Memory away from storing specified information in long-term memory during automatic extraction. Define an exclusion prompt in the service configuration using plain-language categories such as passwords, access tokens, recovery codes, payment card information, or booking confirmation codes. + +Exclusions apply to automatic extraction from session events. They do not apply when an application creates long-term memories directly. + +{{< warning >}} +Semantic exclusions are advisory and do not guarantee exclusion. Sensitive session content still reaches the extraction model provider. Use appropriate controls before sending sensitive information to Redis Agent Memory or the model provider. +{{< /warning >}} + +See [sensitive-data exclusions]({{< relref "/operate/iris/agent-memory/create-service#sensitive-data-exclusions" >}}) to configure the feature in Redis Cloud. + ### Search long-term memory Search long-term memory using semantic, keyword, or hybrid retrieval. Scope results with filters for owners, sessions, namespaces, topics, and memory types. diff --git a/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md index 8be70d0e68..aa04142c66 100644 --- a/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md @@ -4,14 +4,14 @@ categories: - docs - develop - ai -description: Connect to Redis Agent Memory on Redis Cloud with the Python SDK and make session-memory and long-term-memory requests. +description: Explore session memory, automatic extraction, summarization, custom memory types, and sensitive-data exclusions with the Redis Agent Memory Python SDK. hideListLinks: true linktitle: Python SDK quickstart title: Redis Agent Memory Python SDK quickstart weight: 6 --- -Use this quickstart to connect to a Redis Agent Memory service on Redis Cloud with the Python SDK. You will add and retrieve a session event, create two long-term memories, and search them by meaning. +Use this quickstart to follow a travel planning conversation through Redis Agent Memory. You will retrieve the conversation from session memory, recall information extracted in the background, inspect an automatically generated session summary, extract structured travel information, and guide extraction away from sensitive data. ## Before you begin @@ -29,7 +29,6 @@ You also need Python 3.10 or later. 1. Open the Redis Agent Memory service in the Redis Cloud console. 1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. -1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/iris/agent-memory/view-service#replace-service-api-key" >}}). 1. Export the API key in your shell: ```sh @@ -40,17 +39,13 @@ Keep the API key out of source control, application logs, and other unsecured lo ## Install the SDK -Install the `redis-agent-memory` package: - ```sh python -m pip install redis-agent-memory ``` ## Create the client and check the service health -Replace `` and `` with the values you copied from Redis Cloud. The endpoint must include `https://`. - -The client uses these values and the API key from your environment to authenticate each request. Call `health` before writing any memory to verify that the service is reachable and the API key is accepted: +Create `quickstart.py` with the following code. Replace `` and `` with the values from Redis Cloud. The endpoint must include `https://`. ```python import os @@ -61,9 +56,8 @@ from redis_agent_memory import AgentMemory, models ENDPOINT = "" STORE_ID = "" -SESSION_ID = "quickstart-session" +SESSION_ID = "travel-planning-session" USER_ID = "quickstart-user" -MEMORY_ID = "quickstart-preference" def show(label, response): @@ -85,182 +79,206 @@ if __name__ == "__main__": main() ``` -The health response describes the status of the Redis Agent Memory service. The first store request in the next step validates the Store ID. The context manager closes the SDK client after the requests finish. +Run the file: -## Add a session event +```sh +python quickstart.py +``` -Add a user message to session memory. If the session doesn't exist, Redis Agent Memory creates it when it stores the event. +A healthy response confirms that the client can reach Redis Agent Memory and authenticate with the API key. The first store request validates the Store ID. -Add this code after the call to `health`: +## 1. Build conversation context with session memory + +Session memory stores a conversation as an ordered sequence of events. Add the following code after the health check, inside the `with` block: ```python event = agent_memory.add_session_event( session_id=SESSION_ID, actor_id=USER_ID, role=models.MessageRole.USER, - content=[{"text": "I prefer vegetarian restaurants."}], + content=[models.Text( + text=( + "I am visiting Tokyo and Kyoto next month. " + "I am vegetarian and prefer spicy food." + ), + )], created_at=datetime.now(timezone.utc), ) show("Created event", event) -``` - -The response contains the stored event and its server-generated event ID. - -## Retrieve the session -Retrieve the session to reconstruct its conversation history. Add this code after the call to `add_session_event`: - -```python session = agent_memory.get_session_memory( session_id=SESSION_ID, ) show("Session memory", session) ``` -The response contains the session and its stored events, including the event added in the previous step. +Run the file again. The session response contains the stored message, its role, actor, and timestamps. An application can retrieve this session before the next agent turn and add the events to the model's context. -## Create long-term memories +{{< note >}} +**What to expect:** The `events` array contains the travel message. Redis Agent Memory adds an `eventId` and `systemTimestamp`, showing that the application can recover the complete event later using only the session ID. +{{< /note >}} -Create two long-term memories directly. This lets the quickstart demonstrate semantic ranking without waiting for Redis Agent Memory to extract memories from session events. Add this code after the session retrieval: - -```python - created = agent_memory.bulk_create_long_term_memories( - memories=[ - { - "id": f"{MEMORY_ID}-0", - "text": "The user prefers cozy restaurants.", - "memory_type": "semantic", - "session_id": SESSION_ID, - "owner_id": USER_ID, - }, - { - "id": f"{MEMORY_ID}-1", - "text": "The user prefers spicy food.", - "memory_type": "semantic", - "session_id": SESSION_ID, - "owner_id": USER_ID, - }, - ], - ) - show("Created memories", created) -``` +After the event is stored, comment out the call to `add_session_event` before subsequent runs to avoid adding the same message again. -The response has a `created` array containing the IDs of the two long-term memories. +## 2. Recall automatically extracted information -## Search long-term memory +Redis Agent Memory processes session events in the background and creates long term memories for information that may be useful in later conversations. You configured the extraction cadence to one minute when you created the service. You do not need to call a memory creation method. -Search by meaning and filter the results to memories associated with the example user. Add this code after the bulk create request: +Wait at least one minute, then add this search after the session retrieval: ```python results = agent_memory.search_long_term_memory( request={ - "text": "What kind of meal does the user prefer?", + "text": "What dietary requirements and food preferences does the user have?", "filter_": { "owner_id": { "eq": USER_ID, } }, - "limit": 1, + "limit": 5, }, ) - show("Search results", results) + show("Automatically extracted memories", results) ``` -The response has an `items` array containing the highest-ranked matching memory. The memory about spicy food should be the strongest match for this query. +Run the file. The `items` array should contain memories derived from the conversation, such as the vegetarian requirement or preference for spicy food. Extraction is asynchronous, so run the search again if the array is empty. -The Python SDK uses snake case for method arguments and request fields. The serialized API requests and responses use camel case. +{{< note >}} +**What to expect:** Results similar to `User is a vegetarian` and `User prefers spicy food`. Your application did not create these memories directly. Redis Agent Memory derived them from the session event. The exact text and memory types can vary. +{{< /note >}} -## Run the quickstart +The extracted memory remains searchable after the session expires, subject to the long term memory TTL. You can change the extraction cadence and both TTLs in the [Redis Agent Memory service configuration]({{< relref "/operate/iris/agent-memory/create-service#memory-configuration" >}}). -Create `quickstart.py` from the complete example in the next section, then run it once: +The Python SDK uses snake case for method arguments and request fields. Serialized API requests and responses use camel case. -```sh -python quickstart.py +## 3. Keep long conversations concise with automatic summarization + +Automatic summarization condenses older events and retains the most recent events in full. The retrieved session then contains a `summary` object and the recent `events` array, so the application can provide useful history without filling the model's context window with every original message. + +You enabled automatic summarization when you created the service. When the session reaches six events, Redis Agent Memory summarizes the older events and retains the two most recent events in full. + +### Add conversation turns + +Add this code after the first session event to continue the conversation past the configured threshold: + +```python + turns = [ + (models.MessageRole.ASSISTANT, "What dates are you traveling?"), + (models.MessageRole.USER, "I arrive on October 10 and leave on October 18."), + (models.MessageRole.ASSISTANT, "Would you like formal or casual restaurants?"), + (models.MessageRole.USER, "Mostly casual places near public transit."), + (models.MessageRole.ASSISTANT, "Do you have a preferred budget?"), + (models.MessageRole.USER, "About 40 euros per person."), + ] + + for role, text in turns: + agent_memory.add_session_event( + session_id=SESSION_ID, + actor_id=USER_ID if role == models.MessageRole.USER else "travel-agent", + role=role, + content=[models.Text(text=text)], + created_at=datetime.now(timezone.utc), + ) ``` -The session, user, and memory IDs are example identifiers. The example uses the same user identifier for the event's `actorId` and the long-term memory's `ownerId`. +Run the code once, then comment out the loop to avoid adding the same turns again. Summarization runs in the background. -The example derives two fixed memory IDs from `MEMORY_ID`. Delete the existing memories or change `MEMORY_ID` before running the program again. +### Retrieve the summarized session -## Complete example +After a short wait, retrieve the session again: ```python -import os -from datetime import datetime, timezone + compacted_session = agent_memory.get_session_memory( + session_id=SESSION_ID, + ) + show("Compacted session memory", compacted_session) +``` -from redis_agent_memory import AgentMemory, models +Run the retrieval again after a short wait if `summary` is not present. Compare `summary.text` with the recent events. The summary should preserve earlier trip decisions while recent turns remain available in full. +{{< note >}} +**What to expect:** A `summary` object that preserves details such as Tokyo, Kyoto, the travel dates, and food preferences. `summarizedUpToEventId` identifies the last event covered by the summary, while `events` contains the newer turns that remain in full. The exact summary text can vary. +{{< /note >}} -ENDPOINT = "" -STORE_ID = "" -SESSION_ID = "quickstart-session" -USER_ID = "quickstart-user" -MEMORY_ID = "quickstart-preference" +See [automatic summarization configuration]({{< relref "/operate/iris/agent-memory/create-service#automatic-summarization" >}}) for details. +## 4. Extract business specific data with a custom memory type -def show(label, response): - print(f"{label}:") - print(response.model_dump_json(by_alias=True, indent=2)) +Built in memories preserve generally useful information. Custom memory types let an application extract structured information for its business domain. You configured `trip_preference` when you created the service, so it processed the same travel planning event independently. +Search for the structured memory: -with AgentMemory( - ENDPOINT, - store_id=STORE_ID, - api_key=os.environ["API_KEY"], -) as agent_memory: - health = agent_memory.health() - show("Service health", health) - - event = agent_memory.add_session_event( - session_id=SESSION_ID, - actor_id=USER_ID, - role=models.MessageRole.USER, - content=[{"text": "I prefer vegetarian restaurants."}], - created_at=datetime.now(timezone.utc), - ) - show("Created event", event) - - session = agent_memory.get_session_memory( - session_id=SESSION_ID, - ) - show("Session memory", session) - - created = agent_memory.bulk_create_long_term_memories( - memories=[ - { - "id": f"{MEMORY_ID}-0", - "text": "The user prefers cozy restaurants.", - "memory_type": "semantic", - "session_id": SESSION_ID, - "owner_id": USER_ID, - }, - { - "id": f"{MEMORY_ID}-1", - "text": "The user prefers spicy food.", - "memory_type": "semantic", - "session_id": SESSION_ID, - "owner_id": USER_ID, +```python + custom_results = agent_memory.search_long_term_memory( + request={ + "text": "What are the requirements for the user's trip?", + "filter_": { + "owner_id": {"eq": USER_ID}, + "memory_type": {"eq": "trip_preference"}, + }, + "limit": 5, }, - ], - ) - show("Created memories", created) - - results = agent_memory.search_long_term_memory( - request={ - "text": "What kind of meal does the user prefer?", - "filter_": { - "owner_id": { - "eq": USER_ID, - } + ) + show("Trip preference memories", custom_results) +``` + +The result uses `trip_preference` as its `memoryType` and contains travel information extracted from the conversation. The exact text and returned fields depend on the conversation, extraction model, and client. + +{{< note >}} +**What to expect:** A result with `memoryType` set to `trip_preference` that combines the destinations, travel period, and dietary preferences. This shows that the custom type processed the same conversation independently from the built-in memory types. +{{< /note >}} + +See [custom memory types]({{< relref "/operate/iris/agent-memory/create-service#custom-memory-types" >}}) for configuration requirements and limits. + +## 5. Guide extraction away from sensitive data + +The semantic exclusion prompt tells Redis Agent Memory which information should not be kept in long-term memory. Add an event containing a fictional booking code and information that is safe to retain: + +```python + sensitive_event = agent_memory.add_session_event( + session_id=SESSION_ID, + actor_id=USER_ID, + role=models.MessageRole.USER, + content=[models.Text( + text=( + "I booked Hotel Sakura in Tokyo. For this example, " + "the fictional booking confirmation code is DEMO-7QX9." + ), + )], + created_at=datetime.now(timezone.utc), + ) + show("Event with excluded information", sensitive_event) +``` + +Run the code once, then comment out the call to `add_session_event`. Wait at least one minute and search for the safe hotel information: + +```python + exclusion_results = agent_memory.search_long_term_memory( + request={ + "text": "Where is the user staying in Tokyo?", + "filter_": { + "owner_id": {"eq": USER_ID}, + }, + "limit": 5, }, - "limit": 1, - }, - ) - show("Search results", results) + ) + show("Memories after semantic exclusion", exclusion_results) ``` +Inspect the returned memories. They can retain the hotel name, but should not contain `DEMO-7QX9` because the exclusion prompt covers booking confirmation codes. + +{{< note >}} +**What to expect:** A memory similar to `User booked Hotel Sakura in Tokyo` without the fictional confirmation code. If the code appears, refine the exclusion prompt and test again. Exclusions remain advisory. +{{< /note >}} + +{{< warning >}} +Semantic exclusions are advisory and do not guarantee that sensitive information is excluded. Session content still reaches the extraction model provider. Do not use real sensitive data in this exercise. Exclusions do not apply to directly created long-term memories. +{{< /warning >}} + +See [sensitive-data exclusions]({{< relref "/operate/iris/agent-memory/create-service#sensitive-data-exclusions" >}}) for configuration details. + ## Next steps -- Review the [Python SDK package and reference](https://pypi.org/project/redis-agent-memory/). -- Review the [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). -- Try the [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}). +* Review the [Python SDK package and reference](https://pypi.org/project/redis-agent-memory/). +* Try the [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}) or [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}). +* Learn when to [create long term memories directly]({{< relref "/develop/ai/context-engine/agent-memory/developer-guide#create-long-term-memories" >}}). diff --git a/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md b/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md index d0e2326ea5..56fcae6b31 100644 --- a/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md @@ -4,7 +4,7 @@ categories: - docs - develop - ai -description: Connect to Redis Agent Memory with the REST API and make session-memory and long-term-memory requests. +description: Explore session memory, automatic extraction, summarization, custom memory types, and sensitive-data exclusions with the Redis Agent Memory REST API. hideListLinks: true linktitle: REST quickstart title: Redis Agent Memory REST API quickstart @@ -14,53 +14,53 @@ aliases: - /develop/ai/context-engine/agent-memory/api-examples/ --- -Use this quickstart to connect to a Redis Agent Memory service on Redis Cloud with the REST API. You will add and retrieve a session event, create two long-term memories, and search them by meaning. +Use this quickstart to follow a travel planning conversation through Redis Agent Memory. You will retrieve the conversation from session memory, recall information extracted in the background, inspect an automatically generated session summary, extract structured travel information, and guide extraction away from sensitive data. ## Before you begin To complete this quickstart, you need: -* A Redis Agent Memory service on Redis Cloud. If you don't have one, [create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}). -* The API key for the service. +* A Redis Cloud account that can create Redis Agent Memory services. +* An eligible Redis Cloud database, or permission to create one. * A shell with `curl` and `jq` installed. +## Create a Redis Agent Memory service + +{{< embed-md "rc-agent-memory-quickstart-create-service.md" >}} + ## Save the connection values 1. Open the Redis Agent Memory service in the Redis Cloud console. 1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. -1. Export the connection values in your shell. Replace each placeholder with the value from Redis Cloud: +1. Export the values in your shell: ```sh export AGENT_MEMORY_URL='' export STORE_ID='' export API_KEY='' - ``` - -1. Define identifiers for the resources created in this quickstart: - - ```sh - export SESSION_ID='quickstart-session' + export SESSION_ID='travel-planning-session' export OWNER_ID='quickstart-user' - export MEMORY_ID='quickstart-preference' ``` - -`AGENT_MEMORY_URL` must contain the complete endpoint shown in Redis Cloud, including `https://`. - -Send `API_KEY` as a bearer token in the `Authorization` header. Keep API keys out of source control, application logs, and other unsecured locations. -`SESSION_ID`, `OWNER_ID`, and `MEMORY_ID` are example identifiers used throughout this quickstart. You can replace them with identifiers from your application. +`AGENT_MEMORY_URL` must include `https://`. Keep the API key out of source control, application logs, and other unsecured locations. -## Add a session event +## Check the service health -Set the event timestamp to the current Coordinated Universal Time (UTC): +Verify that the service is available: ```sh -export EVENT_CREATED_AT="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" +curl --fail-with-body --silent --show-error \ + --header "Authorization: Bearer $API_KEY" \ + "$AGENT_MEMORY_URL/health" | jq ``` -Add a user event to session memory: +## 1. Build conversation context with session memory + +Session memory stores a conversation as an ordered sequence of events. Add a user message that contains details the travel agent will need later: ```sh +export EVENT_CREATED_AT="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" + curl --fail-with-body --silent --show-error \ --request POST \ --header "Authorization: Bearer $API_KEY" \ @@ -73,7 +73,7 @@ curl --fail-with-body --silent --show-error \ "role": "USER", "content": [ { - "text": "I prefer vegetarian restaurants." + "text": "I am visiting Tokyo and Kyoto next month. I am vegetarian and prefer spicy food." } ], "createdAt": "$EVENT_CREATED_AT" @@ -81,33 +81,88 @@ curl --fail-with-body --silent --show-error \ JSON ``` -A successful request returns `201 Created`. The response contains the stored event and its server-generated event ID. +Retrieve the session: + +```sh +curl --fail-with-body --silent --show-error \ + --header "Authorization: Bearer $API_KEY" \ + "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/session-memory/$SESSION_ID" | jq +``` + +The `events` array contains the stored message, its role, actor, and timestamps. An application can retrieve this session before the next agent turn and add the events to the model's context. -For request and response details, see [`AddSessionEvent`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference/#tag/Session-Memory/operation/AddSessionEvent" >}}). +{{< note >}} +**What to expect:** The `events` array contains the travel message. Redis Agent Memory adds an `eventId` and `systemTimestamp`, showing that the application can recover the complete event later using only the session ID. +{{< /note >}} -## Retrieve the session +## 2. Recall automatically extracted information -Retrieve the session event that you added: +Redis Agent Memory processes session events in the background and creates long term memories for information that may be useful in later conversations. You configured the extraction cadence to one minute when you created the service. You do not need to submit a separate memory creation request. + +Wait at least one minute, then search for the user's dietary requirements: ```sh curl --fail-with-body --silent --show-error \ + --request POST \ --header "Authorization: Bearer $API_KEY" \ - "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/session-memory/$SESSION_ID" | jq + --header 'Content-Type: application/json' \ + --data @- \ + "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/long-term-memory/search" <}} +**What to expect:** Results similar to `User is a vegetarian` and `User prefers spicy food`. Your application did not create these memories directly. Redis Agent Memory derived them from the session event. The exact text and memory types can vary. +{{< /note >}} + +The extracted memory remains searchable after the session expires, subject to the long term memory TTL. You can change the extraction cadence and both TTLs in the [Redis Agent Memory service configuration]({{< relref "/operate/iris/agent-memory/create-service#memory-configuration" >}}). + +## 3. Keep long conversations concise with automatic summarization + +Automatic summarization condenses older events and retains the most recent events in full. The retrieved session then contains a `summary` object and the recent `events` array, so the application can provide useful history without filling the model's context window with every original message. + +You enabled automatic summarization when you created the service. When the session reaches six events, Redis Agent Memory summarizes the older events and retains the two most recent events in full. + +### Add conversation turns + +Add enough user and assistant events to reach the configured threshold. Use the request from the first step and change `role`, `actorId`, `content`, and `createdAt` for each event. The Python and TypeScript quickstarts use six additional turns about travel dates, restaurant style, and budget. + +Summarization runs in the background after the session reaches the threshold. -For request and response details, see [`GetSessionMemory`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference#tag/session-memory/operation/GetSessionMemory" >}}). +### Retrieve the summarized session -## Understand automatic extraction +After a short wait, retrieve the session again: -Redis Agent Memory processes session events asynchronously and extracts relevant information into long-term memory. By default, extraction runs on a five-minute cadence, so extracted memories might not appear immediately. +```sh +curl --fail-with-body --silent --show-error \ + --header "Authorization: Bearer $API_KEY" \ + "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/session-memory/$SESSION_ID" | jq +``` + +Repeat the retrieval after a short wait if `summary` is not present. Compare `summary.text` with the recent events. The summary should preserve earlier decisions about the trip while recent turns remain available in full. -The next step creates a long-term memory directly. This approach lets you verify long-term-memory search without waiting for automatic extraction. +{{< note >}} +**What to expect:** A `summary` object that preserves details such as Tokyo, Kyoto, the travel dates, and food preferences. `summarizedUpToEventId` identifies the last event covered by the summary, while `events` contains the newer turns that remain in full. The exact summary text can vary. +{{< /note >}} -## Create a long-term memory +See [automatic summarization configuration]({{< relref "/operate/iris/agent-memory/create-service#automatic-summarization" >}}) for details. -Create two long-term memories for the same owner and session: +## 4. Extract business specific data with a custom memory type + +Built in memories preserve generally useful information. Custom memory types let an application extract structured information for its business domain. You configured `trip_preference` when you created the service, so it processed the same travel planning event independently. + +Search for the structured memory: ```sh curl --fail-with-body --silent --show-error \ @@ -115,35 +170,58 @@ curl --fail-with-body --silent --show-error \ --header "Authorization: Bearer $API_KEY" \ --header 'Content-Type: application/json' \ --data @- \ - "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/long-term-memory" <}} +**What to expect:** A result with `memoryType` set to `trip_preference` that combines the destinations, travel period, and dietary preferences. This shows that the custom type processed the same conversation independently from the built-in memory types. +{{< /note >}} -For request and response details, see [`BulkCreateLongTermMemories`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference/#tag/Long-Term-Memory/operation/BulkCreateLongTermMemories" >}}). +See [custom memory types]({{< relref "/operate/iris/agent-memory/create-service#custom-memory-types" >}}) for configuration requirements and limits. -## Search long-term memory +## 5. Guide extraction away from sensitive data -Search for the long-term memory by meaning and owner: +The semantic exclusion prompt tells Redis Agent Memory which information should not be kept in long-term memory. Add an event containing a fictional booking code and information that is safe to retain: + +```sh +export EVENT_CREATED_AT="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" + +curl --fail-with-body --silent --show-error \ + --request POST \ + --header "Authorization: Bearer $API_KEY" \ + --header 'Content-Type: application/json' \ + --data @- \ + "$AGENT_MEMORY_URL/v1/stores/$STORE_ID/session-memory/events" <}} +**What to expect:** A memory similar to `User booked Hotel Sakura in Tokyo` without the fictional confirmation code. If the code appears, refine the exclusion prompt and test again. Exclusions remain advisory. +{{< /note >}} + +{{< warning >}} +Semantic exclusions are advisory and do not guarantee that sensitive information is excluded. Session content still reaches the extraction model provider. Do not use real sensitive data in this exercise. Exclusions do not apply to directly created long-term memories. +{{< /warning >}} -For request and response details, see [`SearchLongTermMemory`]({{< relref "/develop/ai/context-engine/agent-memory/api-reference/#tag/Long-Term-Memory/operation/SearchLongTermMemory" >}}). +See [sensitive-data exclusions]({{< relref "/operate/iris/agent-memory/create-service#sensitive-data-exclusions" >}}) for configuration details. ## Next steps -- Review the [Redis Cloud service setup guide]({{< relref "/operate/iris/agent-memory/create-service" >}}) for service configuration options. -- Use the [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) for endpoint and schema details. -- [View and manage the service]({{< relref "/operate/iris/agent-memory/view-service" >}}) to update configuration, manage API keys, review metrics, flush memories, or delete the service. +* Follow the [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}) or [TypeScript SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart" >}}). +* Learn when to [create long term memories directly]({{< relref "/develop/ai/context-engine/agent-memory/developer-guide#create-long-term-memories" >}}). +* Use the [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}) for endpoint and schema details. diff --git a/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md index f4216fe8cd..1069779448 100644 --- a/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md +++ b/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md @@ -4,14 +4,14 @@ categories: - docs - develop - ai -description: Connect to Redis Agent Memory on Redis Cloud with the TypeScript SDK and make session-memory and long-term-memory requests. +description: Explore session memory, automatic extraction, summarization, custom memory types, and sensitive-data exclusions with the Redis Agent Memory TypeScript SDK. hideListLinks: true linktitle: TypeScript SDK quickstart title: Redis Agent Memory TypeScript SDK quickstart weight: 7 --- -Use this quickstart to connect to a Redis Agent Memory service on Redis Cloud with the TypeScript SDK. You will add and retrieve a session event, create two long-term memories, and search them. +Use this quickstart to follow a travel planning conversation through Redis Agent Memory. You will retrieve the conversation from session memory, recall information extracted in the background, inspect an automatically generated session summary, extract structured travel information, and guide extraction away from sensitive data. ## Before you begin @@ -23,13 +23,63 @@ You also need Node.js and npm. ## Create a Redis Agent Memory service -{{< embed-md "rc-agent-memory-quickstart-create-service.md" >}} +1. Sign in to the [Redis Cloud console](https://cloud.redis.io/). +1. Select **Agent Memory** from the navigation menu. +1. If Redis Cloud displays the public preview terms, review and accept them. +1. Select **Create custom service**. +1. Enter a service name, select an eligible database, and select its `default` user. +1. Under **Memory configuration**, enter these values: + + | Setting | Value | What it controls | + |:--------|:------|:-----------------| + | **Short-term TTL** | `1` day | How long session memory is retained. | + | **Long-term TTL** | `365` days | How long long-term memories are retained. | + | **Extraction cadence** | `1` minute | How often session events are processed for extraction. One minute is for this quickstart; use a longer production interval unless you need rapid extraction. | + | **Automatic summarization** | Enabled | Whether older session events are condensed into a summary. | + | **Summarize after (messages)** | `6` | The event count that triggers summarization. Six is for this quickstart; use a higher production threshold. | + | **Keep most recent (messages)** | `2` | How many recent events remain in full. Two is for this quickstart; retain more in production when recent turns are needed. | + +1. Under **Memory types & extraction**, select **Add type** and configure this custom memory type: + + | Setting | Value | What it controls | + |:--------|:------|:-----------------| + | **Name** | `trip_preference` | The identifier stored in `memoryType` and used in search filters. | + | **Description** | `Structured requirements for a planned trip` | The purpose of the custom memory type. | + | **Extraction prompt** | `Extract trip requirements only when the user states a destination or travel plan. Preserve explicit dietary requirements and food preferences.` | When to create the memory and which information to capture. | + | **Enabled** | Enabled | Whether new memories of this type are extracted. | + +1. Add these custom fields: + + | Field | Type | Description | + |:------|:-----|:------------| + | `destinations` | `list[str]` | Cities or countries the user plans to visit. | + | `travel_period` | `str` | When the user plans to travel. | + | `dietary_requirements` | `list[str]` | Dietary requirements that affect recommendations. | + | `food_preferences` | `list[str]` | Cuisines, flavors, or dining preferences stated by the user. | + +1. Under **Sensitive-data exclusions**, enable **Semantic exclusions** and enter this exclusion prompt: + + ```text + Do not keep passwords, access tokens, recovery codes, payment card information, or booking confirmation codes in long-term memory. + ``` + +1. Select **Create**. +1. Copy the Redis Agent Memory API key and store it securely. + +{{< warning >}} +Redis Cloud displays the Redis Agent Memory API key only once. If you lose it, [generate a new API key]({{< relref "/operate/iris/agent-memory/view-service#replace-service-api-key" >}}). +{{< /warning >}} + +These settings keep the background stages short enough to observe during the quickstart. For screenshots and configuration details, see [create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}). + +{{< warning >}} +Sensitive-data exclusions guide the extraction model but do not guarantee exclusion. Sensitive session content still reaches the model provider. Exclusions do not apply when an application creates long-term memories directly. +{{< /warning >}} ## Save the connection values 1. Open the Redis Agent Memory service in the Redis Cloud console. 1. On the **Configuration** tab, copy the **Endpoint** and **Store ID**. -1. Copy the API key that Redis Cloud displayed when you created the service. If you no longer have the key, [generate a new API key]({{< relref "/operate/iris/agent-memory/view-service#replace-service-api-key" >}}). 1. Export the API key in your shell: ```sh @@ -40,8 +90,6 @@ Keep the API key out of source control, application logs, and other unsecured lo ## Install the SDK -Create a project and install the Redis Agent Memory SDK: - ```sh mkdir agent-memory-quickstart cd agent-memory-quickstart @@ -52,13 +100,7 @@ npm install --save-dev tsx ## Create the client and check the service health -In the code sample, replace `` and `` with the values you copied from the service's **Configuration** tab. The endpoint must include `https://`. - -The session, user, and memory IDs are example identifiers defined in the code. This quickstart uses the same user identifier for the event's `actorId` and the long-term memory's `ownerId`. - -Create a file named `quickstart.ts` and initialize an `AgentMemory` client. The client uses the endpoint, Store ID, and API key to send requests to your Redis Agent Memory service. - -Call `health` before writing any memory to verify that the service is reachable and accepts the API key: +Create `quickstart.ts` with the following code. Replace `` and `` with the values from Redis Cloud. The endpoint must include `https://`. ```typescript import { AgentMemory } from "@redis-iris/agent-memory"; @@ -70,9 +112,8 @@ if (!apiKey) { const serverURL = ""; const storeId = ""; -const sessionId = "quickstart-session"; +const sessionId = "travel-planning-session"; const userId = "quickstart-user"; -const memoryId = "quickstart-preference"; const agentMemory = new AgentMemory({ serverURL, @@ -82,7 +123,7 @@ const agentMemory = new AgentMemory({ async function run() { const health = await agentMemory.health(); - console.log("Health check:"); + console.log("Service health:"); console.dir(health, { depth: null }); } @@ -92,194 +133,196 @@ run().catch((error) => { }); ``` -A successful health check confirms that the service is reachable and accepts the API key. The first store request validates the Store ID. +Run the file: -## Add a session event +```sh +npx tsx quickstart.ts +``` -A session contains an ordered sequence of events. Add the following code inside `run`, after the health check, to add a user message to the example session: +A healthy response confirms that the client can reach Redis Agent Memory and authenticate with the API key. The first store request validates the Store ID. + +## 1. Build conversation context with session memory + +Session memory stores a conversation as an ordered sequence of events. Add the following code after the health check, inside `run`: ```typescript const event = await agentMemory.addSessionEvent({ sessionId, actorId: userId, role: "USER", - content: [{ text: "I prefer vegetarian restaurants." }], + content: [{ + text: "I am visiting Tokyo and Kyoto next month. I am vegetarian and prefer spicy food.", + }], createdAt: new Date(), }); console.log("Created event:"); console.dir(event, { depth: null }); -``` - -A successful request returns the stored event, including its generated event ID and system timestamp. If the session does not exist, Redis Agent Memory creates it when the event is added. - -## Retrieve the session - -Retrieve the session to access its stored events. Add this code to `run` after the call to `addSessionEvent`: -```typescript - const session = await agentMemory.getSessionMemory( - sessionId, - ); + const session = await agentMemory.getSessionMemory(sessionId); console.log("Session memory:"); console.dir(session, { depth: null }); ``` -The response contains the session and the events currently stored for it. +Run the file again. The session response contains the stored message, its role, actor, and timestamps. An application can retrieve this session before the next agent turn and add the events to the model's context. -## Create long-term memories +{{% note %}} +**What to expect:** The `events` array contains the travel message. Redis Agent Memory adds an `eventId` and `systemTimestamp`, showing that the application can recover the complete event later using only the session ID. +{{% /note %}} -Long-term memories can be extracted from session events or written directly. This quickstart writes two memories directly so you can search them immediately and see semantic ranking in the results. Add this code after the session retrieval: +After the event is stored, comment out the call to `addSessionEvent` before subsequent runs to avoid adding the same message again. -```typescript - const created = await agentMemory.bulkCreateLongTermMemories({ - memories: [ - { - id: `${memoryId}-0`, - text: "The user prefers cozy restaurants.", - memoryType: "semantic", - sessionId, - ownerId: userId, - }, - { - id: `${memoryId}-1`, - text: "The user prefers spicy food.", - memoryType: "semantic", - sessionId, - ownerId: userId, - }, - ], - }); - console.log("Created memories:"); - console.dir(created, { depth: null }); -``` - -The response contains a `created` array with the ID of each long-term memory created by the request. +## 2. Recall automatically extracted information -## Search long-term memory +Redis Agent Memory processes session events in the background and creates long term memories for information that may be useful in later conversations. You configured the extraction cadence to one minute when you created the service. You do not need to call a memory creation method. -Search uses the meaning of the query to rank relevant long-term memories. The owner filter restricts the results to memories associated with the example user, and `limit: 1` returns only the strongest match. Add this code after the bulk create request: +Wait at least one minute, then add this search after the session retrieval: ```typescript const results = await agentMemory.searchLongTermMemory({ - text: "What kind of meal does the user prefer?", + text: "What dietary requirements and food preferences does the user have?", filter: { ownerId: { eq: userId, }, }, - limit: 1, + limit: 5, }); - console.log("Search results:"); + console.log("Automatically extracted memories:"); console.dir(results, { depth: null }); ``` -The response contains an `items` array with the matching long-term memories. The memory about spicy food should be the strongest semantic match for this query. +Run the file. The `items` array should contain memories derived from the conversation, such as the vegetarian requirement or preference for spicy food. Extraction is asynchronous, so run the search again if the array is empty. -## Run the quickstart +{{% note %}} +**What to expect:** Results similar to `User is a vegetarian` and `User prefers spicy food`. Your application did not create these memories directly. Redis Agent Memory derived them from the session event. The exact text and memory types can vary. +{{% /note %}} -Run the completed file once: +The extracted memory remains searchable after the session expires, subject to the long term memory TTL. You can change the extraction cadence and both TTLs in the [Redis Agent Memory service configuration]({{< relref "/operate/iris/agent-memory/create-service#memory-configuration" >}}). -```sh -npx tsx quickstart.ts +## 3. Keep long conversations concise with automatic summarization + +Automatic summarization condenses older events and retains the most recent events in full. The retrieved session then contains a `summary` object and the recent `events` array, so the application can provide useful history without filling the model's context window with every original message. + +You enabled automatic summarization when you created the service. When the session reaches six events, Redis Agent Memory summarizes the older events and retains the two most recent events in full. + +### Add conversation turns + +Add this code after the first session event to continue the conversation past the configured threshold: + +```typescript + const turns = [ + { role: "ASSISTANT", actorId: "travel-agent", text: "What dates are you traveling?" }, + { role: "USER", actorId: userId, text: "I arrive on October 10 and leave on October 18." }, + { role: "ASSISTANT", actorId: "travel-agent", text: "Would you like formal or casual restaurants?" }, + { role: "USER", actorId: userId, text: "Mostly casual places near public transit." }, + { role: "ASSISTANT", actorId: "travel-agent", text: "Do you have a preferred budget?" }, + { role: "USER", actorId: userId, text: "About 40 euros per person." }, + ] as const; + + for (const turn of turns) { + await agentMemory.addSessionEvent({ + sessionId, + actorId: turn.actorId, + role: turn.role, + content: [{ text: turn.text }], + createdAt: new Date(), + }); + } ``` -The program prints: +Run the code once, then comment out the loop to avoid adding the same turns again. Summarization runs in the background. -- The health check response. -- The session event and its generated event ID. -- The session and its stored events. -- A `created` array containing the two long-term memory IDs. -- An `items` array containing the strongest match for the semantic search. The result should be the memory about spicy food. +### Retrieve the summarized session -The example derives two fixed memory IDs from `memoryId`. Delete the existing memories or change `memoryId` before running the program again. +After a short wait, retrieve the session again: -## Complete example +```typescript + const compactedSession = await agentMemory.getSessionMemory(sessionId); + console.log("Compacted session memory:"); + console.dir(compactedSession, { depth: null }); +``` + +Run the retrieval again after a short wait if `summary` is not present. Compare `summary.text` with the recent events. The summary should preserve earlier trip decisions while recent turns remain available in full. + +{{% note %}} +**What to expect:** A `summary` object that preserves details such as Tokyo, Kyoto, the travel dates, and food preferences. `summarizedUpToEventId` identifies the last event covered by the summary, while `events` contains the newer turns that remain in full. The exact summary text can vary. +{{% /note %}} + +See [automatic summarization configuration]({{< relref "/operate/iris/agent-memory/create-service#automatic-summarization" >}}) for details. + +## 4. Extract business specific data with a custom memory type -Your completed `quickstart.ts` file should contain: +Built in memories preserve generally useful information. Custom memory types let an application extract structured information for its business domain. You configured `trip_preference` when you created the service, so it processed the same travel planning event independently. + +Search for the structured memory: ```typescript -import { AgentMemory } from "@redis-iris/agent-memory"; + const customResults = await agentMemory.searchLongTermMemory({ + text: "What are the requirements for the user's trip?", + filter: { + ownerId: { eq: userId }, + memoryType: { eq: "trip_preference" }, + }, + limit: 5, + }); + console.log("Trip preference memories:"); + console.dir(customResults, { depth: null }); +``` -const apiKey = process.env.API_KEY; -if (!apiKey) { - throw new Error("Set the API_KEY environment variable."); -} +The result uses `trip_preference` as its `memoryType` and contains travel information extracted from the conversation. The exact text and returned fields depend on the conversation, extraction model, and client. -const serverURL = ""; -const storeId = ""; -const sessionId = "quickstart-session"; -const userId = "quickstart-user"; -const memoryId = "quickstart-preference"; +{{% note %}} +**What to expect:** A result with `memoryType` set to `trip_preference` that combines the destinations, travel period, and dietary preferences. This shows that the custom type processed the same conversation independently from the built-in memory types. +{{% /note %}} -const agentMemory = new AgentMemory({ - serverURL, - storeId, - apiKey, -}); +See [custom memory types]({{< relref "/operate/iris/agent-memory/create-service#custom-memory-types" >}}) for configuration requirements and limits. -async function run() { - const health = await agentMemory.health(); - console.log("Health check:"); - console.dir(health, { depth: null }); +## 5. Guide extraction away from sensitive data - const event = await agentMemory.addSessionEvent({ +The semantic exclusion prompt tells Redis Agent Memory which information should not be kept in long-term memory. Add an event containing a fictional booking code and information that is safe to retain: + +```typescript + const sensitiveEvent = await agentMemory.addSessionEvent({ sessionId, actorId: userId, role: "USER", - content: [{ text: "I prefer vegetarian restaurants." }], + content: [{ + text: "I booked Hotel Sakura in Tokyo. For this example, the fictional booking confirmation code is DEMO-7QX9.", + }], createdAt: new Date(), }); - console.log("Created event:"); - console.dir(event, { depth: null }); - - const session = await agentMemory.getSessionMemory( - sessionId, - ); - console.log("Session memory:"); - console.dir(session, { depth: null }); + console.log("Event with excluded information:"); + console.dir(sensitiveEvent, { depth: null }); +``` - const created = await agentMemory.bulkCreateLongTermMemories({ - memories: [ - { - id: `${memoryId}-0`, - text: "The user prefers cozy restaurants.", - memoryType: "semantic", - sessionId, - ownerId: userId, - }, - { - id: `${memoryId}-1`, - text: "The user prefers spicy food.", - memoryType: "semantic", - sessionId, - ownerId: userId, - }, - ], - }); - console.log("Created memories:"); - console.dir(created, { depth: null }); +Run the code once, then comment out the call to `addSessionEvent`. Wait at least one minute and search for the safe hotel information: - const results = await agentMemory.searchLongTermMemory({ - text: "What kind of meal does the user prefer?", +```typescript + const exclusionResults = await agentMemory.searchLongTermMemory({ + text: "Where is the user staying in Tokyo?", filter: { - ownerId: { - eq: userId, - }, + ownerId: { eq: userId }, }, - limit: 1, + limit: 5, }); - console.log("Search results:"); - console.dir(results, { depth: null }); -} - -run().catch((error) => { - console.error(error); - process.exitCode = 1; -}); + console.log("Memories after semantic exclusion:"); + console.dir(exclusionResults, { depth: null }); ``` +Inspect the returned memories. They can retain the hotel name, but should not contain `DEMO-7QX9` because the exclusion prompt covers booking confirmation codes. + +{{% note %}} +**What to expect:** A memory similar to `User booked Hotel Sakura in Tokyo` without the fictional confirmation code. If the code appears, refine the exclusion prompt and test again. Exclusions remain advisory. +{{% /note %}} + +{{< warning >}} +Semantic exclusions are advisory and do not guarantee that sensitive information is excluded. Session content still reaches the extraction model provider. Do not use real sensitive data in this exercise. Exclusions do not apply to directly created long-term memories. +{{< /warning >}} + +See [sensitive-data exclusions]({{< relref "/operate/iris/agent-memory/create-service#sensitive-data-exclusions" >}}) for configuration details. + ## Next steps -- Review the [TypeScript SDK package and reference](https://www.npmjs.com/package/@redis-iris/agent-memory). -- Review the [Redis Agent Memory API reference]({{< relref "/develop/ai/context-engine/agent-memory/api-reference" >}}). -- Try the [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}). +* Review the [TypeScript SDK package and reference](https://www.npmjs.com/package/@redis-iris/agent-memory). +* Try the [Python SDK quickstart]({{< relref "/develop/ai/context-engine/agent-memory/python-sdk-quickstart" >}}) or [REST API quickstart]({{< relref "/develop/ai/context-engine/agent-memory/rest-api-quickstart" >}}). +* Learn when to [create long term memories directly]({{< relref "/develop/ai/context-engine/agent-memory/developer-guide#create-long-term-memories" >}}). diff --git a/content/embeds/rc-agent-memory-quickstart-create-service.md b/content/embeds/rc-agent-memory-quickstart-create-service.md index b9951f012d..c813e11be9 100644 --- a/content/embeds/rc-agent-memory-quickstart-create-service.md +++ b/content/embeds/rc-agent-memory-quickstart-create-service.md @@ -1,11 +1,52 @@ 1. Sign in to the [Redis Cloud console](https://cloud.redis.io/). -2. Select **Agent Memory** from the navigation menu. -3. If Redis Cloud displays the public-preview terms, review and accept them. -4. Select **Quick create** to use the default settings, or select **Create custom** and choose an eligible database. -5. After Redis Cloud creates the service, copy the Redis Agent Memory API key and store it securely. +1. Select **Agent Memory** from the navigation menu. +1. If Redis Cloud displays the public preview terms, review and accept them. +1. Select **Create custom service**. +1. Enter a service name, select an eligible database, and select its `default` user. +1. Under **Memory configuration**, enter these values: + + | Setting | Value | What it controls | + |:--------|:------|:-----------------| + | **Short-term TTL** | `1` day | How long session memory is retained. | + | **Long-term TTL** | `365` days | How long long-term memories are retained. | + | **Extraction cadence** | `1` minute | How often session events are processed for extraction. One minute is for this quickstart; use a longer production interval unless you need rapid extraction. | + | **Automatic summarization** | Enabled | Whether older session events are condensed into a summary. | + | **Summarize after (messages)** | `6` | The event count that triggers summarization. Six is for this quickstart; use a higher production threshold. | + | **Keep most recent (messages)** | `2` | How many recent events remain in full. Two is for this quickstart; retain more in production when recent turns are needed. | + +1. Under **Memory types & extraction**, select **Add type** and configure this custom memory type: + + | Setting | Value | What it controls | + |:--------|:------|:-----------------| + | **Name** | `trip_preference` | The identifier stored in `memoryType` and used in search filters. | + | **Description** | `Structured requirements for a planned trip` | The purpose of the custom memory type. | + | **Extraction prompt** | `Extract trip requirements only when the user states a destination or travel plan. Preserve explicit dietary requirements and food preferences.` | When to create the memory and which information to capture. | + | **Enabled** | Enabled | Whether new memories of this type are extracted. | + +1. Add these custom fields: + + | Field | Type | Description | + |:------|:-----|:------------| + | `destinations` | `list[str]` | Cities or countries the user plans to visit. | + | `travel_period` | `str` | When the user plans to travel. | + | `dietary_requirements` | `list[str]` | Dietary requirements that affect recommendations. | + | `food_preferences` | `list[str]` | Cuisines, flavors, or dining preferences stated by the user. | + +1. Under **Sensitive-data exclusions**, enable **Semantic exclusions** and enter this exclusion prompt: + + ```text + Do not keep passwords, access tokens, recovery codes, payment card information, or booking confirmation codes in long-term memory. + ``` + +1. Select **Create**. +1. Copy the Redis Agent Memory API key and store it securely. {{< warning >}} Redis Cloud displays the Redis Agent Memory API key only once. If you lose it, [generate a new API key]({{< relref "/operate/iris/agent-memory/view-service#replace-service-api-key" >}}). {{< /warning >}} -For screenshots and configuration details, see [create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}). +These settings keep the background stages short enough to observe during the quickstart. For screenshots and configuration details, see [create a Redis Agent Memory service]({{< relref "/operate/iris/agent-memory/create-service" >}}). + +{{< warning >}} +Sensitive-data exclusions guide the extraction model but do not guarantee exclusion. Sensitive session content still reaches the model provider. Exclusions do not apply when an application creates long-term memories directly. +{{< /warning >}} diff --git a/content/operate/iris/agent-memory/create-service.md b/content/operate/iris/agent-memory/create-service.md index 74417532c5..69fff0bf6b 100644 --- a/content/operate/iris/agent-memory/create-service.md +++ b/content/operate/iris/agent-memory/create-service.md @@ -140,6 +140,25 @@ Each custom memory type can have an **extraction strategy** that controls how th | **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. | | **Enabled** | Whether the extraction strategy is active. Enabled by default. Disable it to keep the type defined without extracting new memories for it. | +### Sensitive-data exclusions {#sensitive-data-exclusions} + +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. + +| Setting name | Description | +|:-------------|:------------| +| **Semantic exclusions** | Whether the extraction model applies the exclusion prompt when creating long-term memories from session events. | +| **Exclusion prompt** | Plain-language instructions describing information that should not be kept in long-term memory. Maximum length: 2,000 characters. | + +For example: + +```text +Do not keep passwords, access tokens, recovery codes, payment card information, or booking confirmation codes in long-term memory. +``` + +{{< warning >}} +Sensitive-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. +{{< /warning >}} + ### Create service When you are done setting the details of your Redis Agent Memory service, select **Create** to create it. diff --git a/content/operate/iris/agent-memory/view-service.md b/content/operate/iris/agent-memory/view-service.md index 25d27161ed..b647b400b9 100644 --- a/content/operate/iris/agent-memory/view-service.md +++ b/content/operate/iris/agent-memory/view-service.md @@ -84,6 +84,17 @@ Because a custom memory type's structure is fixed after creation, only some sett To change a custom memory type's name or fields, you must create a new service. You can, however, add a new custom memory type when editing the service, up to the limit of 3 custom memory types. +### Sensitive-data exclusions {#sensitive-data-exclusions} + +The **Sensitive-data exclusions** section shows whether semantic exclusions are enabled and the prompt used to guide automatic extraction away from sensitive information. + +| Setting name | Description | +|:-------------|:------------| +| **Semantic exclusions** | Whether the exclusion prompt is applied during automatic extraction. _(Editable)_ | +| **Exclusion prompt** | Plain-language instructions describing information that should not be kept in long-term memory. _(Editable)_ | + +Sensitive-data exclusions are advisory. They do not guarantee exclusion, sensitive session content still reaches the extraction model provider, and the prompt does not apply to directly created long-term memories. + ### Actions The **Actions** section lets you flush or delete your Redis Agent Memory service.