Skip to content

MOD-18613: Document Agent Memory namespaces and custom memory usage - #4001

Draft
abrookins wants to merge 3 commits into
mainfrom
docs/agent-memory-namespaces-custom-types
Draft

abrookins wants to merge 3 commits into
mainfrom
docs/agent-memory-namespaces-custom-types

Conversation

@abrookins

@abrookins abrookins commented Sep 14, 2026

Copy link
Copy Markdown

Summary

Agent Memory documentation mixed setup, integration guidance, and feature details across three overlapping quickstarts. This change gives readers a Concepts page, one focused Quickstart with Python, TypeScript, and curl tabs, an application-oriented developer guide, and feature pages for Sessions, Long-term memory, and Namespaces. Existing quickstart URLs redirect to the combined page.

Custom memory types and their examples are part of Long-term memory. Namespaces covers personal and shared namespaces, placement, retrieval, and management. The shared examples explain cross-owner recall and application access checks. The legacy-label migration section is removed, and search descriptions now say semantic search with filters.

The API reference includes the namespace resource APIs and namespaceRef from SDK release PR 179. Examples use Python SDK 0.4.0 and TypeScript SDK 0.3.0. Navigation and links from Redis Cloud setup pages are updated.

Validation

  • 83 example requests validated against the release OpenAPI schema with a local HTTP fixture server.
  • Python and TypeScript examples cover namespace creation/reuse, shared scope without a namespace owner, shared searches without an owner filter, and populated/empty custom-memory results.
  • Strict TypeScript checking and curl shell syntax checks passed.
  • Focused Agent Memory build passed with Hugo 0.143.1; 67 rendered internal links and heading targets passed.
  • git diff --check passed.

Live extraction was not tested. Standard Hugo alias redirects preserve the old page URLs but do not retain their section fragments; internal links target the new pages directly.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 9 related items from repository history (1 new this commit):

Memory updated at 7287b09

@abrookins abrookins changed the title Document Agent Memory namespaces and custom memory usage MOD-18613: Document Agent Memory namespaces and custom memory usage Sep 14, 2026
@abrookins
abrookins marked this pull request as draft September 14, 2026 16:34
@mich-elle-luna mich-elle-luna self-assigned this Sep 14, 2026

@mich-elle-luna mich-elle-luna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! I feel like these new pages are more confusing to follow with the instructions in a heading and then more steps in a long sentence with no examples in some cases, so I've flagged those.

weight: 4
---

Redis Agent Memory keeps conversation context in session memory and information for future conversations in long-term memory. Optional namespaces organize both.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a draft of this concepts.md page in my PR #4003 that you can feel free to take whatever you like from it, it puts this in context of what you already know about Redis session memory and how this concept is different.

Use session memory and long-term memory in your agent's request cycle. Complete the [quickstart]({{< relref "/develop/ai/context-engine/agent-memory/quickstart" >}}) first to verify the connection and make your first requests. For the memory model, see [Concepts]({{< relref "/develop/ai/context-engine/agent-memory/concepts" >}}).

## Integration workflow
## Configure the application

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very terse, three steps with no details about how to do it, where you are in the process.


## Choose a client
| Identifier | Application choice |
|:-----------|:-------------------|

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do I choose these?

| 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](/content/develop/ai/context-engine/agent-memory/python-sdk-quickstart.md). |
| 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](/content/develop/ai/context-engine/agent-memory/typescript-sdk-quickstart.md). |
| REST API | You need language-independent HTTP access or don't want an SDK dependency. | No package required. Follow the [REST API quickstart](/content/develop/ai/context-engine/agent-memory/rest-api-quickstart.md). |
Resolve the user and their allowed sessions in your application before making memory requests. Build recall filters from that identity. Search filters do not replace application access checks.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems very terse, you say to do a thing, but don't explain first the reason or second how to do it.

1. Store the new user and assistant messages as session events, with their roles and actor IDs.

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.
Include the current user message once. If your application stores it before retrieval, avoid adding a second copy to the model context. Store the assistant message after it has been generated.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we give an example of this?

Comment on lines +208 to +209

For Python, add subsequent snippets inside the `with` block in `main`. For TypeScript, add them inside `run`. After each step, run `python quickstart.py` or `npx tsx quickstart.ts`. With curl, run each command in the same shell. Run writes once; comment out completed writes and their output statements before rerunning an SDK file.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems too terse, no real steps about how to do this


{{< /multitabs >}}

Run the example. 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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too terse, doesn't say how

> [!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.

Run the event write once. In the SDK files, comment out event creation and its output statements before subsequent runs. Keep the session retrieval.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't say how or why you would do this

weight: 10
---

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

starting a doc with this type of terse instruction is unusual. you are referring to a field that hasn't even been defined yet. It should start with what this document describes and the reason you would do any of this. How would you even add an event? This is saying to use a field then add events with no context.


## Retrieve conversation context

Before an agent turn, retrieve the session by `sessionId` and provide the relevant events to the agent. Use these events as conversation context for the model.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe tell CLaude that we need to put all of the ## headings in the page into context at the beginning of the page so folks understand what this is about

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants