Production Python LangGraph Multi-Agent Architecture with
@shield.protectZero-Leak Sandboxing, Callback Interceptors, and Prompt Redaction.
Documentation • PyPI Package • Security Advisories • Trust Center
When autonomous AI agents built with LangGraph, CrewAI, AutoGen, or LlamaIndex execute tools and retrieve database records, they frequently encounter volatile credentials (database connection strings, bearer tokens, AWS keys, /proc/self/environ reads).
This template provides an enterprise-ready LangGraph multi-agent graph with AgentShield Defense built directly into tool calls and state transitions:
flowchart LR
A["User Input / Prompt"] --> B["Security Router Node"]
B --> C["AgentShield Redactor"]
C --> D["LangGraph StateGraph"]
D --> E["Protected Tool Execution (@shield.protect)"]
E --> F["Zero-Leak Sanitized Response"]
Click the green Use this template button above to create your own repository.
git clone https://github.com/YOUR_ORG/YOUR_REPO.git
cd YOUR_REPO
# Install dependencies (includes agentshield-defense)
pip install -r requirements.txtpython -m src.agentpytest tests/ -v@shield.protectDecorator: Wraps custom tools and function invocations. Automatically redacts 40+ credential types from tool return values.AgentShieldCallbackHandler: Attaches to LangChain / LangGraph execution loops to intercept LLM prompts and model outputs.- Subprocess & Sycall Traps:
Prevents hostile prompt injection payloads from dumping
/proc/self/environ,~/.ssh/id_rsa, or environment configurations.
- Licensed under Apache-2.0.
- Coordinated Vulnerability Disclosure: security@ritualdev.in (SLA < 24h).
- Maintained by RitualDev Studio.
If you find this project valuable, consider supporting our open-source development: