← Back to PRs

#8795: feat(memory): add Redis-backed long-term memory plugin

by tf-gmail open 2026-02-04 11:59 View on GitHub →
docs app: web-ui gateway docker stale size: XL
@ ## Summary This PR adds a Redis-backed long-term memory plugin that enables agents to remember information across conversations using vector similarity search. ### What it does - Adds `memory-redis` extension using Redis Stack with RediSearch for vector search - Auto-captures important user information (preferences, facts, context) - Auto-recalls relevant memories when users ask questions - Provides memory tools (`remember`, `recall`, `forget`) for explicit memory management - Fixes UI bug where `<relevant-memories>` tags were visible in chat messages ### Key Changes **New: `extensions/memory-redis/`** - Full plugin implementation with vector embeddings (OpenAI, Ollama, Gemini) - Redis Stack container configuration with 512MB limit, noeviction policy - Comprehensive test suite (566 lines) - Documentation (README.md) **Docker Integration (`docker-setup.sh`)** - Auto-configures memory-redis plugin during Docker setup - Adds Redis Stack container to compose - Configures Ollama embeddings by default **UI Fix (`ui/src/ui/chat/message-normalizer.ts`)** - Strips injected `<relevant-memories>` context from user messages - Memories are still used by the agent, just not displayed in UI - Added tests for the normalization **Other** - `Dockerfile`: Copy extension package.json before pnpm install - `docs/gateway/self-hosted.md`: Self-hosted deployment guide ## Test Plan - [x] `pnpm build` passes - [x] `pnpm check` passes - [x] `pnpm test` passes - [x] Memory-redis plugin tests pass - [x] Message normalizer tests pass - [x] Docker deployment tested on Linux VM - [x] Memory capture verified (Redis stores memories) - [x] Memory recall verified (agent retrieves relevant memories) - [x] UI fix verified (no `<relevant-memories>` tags visible) **Note:** Only Docker deployment (`docker-setup.sh`) was implemented and tested. Non-containerized deployment may require additional configuration. --- > ��� AI Disclosure: This PR was developed with AI assistance (GitHub Copilot / Claude). @ <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR introduces a new `extensions/memory-redis` long‑term memory plugin backed by Redis vector search (RediSearch), wires it into Docker onboarding (`docker-setup.sh`) and the Docker build (copying extension `package.json` files for workspace resolution), and updates the UI message normalizer to hide injected `<relevant-memories>` blocks from user-visible chat. Key changes are largely additive (new extension + docs), with a small UI behavior tweak to strip memory context from user messages only. The most significant integration point is the Redis index creation/query path and the Docker auto-configuration that sets the memory plugin slot after onboarding. <h3>Confidence Score: 3/5</h3> - This PR is reasonably safe to merge, but has a few correctness issues that can break fresh Redis setups and cause config/test inconsistencies. - Most changes are additive and tested, but there are a couple of concrete runtime-footgun issues (Redis index PREFIX shape) plus internal inconsistencies (invalid categories in tests, TypeBox version mismatch, and AWS SDK lockfile skew) that are likely to bite CI or first-run deployments. - extensions/memory-redis/index.ts, extensions/memory-redis/index.test.ts, extensions/memory-redis/package.json, pnpm-lock.yaml <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> <!-- /greptile_comment -->

Most Similar PRs