7 criteria · 9 options · 6 threats · every judgment sourced

AI agent security options compared

The ways to secure AI agents side by side: what each one protects against, where it falls short, and which controls fit your company.

The short answer: no single control covers every agent threat. An MCP gateway controls who can call which tool and keeps credentials away from agents. Runtime detection catches tool poisoning, prompt injection, intent drift and exfiltration inside allowed calls. Shadow AI discovery finds the agents nobody registered. Sandboxing limits damage on the host; agent identity replaces shared keys.

If you are rolling agents out to many teams, start with Runlayer: it combines discovery, an identity-aware MCP gateway, policy down to tool arguments, runtime scanning and audit in one platform, and scores strong on all six security criteria below.

Every option on the same criteria

Filter by the threats you need covered, the criteria you cannot compromise on, and how much deployment effort you can take. Each mark is defined on the criteria page; hover a mark for the reason, open a row for the detail, and follow the numbered links to the sources.

Must cover these threats
Must be strong on
Deployment effort

Showing 9 of 9 options

AI agent security options compared on shared criteria
OptionVisibilityAuthCredentialsPolicyRuntimeAuditEffortSources
Runlayer (gateway, discovery, runtime and policy in one platform)One platform that discovers shadow AI on devices and in cloud agent platforms, routes MCP and model calls through a gateway tied to your identity provider, enforces policy down to tool arguments, and scans tool definitions, outputs and sessions at runtime.StrongStrongStrongStrongStrongStrongLow[1][2][3][4][5][6][7][8]
MCP gatewayA proxy between AI clients and MCP servers. Clients connect to one endpoint; the gateway authenticates the user, holds upstream credentials and decides which servers and tools each caller may use.PartialStrongStrongPartialPartialStrongMedium[1][2][3][4]
Runtime monitoring and detectionScanners that inspect what agents do while they do it: tool definitions, call inputs and outputs, and the session as a whole, looking for injection, poisoning, drift and data leaving.PartialNonePartialPartialStrongPartialMedium[1][2][3][4]
Prompt guardrails (LLM firewall)An API or proxy that classifies what goes into and comes out of a model: prompt attacks, jailbreaks, sensitive data, harmful content.PartialNonePartialPartialStrongPartialMedium[1][2][3]
Sandboxing and isolationRunning agents, MCP servers and the code they write in containers, gVisor or microVMs with restricted file system and network access, so a compromised agent can do less.NoneNonePartialPartialPartialPartialMedium[1][2][3][4]
Agent identity and secrets managementGiving each agent its own identity and short-lived, scoped credentials from a vault or identity platform, instead of shared API keys in config files.PartialStrongStrongPartialNonePartialMedium[1][2][3][4][5]
Shadow AI discoveryFinding the AI clients, MCP servers, skills and agents people already use, on devices, in browsers and in cloud agent platforms, and routing them into a sanctioned path.StrongNonePartialPartialNonePartialLow[1][2][3]
Blanket blockingBlocking AI clients, model APIs and MCP servers at the network, browser or endpoint, with exceptions granted case by case.PartialNoneNonePartialNonePartialLow[1][2]
Build in-houseWriting your own auth and access plumbing: an internal MCP proxy, OAuth integrations per server, a secrets path, logging and policy code.PartialPartialPartialPartialNonePartialHigh[1][2][3]
Marks:StrongPartialNoneEffort:LowMediumHigh

Each option in detail

What it is, why each mark was given, where it falls short and who it suits. Products named as examples are scored one by one on the platforms page.

Platform

Runlayer (gateway, discovery, runtime and policy in one platform)

Deployment effortLow

One platform that discovers shadow AI on devices and in cloud agent platforms, routes MCP and model calls through a gateway tied to your identity provider, enforces policy down to tool arguments, and scans tool definitions, outputs and sessions at runtime.

