Skip to Content
AgentShield

Why AgentShield

Why tool-calling agents need an enforcement point outside the model, and the design choices AgentShield makes to provide one.

An autonomous agent turns model output into actions: HTTP requests, refunds, emails, database changes. The model deciding which action to take is also the component most exposed to manipulation. Anything it reads, including a web page, a ticket, an API response, or a retrieved memory, can contain text written to steer it.

AgentShield starts from a simple position: the component that can be manipulated must not be the component that authorizes.

The problem with in-process guardrails

Most agent frameworks run tools inside the same process as the model loop. Safety is added as prompts, output filters, or wrapper functions in that process. Those measures help, but they share the agent's failure modes:

  • A compromised prompt is a compromised guard. If the guard is a model instruction, indirect prompt injection can override it.
  • The tool function is right there. Any code path that reaches the function, including a framework bug or a misconfigured callback, bypasses the check.
  • Credentials live with the agent. API keys in the agent's environment can be exfiltrated by the same injection that misuses the tool.
  • There is no independent record. Logs written by the agent describe what the agent says it did.

What changes with a gateway

AgentShield puts a separate process, the runtime gateway, between the agent and every tool.

ConcernInside the agentWith AgentShield
Who decidesModel, prompts, wrapper codeA deterministic policy evaluated by the gateway
What a decision is based onWhatever the agent claimsThe authenticated agent and the policies stored for it
Who holds tool credentialsThe agent processThe gateway, injected per host from its own environment
How often a side effect runsHowever often the code calls itAt most once per authorized decision
Who can approveAnyone who edits the promptA human owner, admin, or approver, never the agent
EvidenceAgent logsAppend-only events in a per-organization hash chain

Design principles

These principles are visible throughout the codebase and the rest of this documentation.

What AgentShield is not

AgentShield is an enforcement and evidence layer. It is deliberately honest about its scope:

  • It does not make a model immune to prompt injection. It limits what an injected model can do and records what it tried.
  • It does not decide whether content is safe. Detection rules produce advice that operators review.
  • It does not replace the security of the tools behind it. The http.request adapter limits where calls go; the target API still enforces its own authorization.

The threat model lists the assumptions in detail.

Who it is for

  • Platform teams running agents for many internal users who need one place to define what agents may do.
  • Security teams who need a deterministic control and an audit trail for agent actions.
  • Agent developers who want sensitive actions to pause for a human without building an approval system.

Was this page helpful?

On this page