Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion content/develop/ai/context-engine/agent-memory/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ Get started with Redis Agent Memory on Redis Cloud, join the private preview for

-tab-sep-

Contact your Redis representative or [contact sales](https://redis.io/contact/) to join the private preview on Redis Software.
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" >}}).

You need a license key to deploy. Contact your Redis representative or
[contact sales](https://redis.io/contact/).

-tab-sep-

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
Title: LangCache REST API
Title: Redis Agent Memory API
linkTitle: API reference
layout: apireference
type: page
weight: 20
params:
sourcefile: ./openapi-agent-memory.json
sortOperationsAlphabetically: false
---
---
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"openapi": "3.0.2",
"info": {
"title": "MemoryDataPlaneServer",
"title": "Redis Agent Memory API",
"version": "1.0.0",
"description": "API for managing Redis Agent Memory (RAM) data plane operations.\n\nAuthentication:\n- Cloud deployments require `Authorization: Bearer <store-api-key>`, where the store API key is obtained from [Redis Cloud Agent Memory](https://cloud.redis.io/#/agent-memory).\n- On-prem deployments run with authentication disabled.\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 Agent Memory service or store. For self-managed deployments, see the self-managed Agent Memory guide for authentication options.\n"
},
"paths": {
"/health": {
Expand Down
108 changes: 108 additions & 0 deletions content/develop/ai/context-engine/agent-memory/self-managed/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
Title: Self-managed Redis Agent Memory
alwaysopen: false
categories:
- docs
- develop
- ai
description: Deploy, configure, secure, and operate Redis Agent Memory on a self-managed Kubernetes cluster.
linkTitle: Self-managed Agent Memory
weight: 40
hideListLinks: true
---

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.

This guide covers deployment, configuration, security, validation, API examples,
and operations for self-managed 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" >}})
documents the self-managed admin endpoints for stores and agent keys.

{{< note >}}
Self-managed Redis Agent Memory is available as a private preview. You need a
license key to deploy it. Contact your Redis representative or
[contact sales](https://redis.io/contact/).
{{< /note >}}

## What you are deploying

A standard self-managed 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` |
| 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 |
| 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

The Data Plane handles runtime memory requests. The optional Control Plane
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 |

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.
1. Agents and applications call the Data Plane with a store ID.
1. The Data Plane enforces the configured auth mode and reads or writes memory in Store Redis.
1. Workers use Job Redis for background work and write generated memory to Store Redis.

### API surfaces

All Data Plane APIs are scoped to a store. A store is the logical isolation
boundary for memory data.

When agent-key authentication is enabled, grants stored in Metadata Redis
determine which stores and actions each key can access.

| API surface | Endpoint prefix | Purpose |
| --- | --- | --- |
| Session memory | `/v1/stores/{storeId}/session-memory` | Ordered conversation events, session metadata, and session lifecycle operations. |
| Long-term memory | `/v1/stores/{storeId}/long-term-memory` | Searchable facts, preferences, summaries, and custom memory records. |
| Control Plane | `/v1/stores`, `/v1/api-keys` | Self-managed administration for stores and agent keys. |

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`,
`episodic`, `message`, and `session_summary_view`.


## Deployment modes

Start with [Plan a deployment]({{< relref "/develop/ai/context-engine/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" >}}) |

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.

{{< 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
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
components.
{{< /warning >}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
---
Title: Self-managed API examples
alwaysopen: false
categories:
- docs
- develop
- ai
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
---

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" >}}).

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 examples

Set variables:

```bash
CP_URL="http://localhost:9100"
RAM_ADMIN_TOKEN="<admin-token>"
```

List stores:

```bash
curl -sS "$CP_URL/v1/stores" \
-H "Authorization: Bearer $RAM_ADMIN_TOKEN"
```

Create a store:

```bash
curl -sS -X POST "$CP_URL/v1/stores" \
-H "Authorization: Bearer $RAM_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-store"
}'
```

Response:

```json
{
"storeId": "<store-id>"
}
```

Mint an agent key:

```bash
curl -sS -X POST "$CP_URL/v1/api-keys" \
-H "Authorization: Bearer $RAM_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-agent-key",
"grants": [
{
"resourceType": "mem-store",
"resourceId": "<store-id>",
"actions": ["read", "write"]
}
]
}'
```

Response:

```json
{
"keyId": "0123456789abcdef0123456789abcdef",
"token": "<agent-key>",
"createdAt": 1780000000
}
```

Agent-key fields:

| Field | Notes |
| ----- | ----- |
| Endpoint | Use `/v1/api-keys`. |
| `name` | Required. |
| `grants` | Required. |
| `resourceType` | Use `mem-store`. |
| `resourceId` | Set to the store ID. |
| `actions` | Use `read`, `write`, or both. |
| Token | Returned only when you mint or rotate a key. Store it immediately. |

## Data Plane API examples

Set variables:

```bash
DP_URL="http://localhost:9000"
STORE_ID="<store-id>"
RAM_AGENT_KEY="<agent-key>"
```

For auth-disabled deployments, omit the `Authorization` header and rely on the
deployment's hosting controls.

### Write a session event

```bash
curl -sS -X POST "$DP_URL/v1/stores/$STORE_ID/session-memory/events" \
-H "Authorization: Bearer $RAM_AGENT_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "session-001",
"actorId": "user-001",
"role": "USER",
"content": [
{
"text": "What is the capital of France?"
}
],
"createdAt": "2026-06-25T18:00:00Z"
}'
```

Request body fields:

| Field | Notes |
| ----- | ----- |
| `actorId` | Required. |
| `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. |

### Read session memory

```bash
curl -sS "$DP_URL/v1/stores/$STORE_ID/session-memory/session-001" \
-H "Authorization: Bearer $RAM_AGENT_KEY"
```

### List sessions

List sessions for a specific owner:

```bash
curl -sS "$DP_URL/v1/stores/$STORE_ID/session-memory?filterOwnerId=user-001" \
-H "Authorization: Bearer $RAM_AGENT_KEY"
```

List all sessions:

```bash
curl -sS "$DP_URL/v1/stores/$STORE_ID/session-memory?includeAll=true" \
-H "Authorization: Bearer $RAM_AGENT_KEY"
```

`filterOwnerId` and `includeAll` are mutually exclusive.

### Create long-term memories directly

```bash
curl -sS -X POST "$DP_URL/v1/stores/$STORE_ID/long-term-memory" \
-H "Authorization: Bearer $RAM_AGENT_KEY" \
-H "Content-Type: application/json" \
-d '{
"memories": [
{
"id": "pref-email-updates",
"text": "User prefers email updates.",
"memoryType": "semantic",
"ownerId": "user-001",
"namespace": "preferences",
"topics": ["communications"]
}
]
}'
```

### Search long-term memory

```bash
curl -sS -X POST "$DP_URL/v1/stores/$STORE_ID/long-term-memory/search" \
-H "Authorization: Bearer $RAM_AGENT_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "How should we contact this user?",
"filter": {
"ownerId": {
"eq": "user-001"
}
},
"limit": 5
}'
```
Loading
Loading