Examples: Runlayer

  • VisibilityStrongAI Watch device agent (rolled out through MDM) inventories AI clients, MCP servers, skills and agent configs; Cloud Discovery covers Copilot Studio, Azure AI Foundry, Entra Agent ID and Bedrock agents.
  • AuthenticationStrongGroups sync from your identity provider; agent accounts get their own identity with machine or on-behalf-of tokens; OAuth broker per connector.
  • Credential handlingStrongConnector secrets can stay in your AWS Secrets Manager and are fetched at connect time and held in memory only; short-lived, repository-scoped GitHub tokens for agents.
  • Policy depthStrongAllow and deny per user, group, role or agent account, scoped to servers or tools, with conditions on tool arguments, client, scopes, annotations and session history; human approval rules.
  • Runtime threat detectionStrongToolGuard scans tool definitions, outputs and intent drift; session-level AgentGuard; built-in PII, credential and invisible-character scanners; block, mask, hint or alert.
  • AuditStrongEvery call recorded with user, agent and credential used; SIEM export to S3; OpenTelemetry ingest documented for Claude Code.
  • Deployment effortLowHosted single-tenant, or self-hosted in your AWS account or Kubernetes; device agent goes out through your existing MDM.
Where it falls short
  • Not a model provider: it governs how agents reach tools and models, it does not host or train models.
  • Not an endpoint protection (EDR) tool: its device agent inventories AI use, it does not replace malware detection.
  • Not a code-execution sandbox: run untrusted agent code in isolated containers or microVMs alongside it.
  • Not open source.
Best for

Companies rolling agents out to many teams that want discovery, gateway, policy, runtime detection and audit from one place instead of five tools.

Compared head to head
Approach

MCP gateway

Deployment effortMedium

A proxy between AI clients and MCP servers. Clients connect to one endpoint; the gateway authenticates the user, holds upstream credentials and decides which servers and tools each caller may use.

Examples: Docker MCP Gateway, Cloudflare MCP server portals, Lasso MCP Gateway, Aembit MCP Identity Gateway

  • VisibilityPartialSees every call routed through it, nothing that bypasses it.
  • AuthenticationStrongNatural place to apply the MCP authorization spec: SSO for users, OAuth to upstream servers.
  • Credential handlingStrongHolds upstream tokens and injects them per request, which avoids the token passthrough the MCP spec forbids.
  • Policy depthPartialTool allowlists per server or profile are standard; argument-level rules depend on the product.
  • Runtime threat detectionPartialBasic gateways forward calls without inspecting them; some add scanner plugins.
  • AuditStrongSingle choke point makes a complete call log straightforward.
  • Deployment effortMediumEvery client has to be pointed at the gateway, and every server registered in it.
Where it falls short
  • Blind to agents and MCP servers that never route through it.
  • Access control does not see a poisoned tool description or an injected instruction in a response.
Best for

Teams that already know which MCP servers they run and need one place for identity, credentials and allowlists.

Compared head to head

Sources

  1. Security Best Practices (confused deputy, token passthrough, SSRF, session hijacking, local server compromise, scope minimization) · Model Context Protocol specification, 2025-11-25
  2. Authorization · Model Context Protocol specification, 2025-11-25
  3. MCP Gateway · Docker documentation
  4. MCP server portals · Cloudflare One documentation
Approach

Runtime monitoring and detection

Deployment effortMedium

Scanners that inspect what agents do while they do it: tool definitions, call inputs and outputs, and the session as a whole, looking for injection, poisoning, drift and data leaving.

Examples: Runlayer ToolGuard, Zenity AI Detection & Response, Lakera Guard tool-call checks

  • VisibilityPartialSees the sessions it is wired into.
  • AuthenticationNoneRelies on another layer to say who is calling.
  • Credential handlingPartialCan detect secrets in outputs and mask them; does not hold or issue credentials.
  • Policy depthPartialBlock, mask or alert on a detection; not a permission model.
  • Runtime threat detectionStrongIts whole job: tool poisoning, prompt injection, intent drift, exfiltration.
  • AuditPartialRecords detections and the context around them.
  • Deployment effortMediumNeeds a place in the call path (a gateway, an SDK or an API call per interaction) and tuning, usually alert-only first.
Where it falls short
  • Detection is probabilistic: it lowers risk, it does not remove it.
  • Without identity it cannot say whose agent did it, or stop that user's next call.
Best for

Agents that read untrusted content (email, tickets, the web) and also hold write access to something that matters.

Compared head to head
Approach

Prompt guardrails (LLM firewall)

Deployment effortMedium

