[PR #3846] docs: Add OWASP Agent Memory Guard middleware integration #3859

Open
opened 2026-06-05 18:53:23 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/3846
Author: @vgudur-dev
Created: 5/2/2026
Status: 🔄 Open

Base: mainHead: add-owasp-agent-memory-guard-middleware


📝 Commits (7)

  • f37904d docs: add OWASP Agent Memory Guard middleware integration
  • 4c3e244 Merge branch 'main' into add-owasp-agent-memory-guard-middleware
  • f593761 Merge branch 'main' into add-owasp-agent-memory-guard-middleware
  • 439bc77 Merge branch 'main' into add-owasp-agent-memory-guard-middleware
  • 94a3473 Merge branch 'main' into add-owasp-agent-memory-guard-middleware
  • cca6361 Merge branch 'main' into add-owasp-agent-memory-guard-middleware
  • 3526b61 Revise OWASP Agent Memory Guard documentation

📊 Changes

2 files changed (+79 additions, -0 deletions)

View changed files

📝 src/oss/python/integrations/middleware/index.mdx (+1 -0)
src/oss/python/integrations/middleware/owasp_agent_memory_guard.mdx (+78 -0)

📄 Description

Summary

This PR adds documentation for the OWASP Agent Memory Guard middleware integration, which provides runtime defense against AI agent memory poisoning attacks (OWASP ASI06).

Changes

  1. New page: src/oss/python/integrations/middleware/owasp_agent_memory_guard.mdx — Full middleware documentation following the template format
  2. Updated index: Added entry to the community integrations table in src/oss/python/integrations/middleware/index.mdx

About the middleware

The MemoryGuardMiddleware hooks into three points in the LangChain agent loop:

Hook What it scans Threat mitigated
before_model Messages in agent state Injection in memory/context
after_model Model response content Secret leakage, injection propagation
wrap_tool_call Tool output content Injection via tool results (primary attack vector)

Key features:

  • Zero external dependencies (runs locally, no API keys needed)
  • Three violation modes: block, warn, strip
  • Configurable security policies
  • Async support

Package: langchain-agent-memory-guard
Source: OWASP/www-project-agent-memory-guard
Tests: 23 passing

Checklist

  • Follows the middleware docs template format
  • Added to community integrations table
  • All code examples are tested and working
  • No API key required (local-only execution)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/3846 **Author:** [@vgudur-dev](https://github.com/vgudur-dev) **Created:** 5/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `add-owasp-agent-memory-guard-middleware` --- ### 📝 Commits (7) - [`f37904d`](https://github.com/langchain-ai/docs/commit/f37904d6133bdc0319486a3f31cb9e3cb1171d9d) docs: add OWASP Agent Memory Guard middleware integration - [`4c3e244`](https://github.com/langchain-ai/docs/commit/4c3e244dfa84852864bb79a1c0cbf0d5a0e67909) Merge branch 'main' into add-owasp-agent-memory-guard-middleware - [`f593761`](https://github.com/langchain-ai/docs/commit/f5937610e575b0db25cd172ee401894396f0b10d) Merge branch 'main' into add-owasp-agent-memory-guard-middleware - [`439bc77`](https://github.com/langchain-ai/docs/commit/439bc773565e8f0bc2d762d08736ddae51697aeb) Merge branch 'main' into add-owasp-agent-memory-guard-middleware - [`94a3473`](https://github.com/langchain-ai/docs/commit/94a34735cc68d06b4bb98a020c946599b16704fa) Merge branch 'main' into add-owasp-agent-memory-guard-middleware - [`cca6361`](https://github.com/langchain-ai/docs/commit/cca63617255d5a6a49b70ba5cd0fdc9388c289ff) Merge branch 'main' into add-owasp-agent-memory-guard-middleware - [`3526b61`](https://github.com/langchain-ai/docs/commit/3526b61ab58f7f1f7d78236edf4a70c676010dbb) Revise OWASP Agent Memory Guard documentation ### 📊 Changes **2 files changed** (+79 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/python/integrations/middleware/index.mdx` (+1 -0) ➕ `src/oss/python/integrations/middleware/owasp_agent_memory_guard.mdx` (+78 -0) </details> ### 📄 Description ## Summary This PR adds documentation for the **OWASP Agent Memory Guard** middleware integration, which provides runtime defense against AI agent memory poisoning attacks ([OWASP ASI06](https://owasp.org/www-project-agentic-security-initiative/)). ## Changes 1. **New page**: `src/oss/python/integrations/middleware/owasp_agent_memory_guard.mdx` — Full middleware documentation following the template format 2. **Updated index**: Added entry to the community integrations table in `src/oss/python/integrations/middleware/index.mdx` ## About the middleware The `MemoryGuardMiddleware` hooks into three points in the LangChain agent loop: | Hook | What it scans | Threat mitigated | |------|--------------|-----------------| | `before_model` | Messages in agent state | Injection in memory/context | | `after_model` | Model response content | Secret leakage, injection propagation | | `wrap_tool_call` | Tool output content | Injection via tool results (primary attack vector) | **Key features:** - Zero external dependencies (runs locally, no API keys needed) - Three violation modes: block, warn, strip - Configurable security policies - Async support **Package**: [`langchain-agent-memory-guard`](https://pypi.org/project/langchain-agent-memory-guard/) **Source**: [OWASP/www-project-agent-memory-guard](https://github.com/OWASP/www-project-agent-memory-guard/tree/main/integrations/langchain-agent-memory-guard) **Tests**: 23 passing ## Checklist - [x] Follows the middleware docs template format - [x] Added to community integrations table - [x] All code examples are tested and working - [x] No API key required (local-only execution) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 18:53:23 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#3859