A chatbot answers. An agent acts. The moment you give a large language model tools — the ability to send an email, run code, query a database, call an API, move money — you cross from "it might say something wrong" to "it might do something wrong". That is the highest-risk category of AI feature, and it has its own entry at the top of the OWASP Agentic Top 10: agent goal hijack.
The core problem
An agent decides what to do based on text. If an attacker can influence that text — through indirect prompt injection — they can influence what the agent does. Combine "reads untrusted content" with "can take real actions" and you have a system that can be driven to act against its owner.
What an attacker aims for
- Unapproved actions: making the agent send, delete, buy or share on a victim's behalf.
- Confirmation bypass: injected text that answers a "are you sure?" prompt for the user.
- Tool chaining: one tool's output instructing the agent to call a second, more powerful tool.
- Reaching internal systems: a fetch or code tool used to touch internal addresses or cloud metadata (SSRF).
The principles that keep agents safe
Least privilege
Give each tool only the permissions its task needs. An agent that only needs to read calendars should not be able to delete them.
Human-in-the-loop for anything that matters
Sensitive or irreversible actions need a real user action to confirm — one that injected text cannot supply. This single control defeats most agent attacks.
Treat tool inputs as untrusted
If a tool's input is built from content the model read, treat it as hostile. Validate it the way you would validate anything from the internet.
Sandbox the powerful tools
Code execution and URL fetching should run with no access to internal networks, no shared files between users, and no reach to cloud metadata endpoints.
Rule of thumb: the more your agent can do without a human, the more carefully it needs to be tested. Autonomy and risk rise together.
Before launching an agent, it is worth having someone test it adversarially — planting content to see whether the agent can be made to act. That is exactly the kind of work a focused review covers.
Shipping an agent that can take actions?
Agents carry the highest risk of any AI feature. Get a free mini-review before you ship.