Gradient background transitioning from teal at the top to dark green at the bottom.

What Is AI Agent Security? The Complete 2026 Guide

Learn what AI agent security covers, why agents break controls built for software, and which of its four layers most programmes are still missing.

Bar Kaduri

November 23, 2026

We measured 402,599 internet-reachable AI agent hosts across 36 services, 206,435 agent skills, and 13,145 code files that hand agents dangerous capabilities. AI agent security is the work of governing what those agents do once they are running. This guide maps the category: its attack surface, its boundaries, and its four layers.

Key takeaways about AI agent security

  • AI agent security governs an agent's actions rather than its answers: which tools it calls, which credentials it carries, and which of its decisions are permitted to reach a live system.
  • Out of the 206,435 agent skills we analyzed, 44 passed all five baseline security checks, and across 13,145 files that grant dangerous capabilities, runtime guardrail adoption is effectively zero.
  • Most programmes can already list their agents and score their configurations. Coverage stops at the moment an agent acts, and that moment is what decides the outcome.
  • The attack surface has five elements and only one of them touches a system. An agent's actions are the only place where a control has something concrete to read and refuse.
  • Agentic AI security and AI agent security name the same work. LLM security governs the model boundary; AI security covers the data, pipelines and infrastructure around it.

What is AI agent security?

AI agent security is the discipline that governs what an AI agent is allowed to do once it is running: which tools it may call, which data it may reach, and which of its decisions are allowed to leave the model and touch a system. Securing the model itself is a different job with a different boundary. The model is one input to the decision. The tool call is the decision.

The mechanism is what makes this a separate discipline. An agent reads content, forms an intent, selects a tool, and issues a call that executes with real credentials against a real system. Each of those steps happens after the last human review and before the first log line.

The gap is measurable. Across the 13,145 files in our dataset that grant agents dangerous capabilities, adoption of every runtime guardrail the industry formally agrees on, meaning cost controls, audit logging, and human approval for destructive actions, is effectively zero. We say effectively because the real number for several of them sits below 0.1%. Our State of AI Agent Security 2026 research put it in one line: between an LLM's decision and system-level execution, there is nothing.

Governance of the artifacts an agent installs is no better. Out of the 206,435 skills analyzed, only 44 passed all five baseline security checks. Forty-four out of two hundred thousand is not a compliance gap. It is an absent control plane.

How AI agents differ from traditional software (and why security breaks)

Existing controls were built for software that executes a path a person wrote. An agent executes a path it assembles while running, out of content it did not author. Four differences follow, and each one lands on a control class most security teams already own.

  1. The instruction set is assembled at runtime. A skill file, a retrieved document, a ticket comment and a web page all arrive in the same context window as the system prompt, and the agent absorbs them with the same authority. No syntax separates instruction from data.
  2. The action set is discovered, not declared. Tools register at runtime through MCP servers, plugins and connectors, so what an agent can do is a property of its session rather than of its build.
  3. Identity is borrowed. The agent acts with a person's token or a service account, so every authorization check it triggers returns an approved answer to a question nobody asked.
  4. Behaviour does not repeat. The same prompt can produce a different plan on the second run, which means a passing test proves what happened once.

Static analysis reads the code and misses the instruction. Authorization reads the identity and misses the intent. A sandbox holds until an agent finds the exit its designers left open. None of these controls are broken; each answers the question it was built to answer, which is whether the caller may make this call. An agent raises a different question, which is whether this call is the one the task needed.

The root cause is architectural. Agent platforms ship defaults tuned for adoption speed, and no vendor treated a decision-time control as a shipping requirement. The result is not one team's mistake. It is what happens when a dozen popular platforms each ship a slightly permissive baseline and enterprises install all of them.

The AI agent attack surface: prompts, tools, memory, identity, actions

Five elements carry the agent attack surface, and they are not the five an application security review looks at. Prompts, tools, memory, identity, actions. Ranked by likelihood they look different again, and that ranking belongs to a threat model rather than to a map.

Prompts are the instruction channel, and that channel includes everything the agent retrieves. Indirect prompt injection is the class where an attacker writes into a source the agent will read later and never speaks to the agent directly.

Our own disclosure shows the shape better than a definition does. In ShareLeak, a crafted payload in a SharePoint form field took the wheel of a Microsoft Copilot Studio agent, which then read a connected SharePoint List and mailed customer records to an outside address. Microsoft assigned it CVE-2026-21520 at CVSS 7.5, high severity, which is the durable part: a prompt-injection flaw carrying a vendor CVE.

Tools are the action channel. Every registered tool is a granted capability, and capabilities combine. Code execution plus credential access plus outbound network is a complete exfiltration chain that needs no attacker to activate it.

Memory is where a bad instruction outlives the session that delivered it. Poisoned context written to a vector store or a persistent scratchpad comes back on a later, unrelated task, and the second task has no idea where the instruction came from.

Identity is the credential the agent carries, and the reason blast radius is a design decision rather than an accident. An agent holding a service account inherits everything that account can reach.

Actions are the only element that touches a system. Everything before them is preparation.

The enterprise SaaS copilot is where all five meet. A connector-and-document agent reads content authored by people outside the tenant, holds a token scoped to a whole workspace, and calls tools that write. It was approved as a productivity feature. It was never scoped as an execution surface.

Agentic AI security vs LLM security vs AI security

Vendor copy uses the three terms interchangeably. They describe three different scopes, and the difference decides which control you are actually buying.

Agentic AI securityLLM securityAI security
What it governsThe agent's actions: tool calls, credential use, memory writes, and the effect that reaches a systemThe model boundary: prompts in, completions out, jailbreaks, refusals, output filteringThe estate: training data, model supply chain, pipelines, inference infrastructure, access to all of it
Where the control sitsBetween the decision and its execution, at the tool callAround the model, in front of the prompt and behind the completionAround the platform, in the data and MLOps layers
What it cannot seeWhether the model should have been asked in the first placeWhat the agent does with a completion the filter allowed throughAny single action taken inside a live session

Read the table down the middle column and the boundary becomes concrete. A filter that inspects a completion has already done its job by the time the agent turns that completion into a call, and a data-layer control never sees the call at all.

In practice, agentic ai security and ai agent security name the same work, and treating them as two categories creates a purchasing problem rather than a security one. The distinction worth holding is between securing what the model says and securing what the system does about it.

Core security challenges in AI agent deployment

The security challenges in AI agent deployment repeat across organisations, and each one sits with a different owner, which is why programmes stall between the audit and the control.

  • Discovery. Agents arrive through IDE plugins, SaaS features and raw API calls, so the inventory is wrong before the policy is written.
  • Permission scope. Agents get provisioned with the access of the person who requested them, because scoping a token per task is work that rarely gets funded.
  • Untrusted input. Prompt injection is a property of the interface between a model and its data sources, not a bug in one product.
  • Persistence. A poisoned memory or a poisoned tool turns a one-time compromise into a standing one. Our audit of 206,435 AI agent skills measured how routinely the ingredients ship together in packages people install without review.
  • Excessive agency. The agent is permitted to do more than the task requires, and the excess stays invisible until something uses it.
  • Forensics. Log scraping reconstructs the conversation and not the call, so answers after an incident arrive in days rather than minutes.

The OWASP Agentic Security Initiative published the numbered catalogue this list compresses, in Agentic AI: Threats and Mitigations, the first guide in its agentic series, released on 17 February 2025.

Its value is not theoretical. Use it as an audit instrument. For each threat class in the catalogue, write down which of your agents it applies to, which tool it would reach through, and which control would stop the action. Most programmes fill the first column. Some fill the second. The third column is where this category actually lives, and an empty third column is the finding.

The AI agent security stack: discovery, posture, runtime, response

A complete programme covers four layers: discovery, posture, runtime and response. The layers are sequential in dependency, not in importance. You cannot score a configuration for an agent you have not found, and you cannot enforce on a tool call you cannot see.

LayerThe question it answersWhat it producesWhere it stops
DiscoveryWhich agents exist, and what can each one reach?An inventory of agents, tools, skills and the credentials behind themKnowing an agent exists says nothing about what it did
PostureIs this agent configured safely before it runs?Scored configurations, permission findings, risky capability combinationsA safe configuration still executes an unsafe instruction
RuntimeShould this specific action proceed, right now?An allow or a refusal at the tool call, while the action is still pendingIt cannot make a wrong plan into a right one
ResponseWhat happened, and can we reconstruct it?Tool-call telemetry, session reconstruction, containment after the factEverything it records has already executed

The first two layers are the ones a programme tends to reach first, because both have direct ancestors. Discovery inherits from asset management, and posture inherits from CSPM and configuration review. Both work on artifacts that sit still long enough to be scanned.

The runtime layer is where the coverage ends, and it is the layer that decides outcomes. What runtime means as a control location deserves its own definition and gets one elsewhere. Here it is a position: after the decision, before the effect. We catalogued five disclosures inside sixteen days in When Agents Go Rogue, and the summary is that none of them needed an external attacker and the safeguards in place did not catch them before execution.

Vendors sell across these four layers in roughly four categories, posture, identity, guardrails and runtime enforcement, and comparing them is a separate exercise with its own criteria. The map matters first: buying a second posture tool does not close a runtime gap.

