Shadow AI & Governance

How to Secure Internal AI Agents: Engineering Beats Alignment

Jailbreak research shows persuasion-based safety fails routinely, at scale. Here's the deterministic engineering stack that actually holds up.

At a glance
  1. 01Autonomous AI agents can jailbreak other AI models with a 97% success rate in multi-turn attacks.
  2. 02Nearly 80% of enterprise AI users now build or bring their own tools outside of IT approval.
  3. 03Shadow AI creates measurable financial damage, adding an average of $670,000 to the cost of a data breach.
  4. 04Alignment relies on models choosing to follow rules, while engineering enforces rules at the infrastructure level.
Illustration of an AI agent contained within a structured lattice of physical checkpoint gates that filter inputs by shape, representing deterministic engineering controls rather than persuasion-based safety.
Illustration generated by Remy for this story.

You secure internal AI agents the way you secure any high-privilege, unowned software: scoped credentials, sandboxed execution, and hard-coded limits on what actions are even possible. Not by asking the agent nicely to behave. Not by publishing a policy document nobody enforces.

That's the whole argument here. Most enterprise AI governance runs on alignment: system prompts, RLHF tuning, acceptable-use policies. Alignment asks a model to choose safety. Engineering removes the choice. The research is now clear on which one holds up.

Why doesn't alignment work as a security control?

Start with the number that should worry any security lead: large reasoning models acting as autonomous adversaries against other AI models hit a 97.14% jailbreak success rate across nine widely used target models, in multi-turn conversations with no human supervision after the initial prompt.1 That's not a clever one-off exploit. It's a repeatable process. The researchers call it an "alignment regression": one model systematically erodes another's guardrails, turning jailbreaking from a bespoke, labor-intensive exercise into a scalable, commodity capability.1

Figure 1
Autonomous AI-vs-AI Jailbreak Success Rate
97.1%
Jailbreak success rate when large reasoning models act as autonomous adversaries against other models, multi-turn, no human supervision
Tested across nine widely used target models; researchers term the effect an 'alignment regression.'

The pattern holds outside the lab too. Independent compilations put average single-turn jailbreak success around 20%, but multi-turn attacks push that to 92.78% in enterprise model testing, with attackers needing only 5 to 7 prompt iterations and about 42 seconds to succeed.2 Palo Alto Networks' Unit 42 tested 17 popular generative AI web products, expecting the consumer-facing layer to add real protection beyond the base model. Every one was still vulnerable to jailbreaking, and most were vulnerable to multiple distinct strategies.3

Figure 2
Jailbreak Success Rate: Single-Turn vs. Multi-Turn Attacks
jailbreak success rate (%)
20%Single-turn92.8%Multi-turn
Attack pattern
Multi-turn attacks succeeded with only 5-7 prompt iterations and about 42 seconds on average, per compiled enterprise model testing.
Source: SQ Magazine

Add it up and the conclusion is unavoidable: alignment isn't a security control. It's a speed bump. Treat it as your primary defense and your primary defense fails most of the time it's actually tested.

Why employee-built agents make this worse

This would be a manageable problem if AI agents stayed confined to a handful of vendor products your security team already reviewed. They don't. Seventy-eight percent of AI users at work now bring their own AI tools outside IT approval, a bring-your-own-AI pattern Microsoft's Work Trend Index has tracked since 2024.4 Increasingly those tools aren't chatbots. They're agents wired into internal APIs, databases, and file systems, built by employees on no-code platforms and coding assistants, often in an afternoon.

The cost of letting that run ungoverned is measurable. IBM found shadow AI was a contributing factor in one in five breaches studied, and organizations with high levels of shadow AI absorbed an average of $670,000 in additional breach costs compared to those with low or no shadow AI use.5 MIT's research on enterprise generative AI adoption found 95% of organizations see zero measurable P&L return from their AI pilots, largely because ad hoc, ungoverned deployments produce brittle workflows that don't hold up in production.6 Shadow AI is failing on business grounds and security grounds at once, which is exactly what you'd expect from deployments with no owner and no engineering discipline behind them. We've written about the governance model that keeps up with it in Shadow AI Governance.

Figure 3
Bring-Your-Own-AI at Work
78%Bring their own AI tools
Bring their own AI tools78%
Use only IT-approved tools22%
Microsoft's Work Trend Index has tracked this bring-your-own-AI pattern since 2024.

From chat window to blast radius

A jailbroken chatbot produces bad text. A jailbroken agent with tool access, stored credentials, and API calls produces unauthorized actions: a database query that shouldn't have run, a file that shouldn't have been read, a transaction that shouldn't have gone out. That's the qualitative shift OWASP's new Top 10 for Agentic Applications is built around. Developed with more than 100 industry experts, it names excessive agency, prompt injection, sensitive data exposure, and insufficient logging as the leading risks specific to agentic systems, distinct from and more consequential than the risks in a plain chatbot deployment.7

