Defining Agent Instruction Injection
Agent instruction injection is a class of attack in which content that an AI agent treats as data, such as a retrieved web page, a document, an API response, or a message from another agent, is crafted to contain instructions that the agent then follows. Unlike a direct prompt from a user, this content enters the agent's context indirectly, which makes it harder to distinguish from legitimate input during planning and execution.
How It Differs From Traditional Prompt Injection
Traditional prompt injection typically targets a single conversational turn, aiming to change what a language model says in response to a user. Agent instruction injection targets the behavior of a system that plans, selects tools, and executes actions across multiple steps. Because agents often carry context forward from one step to the next, an injected instruction can persist through a workflow and influence decisions that occur well after the point where the malicious content was first introduced. The consequence is not limited to altered text; it can include unauthorized tool calls, unintended data access, or actions taken on external systems.
Detecting Instruction Injection at Runtime
Because injected instructions are embedded in otherwise normal-looking content, detection tends to focus on the agent's behavior rather than solely on inspecting inputs. Useful signals include unexpected tool selection relative to the assigned task, tool calls that request permissions beyond what a task requires, sudden changes in planning direction immediately following ingestion of external content, and anomalous message patterns between cooperating agents in a multi-agent system.
Governance Implications
Because instruction injection can originate from data sources that were never directly authored by a user, prevention cannot rely solely on filtering user input. Effective governance treats every external data source, including tool responses and inter-agent messages, as a potential trust boundary that requires validation. This shifts part of the security burden from prompt-level filtering toward runtime policy enforcement, permissioning, and monitoring of agent actions as they occur.