Atlas AI Resources

Guide

Keeping AI agents safe: prompt injection, untrusted content & human approval

The moment an agent can read your inbox or browse the web and take actions, anything it reads becomes a possible instruction. This page covers what prompt injection is, why it matters for tool-using bots, and the practical guardrails that limit the damage.

1. What prompt injection is

OWASP lists prompt injection as the first risk (LLM01) in its Top 10 for LLM applications. It separates two kinds:

Indirect injection is the one that matters most for agents. OWASP notes the injected text doesn’t even have to be visible to a human — it only has to be parsed by the model. Examples from the OWASP cheat sheet include hidden text in web pages, documents, and emails, plus instructions in commit messages and merge request descriptions.

2. Why agents can’t just “ignore bad instructions”

Simon Willison, who coined the term, puts the core problem simply: LLMs follow instructions in content, and they can’t reliably tell your instructions apart from ones that arrived in an email or web page — everything ends up in the same stream of tokens. You can tell the model not to obey embedded instructions, and that may reduce the odds, but it isn’t a guarantee.

Security groups and vendors agree. OWASP writes that it is unclear whether there are fool-proof methods of prevention. Anthropic, describing its browser-agent defenses, says prompt injection is “far from a solved problem” and that no browser agent is immune. Treat every defense below as reducing risk, not removing it.

3. The lethal trifecta

Willison’s most useful rule for anyone wiring tools together: be very careful when one agent combines all three of these —

With all three, an attacker can try to trick the agent into reading your data and sending it to them. An email tool is a good example of the risk: anyone can email your agent. His advice for people mixing tools, including MCP connectors, is to avoid combining all three in one agent.

4. Guardrails that actually help

These come from the OWASP LLM01 mitigations and the MCP specification:

5. What this looks like in agent tools

Cursor’s agent security docs describe defaults along these lines: terminal commands need approval unless you configure Run Modes, every MCP connection needs approval and each MCP tool call needs individual approval unless you allowlist it, and agents can’t make arbitrary network requests with default settings. Cursor describes its allowlists and Auto-review classifier as best-effort guardrails rather than a hard security boundary, and recommends keeping the defaults enabled.

For a small fleet, the practical pattern is: let agents read and draft freely, but keep a human approval step in front of anything that sends, posts, deletes, pays, or shares. A one-job bot helps here too — a narrow job needs fewer tools, which makes the trifecta easier to avoid.

6. A quick safety checklist

Useful public resources

OWASP — LLM01:2025 Prompt Injection

The standard definition of direct and indirect injection, example scenarios, and seven mitigation strategies.

OWASP Cheat Sheet — LLM Prompt Injection Prevention

Attack patterns (hidden text, encoding, agent-specific attacks) and a development-to-operations checklist.

Simon Willison — The lethal trifecta for AI agents

Private data + untrusted content + external communication, and why mixing tools makes it easy to hit all three.

Model Context Protocol — Tools specification

Human-in-the-loop expectations for tool calls, plus security considerations for servers and clients.

Model Context Protocol — Security best practices

Scope minimization, local server risks, and consent requirements when adding connectors.

Cursor docs — Agent security

Default approvals for terminal commands and MCP tool calls, network limits, and workspace trust.

Anthropic — Mitigating prompt injections in browser use

Why browsing agents face a large attack surface, and how training, classifiers, and red teaming help without solving it.