Open source · Apache 2.0 · Go, TypeScript, Python

Secure your agents.
Control their actions.

AgentShield is an open-source security and authorization gateway for autonomous AI agents. Enforce policies, control tool execution, manage approvals, and establish trust boundaries across your agent infrastructure.

Architecture

A gateway outside the agent decides what runs.

Agents never execute tools directly. Every call is signed, authenticated, checked against budgets and policy, and recorded before a registered adapter runs it. Committed events then flow asynchronously to streaming and evidence storage.

AgentShield system architectureAgents call the gateway through an SDK. The gateway verifies the signature, evaluates policy, and runs registered adapters against external tools. Operators use the dashboard, which calls the control plane. Committed events reach NATS JetStream and MinIO through the event relay.Untrusted: agent runtimeAgentShield trust boundaryExternalAgent processLLM + frameworkIntegrationLangGraph · LangChainSDK clientPython · TypeScriptEd25519 seed stays hereOperatorbrowserRuntime gateway (Go)identity · verifynonce · budgetspolicy · evaluateadapters · executesigns every requestIntelligence engineadvisory content analysisRedisnonces · limitsPostgreSQLsource of truthControl plane (NestJS)agents · policies · approvalsDashboard (Next.js)operations consoleEvent relay (Go)outbox → streamoutboxNATSJetStreamMinIOevidenceverified evidence readsHTTP APIsallow-listed hostsSubscribersyour consumershttp.request adaptersynchronous request pathasynchronous, after commit
Every component shown runs in the repository today. The agent runtime is outside the trust boundary.

Core capabilities

Security controls that hold when the model does not.

Developer experience

Route every tool call through one client.

The Python and TypeScript SDKs sign the exact bytes they send. Framework integrations for LangGraph, LangChain, CrewAI, and MCP forward through those clients and refuse local tool functions, so there is no path around the gateway.

  • Errors are never an allow. A database, Redis, or policy failure denies or returns an error. No path defaults to permit.
  • The agent is untrusted. Organization ids, permissions, and approval claims in a request body are claims, not authority.
  • Advice is not authority. Content analysis can raise an alert. It cannot allow, deny, or hold a call.
  • Side effects happen at most once. Executions are claimed before dispatch. An interrupted run is refused on retry, never repeated.
Browse integrations
from pathlib import Path

from agentshield_sdk import ApprovalRequired, Client, Denied

client = Client(
    gateway="http://127.0.0.1:8081",
    agent_id=AGENT_ID,
    organization_id=ORGANIZATION_ID,
    seed=Path("agent.seed").read_bytes(),  # 32-byte Ed25519 seed. Never sent.
)

try:
    executed = client.call_tool(
        tool_name="sample.echo",
        operation="sample.echo",
        resource="demo",
        arguments={},
    )
    print(executed.adapter, executed.result)
except Denied as exc:
    print("denied:", exc.decision.explanation["reason"])
except ApprovalRequired as exc:
    print("waiting for a person:", exc.decision.approval_id)

Run the full stack locally.

One Compose command starts the gateway, control plane, dashboard, intelligence engine, event relay, and their data services on loopback ports.