Prompt injection is an attack that hides instructions in text an AI model reads, so that the model follows the attacker instead of its user. The text may be typed directly by a user or, more subtly, hidden in content the model is asked to process, such as a web page, an email, a document or a tool result. Models can struggle to tell instructions from data.

The risk rises sharply when the model is an agent that can take actions. A hijacked agent may send data somewhere, change records or run commands using whatever access it has, so the harm depends less on the model's answer and more on what it is allowed to do.

There is currently no complete fix. Filters and prompt wording can reduce the success rate, but determined attackers can often find a way around them, so defenses should assume some attacks will get through.

The most reliable approach is to limit what a compromised agent can reach. Give it only the permissions the task needs, keep untrusted content separate from trusted instructions where possible, require human approval for consequential actions, restrict where it can send data and log its inputs and actions so abuse can be investigated.