Key Takeaways
- Gartner predicts 25% of enterprise GenAI apps will see five or more minor security incidents yearly by 2028.
- IBM found 97% of organizations that reported an AI-related breach lacked proper AI access controls.
- CISA and five partner agencies advise against giving agents broad or unrestricted access.
- Hardening an agent means isolating execution, locking down egress, scoping permissions, and keeping secrets out of reach.
- Only infrastructure controls limit what an agent can do, while prompts only guide it.
Most agent failures are not dramatic. An agent finds a path its instructions never anticipated, uses a permission nobody gave it, or follows a command hidden in a document it read. The fix is rarely a better prompt. It is a better boundary.
This guide covers the main risks, where controls belong, how to harden an AI agent, how to secure agents on endpoints, and a 90-day sequence to put it all in place.
What Are the Best Practices for Securing AI Agents?
- Inventory every agent, tool, and credential, including unmanaged agents on endpoints.
- Give each agent its own identity and short-lived, task-scoped credentials.
- Enforce permissions below the agent, not in the prompt.
- Isolate execution in a sandbox with default-deny network egress.
- Keep secrets out of the agent’s reach.
- Treat all retrieved content, tool results, and memory as untrusted.
- Require human approval for high-impact and irreversible actions.
- Log everything outside the agent’s control, and keep a working kill switch.
Government guidance, OWASP, and NVIDIA’s red team converge on these points. The sections below show how to apply each one.
What Is AI Agent Security?
AI agent security is the practice of limiting what autonomous AI systems can access and do, and recording what they did. It extends familiar principles: least privilege, isolation, explicit authorization, and auditability. What changes is where they apply, because an agent chooses its own next step at runtime.
What Are the Biggest AI Agent Security Risks?
Gartner’s April 2026 forecast says 25% of enterprise GenAI applications will experience at least five minor security incidents a year by 2028, up from 9% in 2025. It expects 15% to see at least one major incident a year by 2029, up from 3% in 2025. Gartner ties the rise to agentic applications built on the Model Context Protocol (MCP), where new attack vectors meet immature security practices.
IBM’s 2025 breach report studied 600 breached organizations. Of those, 13% reported a breach of an AI model or application, and 97% of that group lacked proper AI access controls. Sixty percent of the AI-related incidents compromised data, and 31% disrupted operations. IBM describes the AI-related share as small, so read the 97% as a signal about access controls, not a prevalence rate.
OWASP’s agentic Top 10 gives teams a shared vocabulary. It was published in December 2025 with input from more than 100 experts and built from observed incidents.
OWASP’s guiding idea is least agency: give an agent only the autonomy a bounded task needs. Risks also chain together. A goal hijack leads to tool misuse, then a cascading failure, then human over-trust.
Gartner adds a practical rule. Treat any use case that combines access to sensitive data, exposure to untrusted content, and external communication as a no-go zone.
Government guidance now points the same way:
- May 2026: CISA, NSA, and four allied agencies published Careful Adoption of Agentic AI Services. It groups risk into five areas: privilege, design and configuration, behavior, structural, and accountability. It advises never granting agents broad or unrestricted access, especially to sensitive data or critical systems. It also recommends starting with low-risk tasks, giving each agent its own verifiable identity, and requiring human approval for high-impact actions.
- October 2026: NIST, NSA, and CISA published voluntary guidance on incident readiness for highly capable agents, as reported by CyberScoop. It targets organizations training and evaluating such agents, after several developers reported models escaping test environments. Deployers can still apply its practices: least-privilege access, single-use infrastructure, strict network allowlists through a monitored gateway, and monitoring that agents cannot access or alter.
Where Should AI Agent Security Controls Live?
Two kinds of control exist, and only one can be authoritative.
A prompt that says “never delete production data” is guidance. A database role that cannot delete production data is a control.
NVIDIA’s AI Red Team tested this in practice. It found that prompt-based guardrails and LLM-as-a-judge checks were routinely subverted through social engineering, gradual manipulation, and misdirection through legitimate workflows. Its conclusion is that controls must be deterministic and enforced outside the model.
Call the infrastructure side the protection layer. It is the runtime beneath the agent that holds identity, policy, credentials, sandboxing, and audit logging. The agent cannot bypass it or switch it off, which is what makes it enforceable.
A harness is built to be modified, which makes it a poor home for a guarantee. Taazaa’s guide to harness engineering covers where harness logic helps and where it stops. Infrastructure enforcement is not infallible either. A wrong policy produces wrong outcomes reliably, so review policy as carefully as code.
What Does the AI Agent Infrastructure Stack Look Like?
NVIDIA’s agent stack guidance maps a similar set of layers. Only the protection layer holds when everything above it fails.
How Do You Test Whether Your AI Agent Protection Layer Is Real?
Every action that changes external state should cross one security boundary, with enforcement below it.