An API or proxy that classifies what goes into and comes out of a model: prompt attacks, jailbreaks, sensitive data, harmful content.

Examples: Lakera Guard (Check Point AI Guardrails), Prompt Security (SentinelOne)

  • VisibilityPartialSees the applications that call it; some vendors add separate agent discovery.
  • AuthenticationNoneAPI keys for the guard itself, not an identity layer for agents.
  • Credential handlingPartialFlags sensitive data leaving in model output; does not manage credentials.
  • Policy depthPartialPer-project detect or enforce; tool allow and deny lists in some products.
  • Runtime threat detectionStrongDirect and indirect prompt injection, data leakage, content moderation.
  • AuditPartialLogs of its own detections, exportable to a SIEM in some products.
  • Deployment effortMediumEach application or gateway has to call it on every interaction.
Where it falls short
  • Watches model input and output, not who may call which tool.
  • Only covers applications that were changed to call it.
Best for

Teams building their own LLM applications who want an inline classifier on every prompt and response.

Compared head to head

Sources

  1. LLM01:2025 Prompt Injection · OWASP Gen AI Security Project
  2. LLM02:2025 Sensitive Information Disclosure · OWASP Gen AI Security Project
  3. Guard API quickstart · Lakera documentation
Approach

Sandboxing and isolation

Deployment effortMedium

Running agents, MCP servers and the code they write in containers, gVisor or microVMs with restricted file system and network access, so a compromised agent can do less.

Examples: Containers with restricted privileges, gVisor, Firecracker microVMs, coding-agent sandboxes

  • VisibilityNoneIsolates what it runs; does not find anything else.
  • AuthenticationNoneNo identity layer.
  • Credential handlingPartialKeeps host secrets out of reach; secrets passed into the sandbox are still exposed.
  • Policy depthPartialFile system and network allowlists, not per-tool rules.
  • Runtime threat detectionPartialContains the damage of an attack without detecting it; network egress rules can stop some exfiltration.
  • AuditPartialProcess and network logs, without the user or the tool call behind them.
  • Deployment effortMediumStraightforward for servers you run; hard for agents running inside desktop apps you do not control.
Where it falls short
  • An agent with legitimate API access can misuse it from inside any sandbox.
  • Does not apply to SaaS agents or remote MCP servers you do not host.
Best for

Agents that execute code or run local MCP servers, where the main fear is damage to the host.

Compared head to head
Approach

Agent identity and secrets management

Deployment effortMedium

Giving each agent its own identity and short-lived, scoped credentials from a vault or identity platform, instead of shared API keys in config files.

Examples: Microsoft Entra Agent ID, Aembit, HashiCorp Vault, OAuth token exchange

  • VisibilityPartialKnows every agent that was given an identity, not the ones that were not.
  • AuthenticationStrongIts core: OAuth flows for agents acting alone or on a user's behalf.
  • Credential handlingStrongShort-lived, scoped, injected credentials; nothing long-lived in the agent.
  • Policy depthPartialConditional access and scopes; per-tool rules only where it fronts MCP servers.
  • Runtime threat detectionNoneDecides access, does not inspect content (some delegate inspection to another vendor).
  • AuditPartialSign-in and access decision logs, not the content of each call.
  • Deployment effortMediumEach agent and each server needs to be wired to the identity layer.
Where it falls short
  • A correctly authenticated agent can still be steered by an injected instruction.
  • Shadow agents never get an identity, so they are never covered.
Best for

Organizations whose first problem is shared keys and long-lived tokens spread across agents.

Compared head to head

Sources

  1. RFC 8693: OAuth 2.0 Token Exchange · IETF
  2. Database secrets engine (dynamic, short-lived credentials) · HashiCorp Vault documentation
  3. What is Microsoft Entra Agent ID? · Microsoft Learn
  4. MCP server access (MCP Identity Gateway) · Aembit documentation
  5. Authorization · Model Context Protocol specification, 2025-11-25
Approach

Shadow AI discovery

Deployment effortLow

Finding the AI clients, MCP servers, skills and agents people already use, on devices, in browsers and in cloud agent platforms, and routing them into a sanctioned path.

