MemGate's 35MB Plug-in Cuts AI Memory Jailbreaks From 16.8% to 4.4%
MemGate is a 9M-parameter plug-in that blocks unsafe memories from reaching your LLM agent without touching the model or the database
Takeaways
- MemGate is a 9M-parameter, 35MB plug-in that filters unsafe memories before they reach an LLM agent, requiring no model or database changes.
- Semantic similarity alone is insufficient for safe memory retrieval: related memories can still cause cross-domain leakage, sycophancy, tool-call drift, or jailbreaks.
- On GPT-4o-mini, MemGate cuts cross-domain leakage from 27.0% to 3.5% and jailbreak success from 16.8% to 4.4%.
- Unlike simply disabling memory, MemGate improves LoCoMo utility F1 from 38.9 to 40.8 while reducing threats.
- Evaluated across A-Mem, Mem0, MemOS, and OpenClaw with six LLM backbones including Gemini-3-Pro and Claude-Sonnet-4.6.
- The paper frames long-term memory as a "durable control channel," not just a utility layer, establishing a new threat model for agentic systems.
Every time a personal AI agent pulls up a memory to answer your question, it's making a trust decision. And right now, that decision is almost entirely based on one thing: how similar the memory looks to your current query. A new paper argues that's a dangerous oversimplification, and backs it up with a lightweight fix that fits in 35 megabytes.
The paper, "Beyond Similarity: Trustworthy Memory Search for Personal AI Agents", introduces MemGate, a neural plug-in that sits between a vector memory store and the backbone LLM. It doesn't modify the model, doesn't rewrite the database, and doesn't call an LLM judge at inference time. It just decides which retrieved memories are actually safe to let through.
The problem with "close enough"
Personal AI agents increasingly rely on long-term memory to provide persistent personalization across sessions, and existing memory pipelines are largely driven by semantic similarity: memory data close to the current query is retrieved and injected into the model context. That sounds reasonable until you think about what "close enough" actually means in practice.
Imagine a user who has told their agent about a health condition in a medical conversation. Later, they ask a completely unrelated question about restaurant recommendations. A vector search might surface that health memory because it's semantically adjacent to dietary preferences. The agent now has private medical context bleeding into a food query. That's cross-domain leakage, and it's just one of four threat categories the paper identifies.

The full threat taxonomy covers:
- Cross-domain leakage: memories from one context (health, finance, personal beliefs) inappropriately influencing responses in an unrelated domain
- Sycophancy: stored user preferences causing the agent to validate or agree rather than give accurate answers
- Tool-call drift: past tool-use patterns in memory nudging the agent to invoke tools it shouldn't in the current task
- Memory-induced jailbreaks: adversarially crafted memories that bypass safety guardrails when retrieved
The results show that long-term memory is not merely a utility layer, but a durable control channel that can reshape how agents interpret tasks and execute actions, leaving them highly susceptible to the aforementioned threats. That framing matters: memory isn't just a convenience feature, it's an attack surface.