Agent Framework Security Guides
LLMAgentSecurity Developer & Framework Integration Guides
Sandbox tool calls, enforce eBPF network egress quarantine, and prevent autonomous goal hijacking across your agent fleet in less than 2 minutes. Native support for LangGraph, CrewAI, AutoGen, and Model Context Protocol (MCP).
StateGraph Middleware
LangGraph
Intercept tool execution nodes in state graphs with in-flight approval gates.
CrewAI Tool Wrapper
CrewAI Swarms
Wrap multi-agent role tools with eBPF container egress and HITL limits.
Swarm Boundary
AutoGen
Prevent agent-to-agent goal hijacking and unauthorized code executor escalation.
MCP Proxy Server
Anthropic MCP
Sandbox local filesystem, database, and terminal MCP server invocations.
Drop-In Integration
Framework SDK Code Samples
agent_security_langgraph.py
# Install LLMAgentSecurity Python SDK:
# pip install llm-agent-security langgraph
import os
from langgraph.prebuilt import create_react_agent
from llm_agent_security import AgentSecurityMiddleware
# 2-Line LangGraph Tool Sandboxing:
agent = create_react_agent(
model="gpt-4o",
tools=[sql_query_executor, bash_terminal_runner, send_webhook],
middleware=[
AgentSecurityMiddleware(
api_key=os.environ["LLM_AGENT_SECURITY_KEY"],
gateway_url="https://gateway.llmagentsecurity.com/v1",
policy="strict-zero-trust",
quarantine_destructive_ddl=True, # Blocks DROP TABLE / DELETE
ebpf_egress_filter=True, # Blocks unwhitelisted C2 egress
hitl_approval_webhook="https://hooks.slack.com/services/..."
)
]
)
# Tool execution is intercepted and sandboxed in-flight (<14ms)
response = agent.invoke({"messages": [{"role": "user", "content": "Query production database..."}]})
print(response)Agent Policy Headers Reference
Fine-tune agent tool gating, eBPF quarantine limits, and Human-in-the-Loop thresholds via standard HTTP headers or SDK middleware.
| Header Name | Accepted Values | Default | Description |
|---|---|---|---|
| X-LAS-Tool-Policy | strict-quarantine | monitor-only | permissive | strict-quarantine | Controls whether destructive tool calls (DROP TABLE, rm -rf) are terminated with 403 or paused for HITL approval. |
| X-LAS-HITL-Threshold-USD | Integer (e.g. 500, 1000, 5000) | 1000 | Mandatory Human-In-The-Loop gate threshold for financial wire transfers or token payouts executed by agents. |
| X-LAS-Egress-Whitelist | Comma-separated domains (e.g. *.corp.internal, api.stripe.com) | internal-only | eBPF kernel egress firewall rule enforcing strict destination host whitelisting for agent webhooks and bash commands. |