Skip to content

feat(agent-memory): Adds UI for exploring Agent memory#6228

Open
booleanhunter wants to merge 1 commit into
redis:mainfrom
booleanhunter:feat/agent-memory-inspector
Open

feat(agent-memory): Adds UI for exploring Agent memory#6228
booleanhunter wants to merge 1 commit into
redis:mainfrom
booleanhunter:feat/agent-memory-inspector

Conversation

@booleanhunter

@booleanhunter booleanhunter commented Jul 17, 2026

Copy link
Copy Markdown

Adds an Agent Memory home tab and explorer for OSS and Redis Cloud endpoints for Agent Memory.

Home tab:

  • Manage agent memory endpoints for two backends: the OSS agent-memory-server and the Redis Cloud agent memory service.

Overview screen:

  • working memory for a selected user/namespace/session: messages with roles, timestamps, extraction status, session TTL, running summary; inject events (can create new sessions); clear a session
  • Long-term memories for the selected scope.
  • Adds opt-in auto-refresh

Long-term memory screen:

  • Search records: semantic + keyword search, filters (user/owner, namespace, sessions, memory type, topics, entities),
  • click-to-filter cards, per-record delete
  • summary views panel: browse LLM-computed profiles, recompute a profile, generate an empty view, create/delete views.
  • Adds opt-in auto-refresh

Configuration screen: Memory Store settings

Backend:

  • new NestJS module with encrypted endpoint storage

Tech decisions:

  • Uses Official SDKs: agent-memory-client (OSS) and @redis-iris/agent-memory (Cloud) (new API dependencies)
  • Direct HTTP for the few calls the SDKs don't cover.
  • Responses normalized to one shape so the UI is backend-agnostic; a capability model hides unsupported features per backend (e.g. Cloud has no summary views/namespaces).

References #5266

Screenshots and Recording

RAM-explorer.Redis.Insight.mp4
Redis Agent Memory - Overview Redis Agent Memory - Long-term memory

Note

Medium Risk
New external-proxy surface handles bearer tokens and user/session memory data; mitigated by encryption, apiKey never serialized to clients, and a feature flag, but mistakes in auth or pooling could leak credentials or cross-session state.

Overview
Introduces Agent Memory as a gated feature (agentMemory in features config) with a home tab to manage endpoints and a workspace to inspect working memory, long-term search, summary views, and store configuration.

The API adds a NestJS module: SQLite-backed agent_memory_endpoint records with encrypted API keys, pooled HTTP clients for OSS (agent-memory-client) and Redis Cloud (@redis-iris/agent-memory), and REST routes under agent-memory for endpoint CRUD/connect plus data operations (sessions, working memory, LTM search/delete, discovery, summary views). RDI’s client pool is refactored onto shared PooledClientStorage.

The UI wires routes and navigation, endpoint list/add/edit flows, and a large inspector workspace (resizable panes, filters, auto-refresh prefs) that talks to the new APIs via Redux thunks/slices.

Reviewed by Cursor Bugbot for commit 7d0a9e2. Bugbot is set up for automated code reviews on this repo. Configure here.

@CLAassistant

CLAassistant commented Jul 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@booleanhunter
booleanhunter marked this pull request as ready for review July 17, 2026 10:28
@booleanhunter
booleanhunter requested a review from a team as a code owner July 17, 2026 10:28
ids.map(async (id) => {
await this.clientProvider.deleteManyByEndpointId(id);
}),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale clients after delete

Medium Severity