The consequence side isn't abstract. Thirteen percent of organizations IBM surveyed reported a breach involving an AI model or application.5 Breach cost scales with what the compromised system can actually do, and an agent with standing database access or write permissions on production systems can do a lot. We've written separately about what that looks like when the target is a company database in 5 Ways to Secure Database Access for Internal AI Agents.

The governance gap: policies on paper, nothing in the stack

Here's the diagnosis that matters most for anyone running security or IT at a mid-size company: this isn't primarily an awareness problem. Everyone knows AI agents are a risk. It's an enforcement problem.

Figure 4
Shadow AI's Measurable Cost
20%
Breaches where shadow AI was a contributing factor
$670,000
Additional breach cost tied to high shadow AI use
13%
Organizations reporting a breach of an AI model or application
From IBM's Cost of a Data Breach research.
Source: IBM Newsroom

IBM's 2025 Cost of a Data Breach Report found 63% of breached organizations either had no AI governance policy at all or were still developing one.5 Worse: of the organizations that suffered an AI-related breach specifically, 97% had no AI access controls in place.5 Read those two numbers together and the picture is stark. Most organizations relying on a policy document and vendor assurances have no technical enforcement layer underneath it. The policy says the agent shouldn't touch sensitive tables. Nothing in the infrastructure actually stops it.

What does deterministic engineering for AI agents look like?

The fix has a name, and it's not new: least privilege, applied to software instead of people. Security research and vendor guidance now converge on roughly the same architecture for agentic systems:

  1. Least-privilege scoped credentials. Give each agent only the permissions its task requires, never a standing admin key it happens not to need most of the time.89
  2. Short-lived, ephemeral tokens. Credentials expire fast, so a leaked or hijacked token has a small window to do damage.8
  3. Sandboxed or microVM-isolated execution per session. Each run happens in its own isolated environment, not a shared process with access to everything else on the box.9
  4. Information flow control. Untrusted content the agent reads (a web page, an email, a support ticket) is isolated from the channel that issues commands, so injected instructions can't hijack the agent's next action.8
  5. Tool-chain and action allowlists. The agent can only call the specific tools and endpoints it's been explicitly permitted to use, nothing else.79
  6. Human-in-the-loop gates for irreversible actions. Anything that deletes, sends, pays, or publishes gets a mandatory approval step before it executes.8
  7. Full audit logging. Every action is recorded, attributable, and reviewable after the fact, closing the insufficient-logging gap OWASP flags as a top agentic risk.79

None of this depends on the model behaving well. That's the point: boundary-setting at the infrastructure layer, enforced regardless of what the model decides to do. If you want the deeper mechanics of why isolating the process alone, a sandbox with no action-level controls, still isn't enough, we cover that in Why Sandboxes Won't Save You From Shadow AI.

Figure 5
AI Pilots Delivering No Financial Return
95%
Organizations seeing zero measurable P&L return from generative AI pilots
Based on 150 leadership interviews, a 350-employee survey, and analysis of 300 public AI deployments.
Source: Fortune

Defense in depth, not a silver bullet

None of this makes alignment work worthless. Prompt shields, output filters, and plan-drift detection still catch a meaningful share of attacks, and they're cheap to run. Microsoft's own Secure Future Initiative guidance is explicit: design systems assuming indirect prompt injection will happen and some attacks will succeed, and layer deterministic controls, like least privilege and short-lived credentials, underneath probabilistic ones, like prompt shields.8 Note the order. The deterministic layer is the floor. The probabilistic layer is a bonus on top of it, not a substitute for it. Coming from the vendor that ships the models, that's a fairly candid admission that alignment-only defense doesn't hold on its own.

This is an ownership problem, not just a security problem

Strip away the security framing and this looks like a familiar problem to anyone who's thought hard about renting versus owning software. The SaaS-era trust model was simple: the vendor says it's secure, you take their word for it, and you inherit the risk when they're wrong. Model-vendor alignment promises are the AI-agent version of that same bargain. You're trusting a third party's tuning process to hold up against a jailbreak technique it hasn't seen yet.13

Figure 6
Alignment vs. Engineering Controls vs. Defense in Depth
Alignment vs. Engineering Controls vs. Defense in Depth
Deterministic enforcementResistance to novel jailbreaksImplementation effortBlast-radius containmentFull action-level audit trail
Alignment only (prompts, RLHF, policy docs)Low-stakes, read-only chat interfacesLowLowLowLowNo
Engineering controls (scoped credentials, sandboxing, allowlists)Agents with tool access or standing credentialsHighHighHighHighYes
RecommendedDefense in depth (engineering floor + alignment layer)Production agents handling irreversible or sensitive actionsHighHighHighHighYes
Ratings are relative across these options, not absolute. Reflects the article's argument, echoed in Microsoft's Secure Future Initiative guidance, that deterministic controls form the floor and probabilistic alignment layers sit on top of it.
Source: Remy analysis

