www-project-agent-memory-guard
Active·★ 188·Apache-2.0·Updated 2026-10-22
OWASP Agent Memory Guard is a runtime defense solution designed to prevent AI agents from being weaponized through their own memory by detecting and blocking memory poisoning attacks. It provides a robust security layer that intercepts malicious writes to agent memory, ensuring the integrity and safety of AI operations even after context resets.
#AI Security#Agent Defense#Memory Protection#LLM Agents#Runtime Defense#Prompt Injection#Policy Enforcement#Threat Detection
01
Features
01Integrity: SHA-256 baselines flag out-of-band tampering with immutable keys.
02Threat detection: Built-in detectors for prompt injection, sensitive data leakage, protected-key modifications, size anomalies, and self-reinforcement loops.
03Policy enforcement: YAML-defined rules map findings to actions like `allow`, `redact`, `quarantine`, or `block`.
04Forensics: Every decision emits a structured `SecurityEvent`, with point-in-time snapshots for rollback to a known-good state.
05Drop-in middleware: Ships with `GuardedChatMessageHistory` for LangChain and general framework-agnostic `MemoryStore` protocol.
02
Compatibility
Python
Language
Verified via docs
LangChain
Framework Integration
Verified via docs
OpenAI Agents SDK
Framework Integration
Verified via docs
AutoGen
Framework Integration
Verified via docs
mem0
Framework Integration
Verified via docs
CrewAI
Framework Integration
Verified via docs
03
Quick start
1
$ pip install agent-memory-guard
04
Use cases
↳Reference implementation for OWASP ASI06: Memory Poisoning.
↳AI security research, such as at Microsoft.
↳Securing multi-tenant agent deployments with compliance requirements in enterprise teams.
↳Protecting LangChain, OpenAI Agents SDK, AutoGen, mem0, and CrewAI based agents from memory-based attacks.
05
Alternatives
HoneyMCP★ 28
A Deception Security Layer for MCP Servers. It injects "ghost tools" (fake security-sensitive tools) that act as honeypots.
AiSOC★ 2.8k
Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
agent-security-scanner-mcp★ 124
Security scanner MCP server for AI coding agents. Prompt injection firewall, package hallucination detection (4.3M+ packages), 1000+ vulnerability rules with AST & taint analysis, auto-fix.
cursor-security-rules★ 383
This repository contains Cursor Security Rules designed to improve the security of both development workflows and AI agent usage within the Cursor environment. These rules aim to enforce safe coding practices, control sensitive operations, and reduce risk in AI-assisted development.
Comments
Log in to leave a comment
No comments yet. Be the first!