How to secure AI agents: a phased approach

Nothing in this sequence requires a purchase. It requires a decision about who owns the agent estate and about four weeks of unglamorous inventory work.

Phase 1, weeks 1 to 4. Find the agents. Pull OAuth grants from the identity provider, egress records to model endpoints from the network, and plugin telemetry from managed IDEs. Reconcile the three lists. The agents that appear in one source and not the others are the ones your policy has never covered.

Phase 2, weeks 4 to 8. Bound what they can reach. Give each agent its own identity rather than a borrowed one. Scope the token to the task rather than to the requester. Remove standing write access to production data stores, and pin the versions of the tools and skills each agent loads so an update cannot change behaviour silently.

Phase 3, weeks 8 to 12. Enforce at the call. Most agent frameworks already ship a hook that fires before a tool call executes, and we measured barely one percent of dangerous-tool files using it. Turn it on, write deny rules for the destructive verbs your agents have no business issuing, and make the control fail closed rather than open.

Phase 4, continuous. Keep the record. Log tool calls with their arguments and outcomes, not just the conversation. Then run one drill: pick a single agent, and ask who approved its credential and what it called last Tuesday. If the answer takes more than an hour, the response layer is a plan rather than a capability.

Phases 1, 2 and 4 close with work you can schedule. Phase 3 is where teams discover the layer has no default owner.

Where Capsule fits (runtime layer)

The map above cuts a hole, and enforcement at the moment of the call is the shape of it. That is the gap Capsule Security closes: a runtime security platform for AI agents that discovers the agents running across your organization, maps what each one can reach, watches their behavior live, and interrupts unsafe actions mid-execution, with no changes to your code, agents, or architecture.

The limit is worth stating plainly, because it is the hard part of this whole category. Enforcement at the tool call does not make an agent correct. An agent under it still forms wrong plans and still selects wrong tools; what changes is that the call can be read and refused before it reaches the system.

The real cost is accuracy. A control that refuses the wrong action teaches engineers to route around it, and a control people route around is worse than no control at all. Discovery and posture tell you what could happen. Only the runtime layer decides what does.

Want to see which agents are running in your environment right now, what each one can reach, and what a refusal at the tool call would have stopped? Get a demo.

FAQs about AI agent security

Is AI agent security a separate budget line, or part of application security?

It sits with application security in most organisations and fails there quietly, because AppSec tooling and staffing are built around code review cycles. The work is continuous and identity-adjacent. Teams that succeed give one named owner the agent inventory and the enforcement decision, whichever function they report into.

Do existing DLP, CASB and SSE controls cover AI agents?

Partially, and in a way that reads as coverage on a dashboard. Those controls inspect traffic and files against policy, and they do see some agent egress. What they cannot evaluate is whether an authorised identity making an authorised request is doing so for the reason the task required, which is the question an agent's actions raise.

How does AI agent security relate to non-human identity management?

Non-human identity work gives each agent its own credential, its own lifecycle and its own scope, which is Phase 2 of any serious programme and a prerequisite for the rest. It answers who the agent is. It does not answer what this particular call is about to do, so the two programmes are complementary rather than alternative.

Can prompt-injection filtering solve agent security on its own?

No, though it belongs in the stack. Filtering raises the cost of the most common entry technique and catches known patterns. It operates on text before a decision exists, so a filtered-clean instruction that produces a destructive tool call passes through untouched. Treat it as one control among several rather than the control.

What does an AI agent security programme cost to start?

The first two phases cost staff time rather than licences, usually one engineer for four to eight weeks in a mid-sized estate. Honestly, the harder number to predict is the political cost of the inventory, because it usually surfaces agents that were deployed without review by teams who liked it that way.

How do you secure AI agents nobody deployed on purpose?

You find them first, which is why discovery is the base layer. Undeclared agents show up in OAuth grants, in outbound traffic to model endpoints and in IDE plugin inventories rather than in an approved-tools register. Once found, treat them the same as sanctioned agents: scoped identity, pinned tools, enforcement at the call.

What should a board-level briefing on secure AI agents cover?

Three numbers work better than a threat list: how many agents are running, how many hold standing write access to production systems, and how long reconstructing one agent's last week of actions takes today. Those answers map to discovery, posture and response, and the gaps between them make the case without any adjectives.

See how Capsule secures AI agents at runtime.

Get a demo

Stop AI agents from going rogue

Capsule gives security teams real-time visibility and control over every AI agent action.

Get a demo

Ready to secure your AI agents?

Talk to our team about runtime protection for agentic workflows.

Book a demo

On this page

Section heading

Related articles