Ask six questions of any agent deployment:
- Can the agent change its own permissions, policy, or logging?
- Does every state-changing action pass a check made outside the agent?
- Can a document, message, or tool result change what the agent is authorized to do?
- Can you revoke one agent’s access in minutes without redeploying?
- Is the audit trail written somewhere the agent cannot edit?
- If a control is missing or stale, does the system fall back to a safer state?
A “yes” to the first or third question, or a “no” to any other, means the boundary is advisory.
How Do You Harden an AI Agent?
AI agent hardening means shrinking what an agent can reach and do before it runs. That means fewer tools, tighter permissions, isolated execution, a locked-down network, and no exposed secrets. NVIDIA’s red team assessed agents ranging from coding tools to always-on assistants and found four recurring failure modes:
Add these steps:
- Block agent writes outside a non-executable workspace at the operating system level
- Allow package installs only from validated repositories, and block arbitrary URL installs
- Give tools, MCP servers, and skills only what the job requires
- Run agents in ephemeral, single-use environments
- Validate containment before restarting an agent that misbehaved
How Do You Secure AI Agents on Endpoints?
Endpoint agents run on laptops and developer machines, such as coding agents and desktop assistants. They usually inherit the user’s permissions, so they can reach whatever that user can reach. NVIDIA’s red team found that an attacker who can write to files such as ~/.bashrc, ~/.zshrc, or ~/.gitconfig, or to tool configuration files, can gain code execution even without a command-line tool. IBM’s report adds a cost angle: breaches with high levels of shadow AI cost an average of $670,000 more than those with little or none.
- Discover: Inventory agents and extensions on managed devices, and decide which are approved.
- Sandbox: Run agents in a container, VM, or hardened sandbox, away from .env files, .netrc files, shell history, and stored tokens.
- Protect configuration: Block agent writes to shell profiles and tool configuration files.
- Restrict the network: Use default-deny egress with an allowlist, and review any new outbound destination.
- Manage settings centrally: Push configuration through managed device policy that users cannot override.
- Limit tools: Approve specific MCP servers and plugins, and block the rest.
- Monitor and contain: Log agent processes and commands where the agent cannot reach the logs, and be able to stop an agent and revoke its credentials without locking out the user.
How Do You Give AI Agents Identity and Least Privilege?
Gartner advises authentication and authorization built for agents, not inherited from human roles. Put that into practice in this order:
- Inventory every agent, its tools, and its credentials.
- Give each agent its own identity, not a shared account or a person’s login.
- Scope credentials to one task and make them short-lived.
- Keep raw secrets out of the agent’s reach and inject them at call time.
- Deny by default, and add permissions deliberately.
- Review and revoke on a fixed schedule.
NVIDIA’s red team advises matching an agent’s permissions to the invoking user’s. Gartner advises authorization built for agents. Treat the user’s rights as a ceiling and the task as the real scope. The OpenID Foundation’s 2025 whitepaper also recommends delegated, on-behalf-of authority instead of impersonation, so logs show both the person and the agent.
Most identity systems were built for people with persistent roles. Issuing short-lived credentials to non-human identities needs a secrets management layer or an IAM redesign. Teams that skip it often fall back on standing credentials tied to a human role, so a compromised agent inherits that person’s access.
How Do You Create a Persistent Agent Identity Without Storing Personal Data?
- Give the agent its own workload identity, such as a SPIFFE-style ID, that persists across sessions and stays separate from any person
- Issue short-lived credentials for each session, bound to that identity
- Link to a person only through delegated, on-behalf-of tokens, so the human appears in access-controlled audit logs and not in agent memory
- Key session memory to pseudonymous identifiers, and set retention limits
- Review privacy rules for your jurisdiction before storing anything about users
How Do You Defend Against Prompt Injection and Poisoned Data?
- Treat every document, email, web page, tool result, and memory entry as untrusted input
- Let content inform the agent but never grant it permissions
- Avoid flows that combine sensitive data, untrusted input, and external communication
- Validate tool parameters and outputs before the agent acts on them
- Record where stored memory came from, and check it before reuse
- Require human approval before irreversible or external actions
How Do You Secure Tools, MCP Servers, and Third-Party Components?
Gartner notes that MCP was built for interoperability and ease of use first, so security mistakes can appear without continuous oversight. Its recommendations are practical:
- Run a formal security review before connecting any MCP server or tool
- Prefer low-risk patterns and exclude high-risk combinations explicitly
- Assign each server to a domain owner who defines its guardrails
- Pin versions and vet third-party plugins and components
- Expose only the tools each agent role needs
- Log every tool call with the identity that made it
How Much Control Does Each Agent Workload Need?
Tier controls by what the agent can do:
Run red-team and untrusted-code agents in isolated environments with default-deny networking. NVIDIA’s guidance defines four profiles of this kind: isolated, connected, production, and adversarial. The same boundary applies to every tier, and controls tighten as authority and impact grow. Taazaa’s guide to agentic AI design patterns shows how workflow architecture affects which tier a use case lands in.
What Should You Log, Monitor, and Test?
- Log every identity, tool call, approval, and state change in a store the agent cannot edit
- Use independent monitoring that can cross-check what the agent reports against system logs
- Alert on new tools, new destinations, volume spikes, and repeated denials
- Keep a tested kill switch and rollback for each agent
- Red-team with injected documents and poisoned memory before launch and after major changes
- Review policy and permissions on a fixed cadence
- Decide in advance who revokes access, who investigates, and how to reconstruct events
In multi-agent systems, give sub-agents ceilings they cannot exceed, because one agent’s error can cascade. Taazaa’s guide to AI agent orchestration covers state, policy enforcement, and failure handling across agents.
What Does a 90-Day Rollout Look Like?
This is a suggested sequence. Adapt it to your risk profile.
What Does Auditable AI Look Like in Practice?
Taazaa’s Safeguard AI audit workflow shows what traceability looks like in an AI pipeline. The system audits vendor work orders for Safeguard Properties across six stages, using Google Gemini through LangChain. To keep decisions auditable, the team stored tasks, images, prompts, allowable limits, and AI results in a normalized schema, and used versioned prompts and scoring rules. Modular stages and asynchronous jobs process hundreds of work orders at once while preserving data integrity.
The result was a reduction in audit processing time of more than 80%, with 98.24% accuracy compared to human evaluations. This is an audit pipeline, not a hardened agent runtime, so the controls above still apply on top of it. It does show why the logging and monitoring practices depend on decisions that can be traced.
Contact Taazaa to design the security architecture for your agent deployments.
Frequently Asked Questions
What is AI agent security?
It is the practice of limiting what autonomous AI systems can access and do, and recording what they did. It relies on least privilege, isolation, explicit authorization, and auditability.
What is AI agent hardening?
It means shrinking an agent’s reach before it runs: fewer tools, scoped permissions, isolated execution, default-deny network egress, and secrets kept outside its reach.
How do you secure AI agents on endpoints?
Discover the agents running on devices, sandbox them away from local secrets, restrict their network access, and manage their settings centrally. Monitor their activity and keep a way to revoke their credentials.
What are the biggest AI agent security risks?
Goal hijacking, tool misuse, privilege abuse, supply chain compromise, memory poisoning, and cascading failures lead OWASP’s list. Most trace back to over-broad access and untrusted content.
What is the difference between behavioral and infrastructure controls?
Behavioral controls, such as prompts and harness rules, shape what an agent tries. Infrastructure controls, such as identity and permissions, limit what it can do.
How do you prevent prompt injection in AI agents?
Treat all retrieved content as untrusted and keep it out of the authorization path. Validate tool inputs and require approval for irreversible actions.
What is an AI agent protection layer?
It is the runtime layer below the agent that holds identity, policy, credentials, sandboxing, and audit logging. The agent cannot bypass it, which makes it enforceable.
How do you create a persistent AI agent identity without storing personal data?
Give the agent its own workload identity, separate from any user, and link to a person only through delegated tokens in access-controlled logs. Key memory to pseudonymous identifiers with limited retention.




