How-to: Protect LangChain agents with langchain-agent-memory-guard (5 minutes) #116
vgudur-dev
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Why
Persistent agent memory / tool outputs are an ASI06 attack surface. OWASP Agent Memory Guard ships a LangChain middleware package so you can wrap an agent without rewriting your memory store.
agent-memory-guardlangchain-agent-memory-guard(PyPI0.1.0)Install
pip install langchain-agent-memory-guard # pulls agent-memory-guard>=0.2.2 and langchain>=0.3.0Quick start (middleware)
Violation modes
Optional: Policy.strict()
(Custom
Policy/ protected keys: see the integration README.)What gets scanned
before_modelafter_modelwrap_tool_callAlternate path: GuardedChatMessageHistory
If you only need guarded chat history (not full middleware):
Try the clinic, then leave an Adopter note
Adopter: <name> — LangChainwith stack versions + what was blocked/allowed.Non-claims
Not an OWASP certification. Not MITRE approval. Public Apache-2.0 project only.
All reactions