[08] Security · required/ What stops it

Security for AI agents

Two halves, and you want both. Guardrails decide what the agent may say and do — injection defence, PII redaction, identity. Containment decides what holds when the guardrails do not: a kernel boundary around code it wrote, a default-deny boundary around everything it can reach. Egress control does not stop prompt injection; it removes the payout.

17 options tracked · 13 open source · 13 self-hostable · required in every stack · pick several

· All 17 options/ Compare
OptionJobWhat it doesLicenceSelf-host
Llama GuardContent filteringOpen-weight classifier for input and output safety. Runs wherever you run it.Open sourceYes
Guardrails AIContent filteringDeclarative input/output validators with a hub of prebuilt checks.Open sourceYes
NeMo GuardrailsPolicy & topic controlNVIDIA's programmable rails — constrain topic, dialogue path and tool use.Open sourceYes
Lakera GuardPrompt-injection defencePrompt-injection and jailbreak detection as a low-latency API call.ProprietaryNo
RebuffPrompt-injection defenceOpen-source prompt-injection detector with canary tokens.Open sourceYes
InvariantPolicy & topic controlPolicy engine and analyzer for agent traces and MCP tool calls.Open sourceYes
Descope Agentic IdentityAgent identity & delegated authIdentity, delegated consent and scoped tokens for agents acting on behalf of users.ProprietaryNo
Auth0 for AI AgentsAgent identity & delegated authToken vault, async user approval and fine-grained authorization for tool calls.ProprietaryNo
OsoAuthorizationAuthorization-as-a-service — decide what this agent may touch, per record.Open sourceYes
Microsoft PresidioPII detection & redactionPII detection and redaction before text ever reaches a model provider.Open sourceYes
Cloudflare AI GatewayGateway & spend controlRate limiting, caching, spend caps and logging in front of any provider.ProprietaryNo
iron-proxyEgress controlDefault-deny egress firewall for untrusted workloads. The sandbox holds worthless proxy tokens; real credentials are swapped in at the boundary.Open sourceYes
gVisorSandboxingGoogle's user-space kernel. Intercepts syscalls before they reach the host, without paying for a full VM.Open sourceYes
FirecrackerSandboxingAWS microVMs — a separate Linux kernel per sandbox, booting in about 125ms.Open sourceYes
Kata ContainersSandboxingMicroVM isolation behind the ordinary container API — drops into Kubernetes as a RuntimeClass.Open sourceYes
No isolation (host process)SandboxingThe agent runs as an ordinary process on the host. Honest default only when it executes no code and reads nothing untrusted.Open sourceYes
E2BSandboxingFirecracker sandboxes for running code the agent wrote, safely.Open sourceYes
· Published benchmark scores/ Every number sourced

Only figures with a published source appear here. A blank cell means nobody has published one for that pairing — which, for most of this category, is the honest answer.

BenchmarkLlama Guard
Agent Data Injection — attack success rateShare of injection attacks that still succeed with the guardrail in place. Lower is better.lower is better50%peer-reviewedLlama Prompt Guard 2
Agent Data Injection — detection rateShare of instruction-injection attempts the guardrail flags.34.9%peer-reviewedLlama Prompt Guard 2 — 326 of 935
Recall @ 1% FPR (English)Injections caught while holding false positives to 1% — the metric that decides whether a filter is usable in production.97.5%self-reportedPromptGuard 2 86M
Sources
· Head to head/ 10 comparisons
· Common questions/ FAQ

What is the security layer of an AI agent?

Two halves, and you want both. Guardrails decide what the agent may say and do — injection defence, PII redaction, identity. Containment decides what holds when the guardrails do not: a kernel boundary around code it wrote, a default-deny boundary around everything it can reach. Egress control does not stop prompt injection; it removes the payout. Every stack needs one — it is not optional.

How many security options are there?

This registry tracks 17. 13 are open source and 13 can run on your own infrastructure.

Which security option should I choose?

It depends on constraints rather than preference: whether you must self-host, whether the budget allows a hosted service, and which language your team writes. Describe what you are building and the advisor fills this layer along with the other 9.

· The other 9 layers/ Keep going
· For agents/ This page, machine-readable

Every page here answers to Accept: text/markdown and returns the same content at roughly a tenth the tokens. No separate site, no toggle — same URL.

curl -s -H "Accept: text/markdown" https://newagent.build/layers/security