# OWASP Agent Memory Guard

An official OWASP project that screens an AI agent's memory writes against a policy, blocking prompt-injection-style attempts to poison persistent memory that survive a context reset.

OWASP Agent Memory Guard is an officially recognized OWASP Incubator project addressing memory and context poisoning in AI agents, listed as its reference implementation for that risk category. Because modern agents persist memory across sessions, anything written into that memory becomes a privileged input on later turns; an attacker who plants text in the wrong field can override instructions, exfiltrate data, or hijack tool calls in a way that survives a context reset, since the memory itself does.

Existing defenses generally screen user input at the front of the agent loop; Agent Memory Guard instead sits between the agent and its memory store, screening every write through a pipeline of detectors against a declarative policy, and reports it runs locally with no external API calls at a median latency in the tens of microseconds. Its design has been discussed with maintainers of several well-known agent-framework projects, and it is named in MITRE ATLAS's memory-hardening mitigation guidance. It installs as a Python package.

Website: https://owasp.org/projects/agent-memory-guard
