llamaIndex - 💡(How to fix) Fix [Feature Request] Memory Poisoning Protection for LlamaIndex via OWASP Agent Memory Guard

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Problem

LlamaIndex agents using memory (ChatMemoryBuffer, VectorMemory) are vulnerable to memory poisoning attacks — adversarial inputs injected into conversation history or vector stores can cause agents to leak secrets, ignore instructions, or behave maliciously. OWASP identifies this as a top risk for LLM applications.

Proposed Solution

OWASP Agent Memory Guard (AMG) is an open-source Python library that wraps any memory store as a transparent security layer:

  • pip install agent-memory-guard
  • Scans every memory write for prompt injection, PII leakage, and tampering
  • 92.5% detection rate on AgentThreatBench benchmark
  • Designed to integrate with any BaseChatMessageHistory or similar interface

Links

Would the LlamaIndex team consider adding AMG as a recommended security layer for agent memory? Happy to contribute a PR with a LlamaIndex-native integration.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING