feat(agent-memory): Adds UI for exploring Agent memory#6228
feat(agent-memory): Adds UI for exploring Agent memory#6228booleanhunter wants to merge 1 commit into
Conversation
| ids.map(async (id) => { | ||
| await this.clientProvider.deleteManyByEndpointId(id); | ||
| }), | ||
| ); |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit d2604d1. Configure here.
There was a problem hiding this comment.
💡 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)) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
d2604d1 to
7d0a9e2
Compare
There was a problem hiding this comment.
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).
Reviewed by Cursor Bugbot for commit 7d0a9e2. Configure here.
| await dispatch(fetchSummariesAction(endpointId)) | ||
| const { partitions } = stateInit().agentMemory.workspace.summary | ||
| if ((partitions[viewId] ?? []).length) break | ||
| } |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 7d0a9e2. Configure here.
| if (isStatusSuccessful(status)) { | ||
| dispatch(clearWorkingMemorySuccess()) | ||
| onSuccess?.() | ||
| await dispatch(fetchWorkingMemoryAction(endpointId)) |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 7d0a9e2. Configure here.
There was a problem hiding this comment.
💡 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, |
There was a problem hiding this comment.
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 👍 / 👎.


Adds an Agent Memory home tab and explorer for OSS and Redis Cloud endpoints for Agent Memory.
Home tab:
Overview screen:
Long-term memory screen:
Configuration screen: Memory Store settings
Backend:
Tech decisions:
References #5266
Screenshots and Recording
RAM-explorer.Redis.Insight.mp4
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 (
agentMemoryin 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_endpointrecords with encrypted API keys, pooled HTTP clients for OSS (agent-memory-client) and Redis Cloud (@redis-iris/agent-memory), and REST routes underagent-memoryfor endpoint CRUD/connect plus data operations (sessions, working memory, LTM search/delete, discovery, summary views). RDI’s client pool is refactored onto sharedPooledClientStorage.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.