Introduction
AgentShield is a security and authorization gateway that sits between autonomous AI agents and the tools they call.
AgentShield moves the decision about whether an agent's tool call may run out of the agent and into a gateway the agent cannot influence. Every call is signed by the agent's own key, authenticated, checked against budgets and a deterministic policy, recorded in a tamper-evident audit chain, and only then executed by an adapter that the gateway controls.
The agent can be wrong, compromised, or steered by content it read. AgentShield is designed so that none of those failures turns into an unauthorized action.
What AgentShield does
Authenticates every request
Ed25519 signatures over the raw request body, a 60-second clock window, and single-use nonces.
Decides deterministically
allow, deny, or require_approval from organization and agent policies. Unmatched actions are denied.
Controls execution
Tools run only in registered gateway adapters, at most once per decision, with arguments bound by hash.
Puts people in the loop
Sensitive actions wait for an approver. The approval binds to the exact request and is consumed once.
Limits blast radius
Per-agent request, tool-call, and token budgets, adapter deadlines, and circuit breakers.
Leaves evidence
A per-organization hash chain, redacted events, verified evidence bundles, and a live event stream.
How a call flows
An agent built with LangGraph, LangChain, CrewAI, MCP, or plain Python or TypeScript calls a tool through an AgentShield client. The client signs the request and sends it to the gateway in two steps:
- Authorize.
POST /api/v1/runtime/authorizeauthenticates the agent, applies budgets, evaluates policy, and records the decision in one database transaction. - Execute.
POST /api/v1/runtime/executeruns an allowed (or human-approved) decision through the registered adapter, once, and returns the result along with optional content analysis.
from agentshield_sdk import Client
client = Client(gateway="http://127.0.0.1:8081", agent_id=AGENT_ID, organization_id=ORG_ID, seed=SEED)
# authorize, then execute only when the outcome is allow
executed = client.call_tool(
tool_name="sample.echo",
operation="sample.echo",
resource="demo",
arguments={},
)Operators manage agents, policies, approvals, alerts, and members through the control plane and the dashboard. Committed security events stream to NATS JetStream through a transactional outbox.
Components
| Component | Language | Role |
|---|---|---|
| Runtime gateway | Go | Authenticates agents, enforces budgets, evaluates policy, executes adapters, appends the audit chain |
| Policy engine | Go library | Pure, in-process evaluation of allow, deny, and require_approval |
| Identity library | Go library | The v1 signing input and Ed25519 verification |
| Control plane | NestJS | Sessions, members, agents, credentials, policies, approvals, alerts, evidence, audit reads |
| Dashboard | Next.js | Role-aware operations console |
| Intelligence engine | Python | Advisory detection of prompt injection and secret leaks |
| Event relay | Go | Outbox to JetStream, evidence bundles to MinIO, reliability metrics |
| SDKs and integrations | Python, TypeScript | Signed clients and gateway-only framework tools |
Where to start
Quickstart
Start the full stack with Docker Compose and send your first signed tool call.
Core concepts
The vocabulary used across AgentShield: agents, decisions, approvals, adapters, events.
Security model
What AgentShield enforces, what it assumes, and what is outside its scope.
API reference
Every gateway and control plane endpoint, rendered from the OpenAPI contracts.
Versioning
This documentation describes AgentShield 0.1.0, the version reported by every service's health endpoint. The OpenAPI contracts in docs/api/ are versioned under /api/v1.
Was this page helpful?