A prompt-injection test suite tells you whether your model can be tricked into saying the wrong thing. It doesn't tell you what happens when that same trick reaches an agent that can send an email, run a shell command, or call your billing API. Here's how to test that specifically.
Most teams that ship an LLM feature this year aren't shipping a chatbot anymore. They're shipping an agent: something with a system prompt, a loop, and a set of tools it can call on its own, look up a customer record, draft a refund, restart a server, push a commit, send a Slack message. That's a different risk profile than a chat window, and it needs a different test, not just a bigger version of the same one.
The distinction matters because "prompt injection" and "excessive agency" are two separate failure modes that combine into the incidents you actually read about. Injection is how an attacker gets a malicious instruction in front of the model. Excessive agency is what lets that instruction do damage once it's there. OWASP tracks both separately in its 2025 GenAI LLM Top 10, injection as LLM01 and excessive agency as LLM06 (OWASP GenAI LLM01:2025, OWASP GenAI LLM06:2025), and testing them as one thing is how teams end up with a prompt that "passed red-teaming" attached to a tool that can wire money.
OWASP defines it as an agent having more functionality, permissions, or autonomy than the task in front of it requires. In practice, that shows up as three separable problems, and it's worth testing each one on its own:
delete_user function wired in because it shared a tool registry with the admin agent.Each of these fails independently of whether your prompt injection defenses are good. You can have a model that never once falls for "ignore previous instructions" and still ship an incident, because the tool it had access to didn't need injection at all, a legitimate-looking user request was enough, and nothing downstream checked whether the action made sense.
The method below assumes you already have (or are building) an injection test suite along the lines described in our prompt injection testing checklist. This extends that work to the tool-calling layer specifically.
For every tool your agent can call, write down two things: what's the worst single action it can take, and is that action reversible. A tool that reads a customer's order history is low blast radius. A tool that sends an email, issues a refund, deletes a record, or runs arbitrary code is high blast radius and irreversible. This map is what tells you where to spend your testing budget, don't spend equal effort probing a read-only search tool and a wire-transfer tool.
| Tool class | Blast radius | Minimum bar before ship |
|---|---|---|
| Read-only lookup (search, retrieve) | Low | Scoped to the current user/session's own data |
| Internal state change (update ticket status, tag a record) | Medium | Logged, reversible, scoped to session |
| External communication (send email, post to Slack, message a customer) | High | Recipient allowlist or human confirmation |
| Money movement, deletion, code execution | Critical | Non-LLM approval gate, always |
This is the part teams skip. Your injection tests probably already cover "a poisoned document tells the agent to do something bad." You also need cases where nothing is injected at all, the user (or an upstream system) just asks for something reasonable-sounding that happens to cross a boundary it shouldn't. Examples that map to the tool classes above:
That last one is the compounding case: indirect injection (LLM01) plus excessive agency (LLM06) together. It's the pattern behind most of the real-world "AI agent did something it shouldn't have" stories, the model wasn't uniquely gullible, the tool it had access to made the gullibility expensive.
"We have a human-in-the-loop step" is not a control until you've tested that the agent can't route around it. Common gaps: the agent can retry the same action with slightly reworded parameters until a fuzzy-matched approval passes; the confirmation prompt shows a summary the model itself generated (and could generate misleadingly) rather than the raw parameters being executed; or the gate exists in the UI but a second, less-visible code path (a scheduled job, a webhook handler) calls the same tool without it. Test all three.
Agent permission creep is the same problem as IAM permission creep, and it happens the same way: someone adds a tool or widens a scope to unblock a feature, ships it, and nobody revisits it. Treat your tool registry like you'd treat a production IAM policy: reviewed on change, not just at audit time. If you're documenting this for EU AI Act purposes, this is also exactly the kind of change your Annex IV change log should be capturing as it happens, not reconstructing later.
Test the prompt for what it can be tricked into saying. Test the tools for what saying it can actually do. Ship the second test suite with at least as much rigor as the first, because in an agent with real tool access, that's the one that decides whether an injection is an annoyance or an incident.
This is the layer we built Sentinel Scan to cover: adversarial probes that don't just check whether your agent falls for an injected instruction, but whether the tools it has access to would let that instruction matter.
Sentinel Scan runs adversarial probes, including tool-boundary and excessive-agency cases, against a target you designate, graded by an independent judge, with a plain-English report in 24 hours. Run it yourself free, or book the managed audit mapped to OWASP LLM Top 10 & NIST AI 600-1 (pricing coming soon) (founding-partner rate (coming soon) for CLI users, first 5 design partners), one-time, authorized only. Want the test-case templates behind this post instead? See the Ship-Safe LLM Features Kit (pricing coming soon).
Sources cited: OWASP GenAI LLM01:2025, Prompt Injection, OWASP GenAI LLM06:2025, Excessive Agency.