When endpoint deletion removes database rows before pooled clients are cleared, a failure during pool cleanup leaves live clients for ids that no longer exist in storage. getOrCreate can reuse those clients, so memory data remains reachable after the endpoint was removed from RedisInsight.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d2604d1. Configure here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2604d1443

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if (isStatusSuccessful(status)) {
dispatch(clearWorkingMemorySuccess())
onSuccess?.()
await dispatch(fetchWorkingMemoryAction(endpointId))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid refetching cleared working memory

When the DELETE actually removes the working-memory record for the selected session, this immediately re-fetches the same still-selected session and turns a successful clear into a 404/error state in the pane. Clear or unselect the session, or refresh the session list, instead of re-querying the deleted record.

Useful? React with 👍 / 👎.

const longTermMemory = useAppSelector(agentMemoryLongTermSelector)
const summary = useAppSelector(agentMemorySummarySelector)

const isConnected = connectedEndpoint.id === endpointId

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reconnect when opening an edited endpoint

If a user previously connected to an endpoint, edits that same endpoint's URL/backend/credentials from the home page, and then opens its workspace again, this id-only check still treats the cached endpoint as connected. The workspace then renders stale URL/backend/capabilities and bypasses the explicit connect failure path for the updated configuration; reset/refresh the connected endpoint after edits/deletes or compare more than just the id.

Useful? React with 👍 / 👎.

dto: UpdateAgentMemoryEndpointDto,
): Promise<AgentMemoryEndpoint> {
const oldEndpoint = await this.get(metadata.id);
const newEndpoint = await deepMerge(oldEndpoint, dto);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear cloud credentials when switching backend types

When an existing Cloud endpoint is changed to OSS, the edit form cannot include the old API key and hides the store id, so the DTO only carries the changed fields. This merge preserves the previous Cloud apiKey/storeId, and the OSS client sends any retained apiKey as a bearer token to the new URL; clear Cloud-only fields when backendType changes to OSS.

Useful? React with 👍 / 👎.

Adds an Agent Memory home tab and explorer for OSS and Redis Cloud endpoints for Agent Memory.

Home tab:

- Manage agent memory endpoints for two backends: the OSS agent-memory-server and the Redis Cloud agent memory service.

Overview screen:

- working memory for a selected user/namespace/session: messages with roles, timestamps, extraction status, session TTL, running summary; inject events (can create new sessions); clear a session
- Long-term memories for the selected scope.
- Adds opt-in auto-refresh

Long-term memory screen:

- Search records: semantic + keyword search, filters (user/owner, namespace, sessions, memory type, topics, entities),
- click-to-filter cards, per-record delete
- summary views panel: browse LLM-computed profiles, recompute a profile, generate an empty view, create/delete views.
- Adds opt-in auto-refresh

Configuration screen: Memory Store settings

Backend:

- new NestJS module with encrypted endpoint storage

Tech decisions:

- Uses Official SDKs: agent-memory-client (OSS) and @redis-iris/agent-memory (Cloud) (new API dependencies)
- Direct HTTP for the few calls the SDKs don't cover.
- Responses normalized to one shape so the UI is backend-agnostic; a capability model hides unsupported features per backend (e.g. Cloud has no summary views/namespaces).

References redis#5266
@booleanhunter
booleanhunter force-pushed the feat/agent-memory-inspector branch from d2604d1 to 7d0a9e2 Compare July 17, 2026 10:50

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 7d0a9e2. Configure here.

await dispatch(fetchSummariesAction(endpointId))
const { partitions } = stateInit().agentMemory.workspace.summary
if ((partitions[viewId] ?? []).length) break
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary recompute polling stops early

Medium Severity

After triggering a full summary-view recompute, the poll loop exits as soon as any partitions exist for that view. Partitions from before the run still satisfy that check, so polling can stop while the background recompute is still in progress and the UI marks the run finished too early.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7d0a9e2. Configure here.

if (isStatusSuccessful(status)) {
dispatch(clearWorkingMemorySuccess())
onSuccess?.()
await dispatch(fetchWorkingMemoryAction(endpointId))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clear session then refetch errors

Medium Severity

A successful working-memory clear is followed by an immediate refetch for the same session. On OSS backends the session is often gone after delete, so the GET returns not-found and the pane shows a failure even though the clear succeeded.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7d0a9e2. Configure here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d0a9e2d58

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const options: SdkSearchOptions = {
text: dto.text ?? '',
limit: LONG_TERM_MEMORY_SEARCH_LIMIT,
optimizeQuery: dto.optimizeQuery || undefined,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Forward optimize_query for OSS searches

When users enable Optimize query on an OSS endpoint, this flag is passed only through agent-memory-client's SearchOptions; in the 0.3.1 SDK implementation, searchLongTermMemory builds the POST body without optimizeQuery and does not add the server's optimize_query query parameter, so the server always uses its default false. Route this request through axios or otherwise send ?optimize_query=true so the UI control actually changes OSS search behavior.

Useful? React with 👍 / 👎.

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