A lot of what passes for AI agent security in production right now is a paragraph of English at the top of a system prompt, politely asking the model to behave.
That's a request. Calling it a control is generous.
Once software can call APIs, move money, write to a database or email a customer, you aren't securing a chatbot anymore. You're securing a non-deterministic process that holds real credentials and takes instructions from whatever text it happens to read. We already know how to govern untrusted processes with privileges, and the answer has a name: a control plane. I think agents need one, and I think most teams building them don't have it yet.
Anything the agent reads can steer it
The threat model fits in a sentence. Anything an agent reads can become an instruction, and anything an agent can do, an attacker can make it do.
OWASP's Top 10 for Agentic Applications, published in December 2025, is the best catalogue I've found of how that plays out. It starts with goal hijacking through hidden prompts (ASI01) and legitimate tools bent toward destructive ends (ASI02). It covers leaked credentials that let agents operate "far beyond their intended scope" (ASI03), poisoned MCP and agent-to-agent supply chains (ASI04), and memory poisoning that sticks around across sessions (ASI06). Further down are cascading failures through automated pipelines (ASI08) and, my favorite, polished explanations that talk a human into approving something harmful (ASI09).
What strikes me about that list is that none of the fixes live inside the model. Prompt injection isn't a bug you patch in the next release. It's what you get when instructions and data travel down the same channel. The only defense I'd trust is architectural: assume the model will get compromised, and limit what a compromised model is able to do.
Moltbook is what this looks like in practice
In February 2026, Wiz reported that Moltbook, a social network for AI agents, had exposed its production database through a client-side key with no row-level security behind it. The exposure included about 1.5 million API authentication tokens, more than 17,000 owner email addresses and thousands of private agent-to-agent messages, some with third-party API keys pasted in plaintext. Wiz says the team secured it within hours of disclosure.
The obvious takeaway is "configure your database," and sure. The more interesting one, to me, is that agent credentials are the new crown jewels and most stacks store them like session cookies. Steal a login and you get an account. Steal an agent token and you get a worker that already has standing permission to act.
Who is this agent, and who sent it?
An agent needs its own identity, separate from the user who launched it and the developer who built it. Sooner or later an auditor, or an angry customer, will ask which agent did something, on whose behalf, and under which grant. If your logs just say service-account-prod, you can't answer.
The MCP spec has been moving this way. The 2026-07-28 release formally deprecates Dynamic Client Registration in favor of Client ID Metadata Documents, where a client's identity is an HTTPS URL it controls. It also requires that client credentials stay bound to the authorization server that issued them, with no reuse across issuers (changelog). I read that as the protocol admitting anonymous clients registering themselves were never something you could build governance on.
What exactly is it allowed to do?
Roles tell you what kind of thing a principal is. With agents I care about a narrower question: what may this particular run do, to which resources, for how long, and up to how much?
That pushes you toward short-lived grants tied to a task. Scope them to specific tools and resources; MCP's own security guidance calls out wildcard scopes like *, all and full-access as common mistakes. Put a spend cap and a row cap on each run, and let the grant expire when the task ends rather than at the end of the quarter. And mint tokens for one audience. The same guidance names "token passthrough," where a server forwards a client's token downstream without checking it was issued for that server, as an anti-pattern. If a token works everywhere, a compromised agent works everywhere too.
Every action goes through a checkpoint
I don't let agents touch tools directly. Every call should pass through a policy enforcement point, a gateway that authenticates the agent, checks the call against policy, and then allows it, denies it or parks it for a human.
The new MCP spec made that a lot cheaper to build. Streamable HTTP requests now have to carry the method and tool name in Mcp-Method and Mcp-Name headers, explicitly so "your gateway, rate limiter, or WAF can route and meter on those headers instead of parsing JSON bodies" (MCP blog). The protocol core also went stateless, so any request can land on any instance behind a plain load balancer. Agent traffic starts to look like ordinary web traffic, and we're good at policing that.
The policy itself can be boring. Honestly, it should be:
# agent-policy.yaml: evaluated at the gateway, never by the model
agent: support-triage@arknet-example
on_behalf_of: required # no action without a human principal
tools:
crm.read_ticket:
allow: true
crm.update_ticket:
allow: true
constraints:
fields: [status, priority, internal_note] # never customer-facing fields
billing.issue_refund:
allow: true
constraints:
max_amount_usd: 50
max_per_run: 1
require_approval_above_usd: 0 # every refund needs a human click
email.send:
allow: false # drafts only; humans send
budgets:
max_tool_calls_per_run: 40
max_wall_clock_seconds: 300
on_violation: halt_and_page
Notice that nothing in there asks the model to be careful with refunds. It makes an expensive refund impossible without a human, no matter what the model has been talked into.
The spec added one more piece I like a lot. Multi Round-Trip Requests let a server answer input_required and pause a tool call until the client comes back with, say, a user's confirmation. Human approval becomes part of the protocol instead of a UI hack. Supabase's team, quoted in the same release post, says it lets their tools confirm with the user "before it acts, like the cost of a new project before it's created, or a query that would delete data."
Keep records the agent can't edit
For every action I want to know who asked, which agent acted, what grant it used, what went in, what the policy decided and what came out. And I want that written somewhere the agent has no way to modify.
People treat this as paperwork. I don't. It's the only way to debug a system that doesn't behave the same way twice, and it's also where regulators are heading. In the EU, the AI Act's transparency duties under Article 50 have applied since 2 August 2026. The Digital Omnibus amendment pushed the high-risk obligations to 2 December 2027 for Annex III systems and 2 August 2028 for systems embedded in regulated products (Regulation (EU) 2026/1744; European Commission). The delay didn't cancel anything. It's a runway, and teams that build their logging and oversight now will barely notice those dates.
How fast can you pull the plug?
Something will go wrong. With probabilistic systems at scale, that's just arithmetic. When it does, one question matters: how long does it take to stop every instance of this agent, everywhere, and revoke everything it holds?
If the honest answer is "we'd redeploy," you don't have a kill switch. You need central revocation for agent credentials, a circuit breaker at the gateway for each agent and each tool, and something that trips it automatically when denied calls spike, tool sequences look odd or a run burns through its budget. OWASP's cascading-failure entry (ASI08) is exactly the case where seconds count.
Put the boundary where the model can't reach it
If I had to compress all of this into one rule, it would be that one. Whatever lives in a system prompt is advice, and whatever lives in the gateway, the token and the database is law. A well-built agent system stays safe even with a fully compromised model, because the model never held the power to do damage. It only held the power to ask.
We already treat every other untrusted workload this way. Containers don't police themselves. Browsers sandbox the JavaScript they run. Banks don't let tellers approve their own overrides. Agents are just the newest untrusted workload, and arguably the most persuasive one, since they can write a convincing explanation for anything they do. OWASP gave that its own entry for a reason.
A quick self-test, if you want one. Can your logs tell you which agent took an action, separately from the user or service account? Would any agent credential still work if someone copied it to their laptop and used it tomorrow? Is there a single tool an agent can call without passing a policy check you control? Could you reconstruct from immutable records why an agent took its last hundred actions, and could you revoke one agent's access everywhere in under a minute without a deploy?
Every wrong answer is a spot where your security depends on the model choosing to behave. That's fixable, and fixing it pays off beyond risk. Everyone rents the smartest model from the same handful of labs, so I don't think the edge in agents will come from the model. It'll come from being the team that can safely hand an agent more authority than its competitors dare to.
If you're putting agents into production and want a second pair of eyes on the identity, policy or audit layer, I'm happy to talk. If you think one of these layers is unnecessary, make the case in the comments.
Michael, ArkNet Digital (https://www.arknet.digital)
Top comments (0)