An agent crosses several trust boundaries: user input, retrieved documents, web pages, tool results, memory, model output, and external side effects. Any text channel can carry adversarial instructions. Prompt injection is therefore a confused-deputy problem, not merely a bad phrase that one perfect system prompt can block.
List protected assets, attacker capabilities, entry points, privileged actions, and failure impact. Separate instruction sources from data sources in the application architecture. The model may interpret both, but policy code should know which channel is authoritative.
Security controls should be layered: input and content scanning, context minimization, tool allowlists, authorization, schema validation, sandboxing, approvals, output checks, monitoring, and incident response. No single classifier is a complete defense.