#8795: feat(memory): add Redis-backed long-term memory plugin
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
#19341: Mind Memory Fork
by juliopx · 2026-02-17
78.4%
#14073: [wip]support OpenViking Memory Plugin
by Mijamind719 · 2026-02-11
78.2%
#22518: feat(extensions): add chromadb-memory plugin with multi-agent colle...
by ta3pks · 2026-02-21
77.7%
#13775: Lucas/enable corememories
by Itslouisbaby · 2026-02-11
77.3%
#3401: fix(memory-lancedb): improve autoCapture with turn-by-turn processing
by mike-nott · 2026-01-28
76.9%
#20338: feat: add daedalus-memory plugin — trust-gradient memory with tri-c...
by CmdrFALCO · 2026-02-18
76.5%
#6060: feat(onboarding): add Memory Optimization step to onboarding wizard
by GodsBoy · 2026-02-01
76.1%
#11457: feat: Add hybrid memory mode with auto-created daily log templates
by Undertone0809 · 2026-02-07
75.1%
#19967: feat(memory): add semantic clustering and enhanced MMR
by alihassan6520 · 2026-02-18
74.9%
#20149: fix(memory): expose index concurrency as config option
by togotago · 2026-02-18
74.7%