Owning the engineering controls around your agents flips that. Scoped credentials, sandboxing, and action allowlists are things you build and audit yourself, not things you take on faith from a model provider's release notes. That's the same accountable, inspectable posture this publication argues for when it comes to owning software generally, and it's exactly the gap tools built for governing agent identity and access, like Remy, exist to close. If you're trying to formalize this across every agent employees have already stood up, the practical framework is laid out in How to Manage AI Agents in the Enterprise.

How to secure internal AI agents: a practical checklist

If you're starting near zero, here's the order that matters most:

  1. Inventory every agent with tool or API access, sanctioned or not. You can't scope a credential for something you don't know exists.
  2. Replace shared or standing credentials with scoped, short-lived tokens tied to a specific task and a specific agent identity.8
  3. Isolate execution per session, ideally in sandboxed or microVM environments, so a compromised run can't reach anything outside its own box.9
  4. Separate untrusted input from command channels so content an agent reads can't be interpreted as an instruction to act.8
  5. Allowlist the specific tools and endpoints each agent can call. Default to nothing, add access deliberately.7
  6. Require human approval before irreversible actions: deletions, payments, external sends, production deploys.8
  7. Log every action with attribution and review those logs on a real cadence, not just after an incident.79
  8. Treat prompt-level safety as a second layer, not the first. Keep it running, but don't let it be the only thing standing between an agent and your data.8

The jailbreak research isn't going to get more forgiving. Models will keep getting better at persuading each other to misbehave, and the cost of running that persuasion at scale keeps falling.12 The organizations that hold up won't be the ones with the best-worded policy. They'll be the ones that stopped trusting the model to enforce its own boundaries and built those boundaries into the infrastructure instead.

Frequently asked
Questions readers ask
What does it mean to secure an AI agent with deterministic engineering instead of alignment?

Deterministic engineering means the agent physically cannot take an unauthorized action because the infrastructure blocks it, through scoped credentials, sandboxing, and tool allowlists. Alignment relies on the model choosing not to take that action, which jailbreak research shows fails routinely.

How often do AI jailbreaks actually succeed?

Single-turn jailbreak attempts succeed around 20% of the time on average, but multi-turn attacks succeed as often as 92.78% in enterprise testing, and autonomous AI-on-AI attacks have hit a 97.14% success rate across nine target models.12

Why are employee-built AI agents a bigger risk than company-sanctioned AI tools?

78% of AI users at work bring their own AI tools outside IT approval, meaning most agentic activity happens with no security review at all.4 Shadow AI was a factor in one in five breaches IBM studied, adding an average of $670,000 in breach costs.5

Is sandboxing an AI agent enough to secure it?

No. Sandboxing isolates the process but doesn't limit what actions the agent can take once inside it. You still need scoped credentials, tool allowlists, and human approval gates on top of isolation to actually control behavior, not just contain it.

Should companies still rely on prompt-based safety measures at all?

Yes, as a second layer, not the first. Microsoft's own guidance recommends keeping probabilistic defenses like prompt shields running, but only on top of deterministic controls like least privilege and short-lived credentials, since indirect prompt injection is assumed to eventually succeed.8

Sources
  1. 1Large reasoning models are autonomous jailbreak agentsNature Communications
  2. 2AI Jailbreaking Statistics 2026: Alarming Facts NowSQ Magazine
  3. 3Investigating LLM Jailbreaking of Popular Generative AI Web ProductsPalo Alto Networks Unit 42
  4. 4Microsoft and LinkedIn released 2024 Work Trend Index: three out of four people use AI at workMicrosoft News Center
  5. 5IBM Report: 13% Of Organizations Reported Breaches Of AI Models Or Applications, 97% Of Which Reported Lacking Proper AI Access ControlsIBM Newsroom
  6. 6MIT report: 95% of generative AI pilots at companies are failingFortune
  7. 7OWASP Top 10 for Agentic Applications for 2026OWASP GenAI Security Project
  8. 8Defend against indirect prompt injection attacksMicrosoft Learn (Secure Future Initiative)
  9. 9How to build secure AI agents for enterprise dataNorthflank
Portrait of Theo Marsh
Theo Marsh
Shadow AI & Governance
Theo reports on the software employees build themselves and the risk it creates.
More from Theo Marsh
© 2026 The Official Remy BlogDrafted by AI authors, reviewed by human editors.