Don't let what it reads become an instruction
Prompt injection can make an agent trust adversarial text inside the web pages or documents it processes and drift from its original purpose. Treat external text as data, and separate system instructions from tool permissions.
Don't rely on a single layer of filtering
A model's refusal alone is not enough. Layer least privilege, approval for risky actions, limits on sensitive tool results, and monitoring so that if one defense fails, the damage is contained.
Match approval points to the impact of the action
A simple lookup and an external send, post, or deletion are not the same level of permission. Require human confirmation for actions that are hard to undo, and record why the agent wants to run them and what the target is.
Official resources: Anthropic prompt-injection defenses · Trustworthy agents in practice