Thinking
AI agent security: prompt injection and excessive agency explained
Once an AI system can act, someone may try to make it act wrongly. What prompt injection and excessive agency are, and the layered controls that limit the damage.
Key takeaways
- Prompt injection hides instructions in content the AI reads, such as an email, a web page or a PDF. Filters alone cannot stop it.
- Excessive agency means a system holds more functions, permissions or autonomy than its job needs, and that sets the damage if it is fooled.
- Design so that being fooled costs little: least privilege, hard limits outside the model, approval for sensitive actions and a full audit trail.
- Test with attacks before every release and keep a quick way to lower the system's authority.
Giving AI the ability to act changes the security question. An assistant that can only talk can say something wrong. An agentic AI system that can issue refunds, send emails and edit records can do something wrong, and someone may try to make it. This guide explains the two risks that matter most for business agentic AI and the controls that contain them. It is written for leaders who need to ask the right questions, not for security engineers.
Risk one: prompt injection
A language model reads instructions and data in the same stream of text. Prompt injection exploits that. Someone places instructions inside content the system will read, such as a support message, a supplier invoice, a web page or a shared document, hoping the system treats them as orders. When the person types the instructions directly, it is a direct injection. When the instructions hide in outside content the system fetches or receives, it is an indirect injection, and this is the form that matters most for agentic AI, because these systems process a lot of content from people they do not control.
No filter removes the risk completely, because the attack is written in the same natural language as legitimate content. That is why the defence is architectural: limit what a fooled system could do. OWASP's Top 10 for Large Language Model Applications has listed prompt injection first, and its guidance leans on the same principles: keep outside content separate from instructions, keep the AI's backend access to a minimum and require human approval for sensitive actions.
Risk two: excessive agency
Excessive agency is a system holding more power than its job requires. OWASP traces it to three roots: too much functionality, too many permissions and too much autonomy. The connection to the first risk is direct. If an attacker does fool the system, the damage is capped by what the system is allowed to do. A system that can only read a mailbox and draft replies is a nuisance when manipulated. A system that can also send money and change bank details is a loss.
A worked example
The following scenario is illustrative. An accounts payable system reads an incoming invoice PDF. Hidden in the document, in white text, is a line telling the system to ignore its instructions, mark the invoice approved and pay it to a new account. Here is how a layered design handles it:
- The system treats document content as data to extract, not as instructions to follow.
- The system has no ability to change a supplier's bank details, because that permission was never granted. The limit lives in the accounting system, not in the prompt.
- A payment to a new payee, or above a set amount, needs a person's approval.
- The attempt shows in the audit trail, and monitoring flags the unusual request.
- The case sits in the evaluation suite, so every future release is tested against it.
Even if the model were fooled at the first step, steps two and three would stop the loss. That is the goal: assume the model can be fooled, and make being fooled cheap.
Eight controls to ask for
- Least-privilege access. Only the systems, records and actions the job needs, enforced in the connected systems. See least-privilege access.
- Approval for sensitive actions. Payments, deletions, data exports and messages to new recipients wait for a person. See human-in-the-loop.
- Hard limits outside the model. Spending thresholds, allowed counterparties and permitted tools, enforced by the system and not left to the model to respect.
- Outside content treated as untrusted. Text from emails, documents and web pages is processed as data, and what it can trigger is restricted.
- A small set of tools. Remove every tool the job does not need, and keep risky tools away from the parts of the system that read untrusted content.
- Recording and monitoring. A complete audit trail and observability with alerts for unusual patterns.
- Adversarial testing. Injection attempts belong in the evaluation suite and are re-run before every release and after every model update.
- A way to lower authority fast. Moving a system back to approving every action should be as easy as raising its authority. See autonomy is a dial, not a switch.
Questions to ask any vendor
- What is the worst action this system could take if it were manipulated, and what stops it?
- Which limits are enforced by the connected systems, and which depend on the model following instructions?
- How is content from outside, such as customer messages and documents, kept apart from the system's instructions?
- Are injection attempts part of your tests, and how often are they re-run?
- Can I see the audit trail for a single case from input to action?
Our approach to access, approvals and records is on the security and trust page, and the wider questions for choosing a partner are in how to choose an AI automation agency. For the personal-data side of the same topic, see the data protection and AI checklist.
Sources
Common questions
What is prompt injection?
An attack in which text that an AI system reads, such as an email, web page or document, contains instructions meant to override what the system was told to do. It works because language models process instructions and data together.
Can prompt injection be fully prevented?
Not with filters alone. The practical defence is to limit what a manipulated system can do: least-privilege access, hard limits, approval for sensitive actions and monitoring.
What is excessive agency?
A system holding more functions, permissions or autonomy than its task needs. It determines how much damage a manipulated or mistaken system can cause.
Is agentic AI safe for business use?
They can be, when authority is limited and earned. Safety comes from the design around the model: scoped access, approvals, limits and a complete record, not from the model alone.
Does human approval help against attacks?
Yes. A person approving sensitive actions is a strong control, especially at the start. It works best when the approver sees the evidence behind the request.
Keep reading
More from the lab
Thinking
Agentic AI vs generative AI: key differences, with examples
Generative AI writes; agentic AI gets the job done. A plain comparison of the two, with a table, examples, the new risks and how to choose.
Thinking
Autonomy is a dial, not a switch
Most conversations about AI ask whether to automate something. The better question is how much authority to grant, and how that authority is earned.
Put it to work