Examples: Runlayer AI Watch, Zenity AI Observability, Lakera Agent Discovery, Lasso MCP discovery

  • VisibilityStrongIts whole job: an inventory tied to devices and people.
  • AuthenticationNoneFinds; does not authenticate.
  • Credential handlingPartialCan flag plaintext tokens in MCP config files; fixing them is another step.
  • Policy depthPartialSome tools can block or quarantine on devices; most report and leave remediation to you.
  • Runtime threat detectionNoneAn inventory, not an inspection of calls.
  • AuditPartialA record of what was found and when.
  • Deployment effortLowA device agent through MDM, a browser extension, or API connections to cloud platforms.
Where it falls short
  • Knowing about an agent does not make it safe: discovery needs a sanctioned path to send people to.
  • Unmanaged devices are out of reach.
Best for

Security teams that need to answer "what AI is in use here?" before deciding anything else.

Compared head to head
Approach

Blanket blocking

Deployment effortLow

Blocking AI clients, model APIs and MCP servers at the network, browser or endpoint, with exceptions granted case by case.

Examples: Secure web gateway deny lists, MDM application blocks, firewall rules

Where it falls short
  • Local MCP servers and personal devices route around it.
  • Every exception becomes an unmonitored hole, and the business still asks for agents.
Best for

A short-term freeze while discovery and a sanctioned path are put in place, or regulated systems where no agent may run.

Compared head to head
Approach

Build in-house

Deployment effortHigh

Writing your own auth and access plumbing: an internal MCP proxy, OAuth integrations per server, a secrets path, logging and policy code.

Examples: Internal proxy on open-source gateways, custom OAuth clients, home-grown policy engine

  • VisibilityPartialCovers what you route through what you build; device discovery is a separate project.
  • AuthenticationPartialAs good as your implementation of the MCP authorization spec, and its next revision.
  • Credential handlingPartialPossible to do well with a vault; easy to end up with shared service keys.
  • Policy depthPartialWhatever you write and maintain.
  • Runtime threat detectionNoneDetection models for poisoning and drift are rarely built in-house.
  • AuditPartialWhatever you log, in whatever shape you choose.
  • Deployment effortHighOngoing engineering time to build, plus upkeep for every new server, client and spec change.
Where it falls short
  • Platform engineers become the bottleneck for every team that wants a new connector.
  • Detection and discovery usually never get built.
Best for

Very small, fixed sets of internal agents, or companies with unusual constraints no product meets.

Compared head to head

Head-to-head comparisons

The pairs people weigh against each other, each ending in which one suits whom.

MCP gateway vs Runtime security

MCP gateway vs runtime security

What an MCP gateway enforces at access time, what runtime detection catches during tool calls, and when an AI agent deployment needs both.

Read the comparison →
Build in-house vs Adopt a platform (Runlayer)

Build in-house vs adopt a platform for AI agent security

Custom auth and access plumbing for AI agents compared with adopting a platform, on deployment effort, coverage of agent threats and ongoing maintenance.

Read the comparison →
Shadow AI discovery vs Blanket blocking

Shadow AI discovery vs blocking

Detecting and remediating unsanctioned AI agent and MCP use compared with blanket restriction, including what each does to adoption.

Read the comparison →
MCP gateway vs API gateway

MCP gateway vs API gateway

Why an existing API gateway does not cover MCP traffic from AI agents, and what an MCP gateway adds: tool-level policy, brokered OAuth and agent attribution.

Read the comparison →
Sandboxing vs Runtime monitoring

Sandboxing vs runtime monitoring for AI agents

Isolating AI agents in containers or microVMs compared with monitoring their tool calls at runtime: what each stops, what each misses.

Read the comparison →
Prompt guardrails vs MCP gateway

Prompt guardrails vs MCP gateway

An LLM firewall that classifies prompts and responses compared with an MCP gateway that controls tool access: different layers, different threats.

Read the comparison →
Agent identity and secrets vs MCP gateway

Agent identity vs MCP gateway

Giving AI agents their own identities and short-lived credentials compared with routing their tool calls through an MCP gateway.

Read the comparison →
Runlayer vs Docker MCP Gateway

Runlayer vs Docker MCP Gateway

Runlayer and Docker MCP Gateway compared on visibility, authentication, credentials, policy, runtime detection, audit and deployment, from each one's public documentation.

Read the comparison →