Large language model agents increasingly rely on external resources to complete complex tasks, but this exposes them to indirect prompt injection (IPI). In such attacks, malicious instructions hidden in external content can redirect an agent away from the user's original goal and toward the attacker's intended objective.

AgentTracer, introduced in a new arXiv paper, addresses this problem by tracing IPI through fine-grained intention-execution alignment. Rather than simply filtering prompts, the framework compares what the agent intends to do with what it actually executes, seeking discrepancies that reveal injected instructions.

The work highlights a growing challenge in agent security: as LLM agents gain access to tools and external data, the boundary between benign and malicious instructions becomes harder to draw. AgentTracer offers a structured way to expose that boundary and detect when an agent has been covertly steered off course.