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 👍 / 👎.
d2604d1 to
7d0a9e2
Compare
| 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.
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 👍 / 👎.
7d0a9e2 to
e4c70d8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4c70d8660
ℹ️ 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".
| : typeof memory?.dist === 'number' | ||
| ? memory.dist |
There was a problem hiding this comment.
Convert OSS distances before showing similarity scores
When OSS results come back with only dist, that value is a distance (lower is better—the TypeScript SDK examples convert it with 1 - dist for relevance), but this stores it unchanged as score and the UI labels it as a similarity score where higher is better. Searches against OSS servers that return dist will therefore display the least relevant matches with the largest score; convert the distance to a similarity value or label/render it as a distance.
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#6266
e4c70d8 to
c68930c
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
Reviewed by Cursor Bugbot for commit c68930c. Configure here.
| dto: UpdateAgentMemoryEndpointDto, | ||
| ): Promise<AgentMemoryEndpoint> { | ||
| const oldEndpoint = await this.get(metadata.id); | ||
| const newEndpoint = await deepMerge(oldEndpoint, dto); |
There was a problem hiding this comment.
deepMerge mutates oldEndpoint causing unintended object aliasing
Low Severity
deepMerge (which wraps lodash mergeWith) mutates its first argument in place and returns the same reference. The variable newEndpoint is the exact same object as oldEndpoint — the naming falsely implies a new object was created. While not immediately catastrophic (since oldEndpoint isn't used after the merge), this is fragile: any future code referencing the result of this.get() before the merge would see the contaminated object, and the merged full-endpoint is then redundantly re-merged inside repository.update().
Reviewed by Cursor Bugbot for commit c68930c. Configure here.
| value={values.backendType} | ||
| valueRender={defaultValueRender} | ||
| onChange={(value) => setFieldValue('backendType', value)} | ||
| /> |
There was a problem hiding this comment.
Form storeId not cleared when switching backend to OSS
Medium Severity
When the user switches the backend type from Cloud to OSS via the RiSelect, the storeId field is visually hidden but its value remains in Formik state. If a user edits a Cloud endpoint, switches to OSS, and submits, the stale storeId value will be compared against the stored value. If the user also changed storeId before switching, the diff will include it in the update payload — sending a storeId to the backend for an OSS endpoint where it's meaningless, and triggering an unnecessary re-connection validation via isConnectionAffected.
Reviewed by Cursor Bugbot for commit c68930c. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c68930c2ae
ℹ️ 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".
| context: current.context ?? null, | ||
| data: current.data ?? {}, | ||
| memories: current.memories ?? [], | ||
| messages: [ | ||
| ...(current.messages ?? []), | ||
| { role: message.role, content: message.content }, | ||
| ], |
There was a problem hiding this comment.
Preserve working-memory metadata on append
When adding an event to an OSS session that already has a TTL or custom working-memory settings, this read-modify-write PUT replaces the whole record but only carries over context/data/memories/messages. Fields such as ttl_seconds, long_term_memory_strategy, tokens, and timestamps are omitted and reset to server defaults, so using RedisInsight to append a debug message can make expiring sessions persistent or change extraction behavior; include the rest of the current record in the replacement payload.
Useful? React with 👍 / 👎.
|
Addressed the remaining automated review findings in stacked PR booleanhunter#1. |


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 #6266
Screenshots and Recording
RAM-explorer.Redis.Insight.mp4
Note
Medium Risk
New external integrations and encrypted credential storage with broad read/write/delete proxy APIs; scope is isolated behind a feature flag and follows existing RDI patterns.
Overview
Introduces Agent Memory as a gated home-tab feature: users register OSS or Redis Cloud endpoints, connect, and inspect working memory, long-term search, summary views (OSS), and store config through a dedicated workspace UI.
The API adds a NestJS module with SQLite persistence (
agent_memory_endpoint), encrypted API keys, pooled per-session clients (PooledClientStorage, shared with refactored RDI storage), and OSS/Cloud adapters usingagent-memory-clientand@redis-iris/agent-memorywith normalized responses and capability-based feature gating. UI adds endpoint CRUD, routes under/agent-memory, Redux slices/API wiring (from the broader PR), auto-refresh, and inspector-style panes for overview and long-term memory.Also bumps features config, registers the entity/migration, and adds i18n/notification strings for new endpoints.
Reviewed by Cursor Bugbot for commit c68930c. Bugbot is set up for automated code reviews on this repo. Configure here.