Untrusted text is not instructions
Agents read web pages, emails, tickets, PDFs, and tool outputs. Those texts may contain instructions aimed at the agent: ignore your rules, exfiltrate secrets, call a dangerous tool. Treat external text as data, not authority.
Prompt injection defense is layered: separate trusted instructions from untrusted content, constrain tools, validate arguments, redact secrets, require approval for sensitive actions, and log everything.
Tool outputs can attack too
A web page can tell the model to reveal credentials. A retrieved document can say to delete files. A code comment can ask the agent to modify tests. If it came from outside the trusted instruction channel, it is evidence, not command.
Security is a boundary problem. The model may read hostile text; the executor must prevent hostile effects.