Quick start
pip install "inter-agent-guard[all,otel]"
python scripts/download_release_model.py # ~164 MB INT8 ONNX from GitHub Releases
agentguard status
from agentguard import AgentGuard, CapabilityManifest
guard = AgentGuard(
risk_threshold=0.85,
task_objective="Analyse Q3 competitor pricing",
audit_log_path="./audit.jsonl",
require_ml_model=True, # after download_release_model.py
)
guard.register_agent(
"research-agent",
CapabilityManifest.from_yaml("manifests/research_agent.yaml"),
)
secured = guard.wrap(my_langgraph_graph)
Without the ONNX model, rule filtering, trust attestation, and capability
enforcement still run. Set require_ml_model=True only after the model is installed.
Inter-agent messages (trust attestation)
Trust attestation is on by default. Inter-agent payloads must be signed
with a recipient-bound envelope before inspect_message will forward them:
payload = b"Research summary ready for internal report."
text = payload.decode()
sig = guard.sign_payload("researcher", payload, recipient_id="writer")
decision = guard.inspect_message(
"researcher",
"writer",
text,
payload,
signature=sig,
)
sign_payload requires recipient_id matching the recipient passed to
inspect_message. Unsigned messages are BLOCKed; legacy raw 64-byte
signatures are rejected.
For unsigned boundaries (user input, framework hooks), use
inspect_content(sender_id, recipient_id, message) instead — it runs the
rule filter, ML scorer, and consistency check without trust verification.
LangChain agents
For LangChain 1.0 create_agent, use the official middleware integration:
from langchain.agents import create_agent
from agentguard import AgentGuard
from agentguard.adapters.langchain import AgentGuardMiddleware
guard = AgentGuard(task_objective="Analyse Q3 competitor pricing")
agent = create_agent(
model="gpt-5.5",
tools=[...],
middleware=[AgentGuardMiddleware(guard, agent_id="researcher")],
)
User input is scanned before the first model call, every tool output is
inspected for indirect injection before the model sees it, and capability
manifests registered under agent_id are enforced before tools execute.
Requires pip install "inter-agent-guard[langchain]".
Links
Docs: https://inter-agent-guard.readthedocs.io/
GitHub: https://github.com/nizba06/agentguard
PyPI: https://pypi.org/project/inter-agent-guard/
Demo: https://github.com/nizba06/inter-agent-guard-demo
Dataset: https://huggingface.co/datasets/Nizba/agentguard-benchmark-v1