Skip to Content
AgentShield

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.

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.

What AgentShield does

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:

  1. Authorize. POST /api/v1/runtime/authorize authenticates the agent, applies budgets, evaluates policy, and records the decision in one database transaction.
  2. Execute. POST /api/v1/runtime/execute runs 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

ComponentLanguageRole
Runtime gatewayGoAuthenticates agents, enforces budgets, evaluates policy, executes adapters, appends the audit chain
Policy engineGo libraryPure, in-process evaluation of allow, deny, and require_approval
Identity libraryGo libraryThe v1 signing input and Ed25519 verification
Control planeNestJSSessions, members, agents, credentials, policies, approvals, alerts, evidence, audit reads
DashboardNext.jsRole-aware operations console
Intelligence enginePythonAdvisory detection of prompt injection and secret leaks
Event relayGoOutbox to JetStream, evidence bundles to MinIO, reliability metrics
SDKs and integrationsPython, TypeScriptSigned clients and gateway-only framework tools

Where to start

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?

On this page