mlsanityData to 7 Oct 2026

AgentSentry: Mitigating Indirect Prompt Injection in LLM Agents via Temporal Causal Diagnostics and Context Purification

arXiv 2602.22724 ↗First posted 26 Feb 2026cs.CR cs.AIcited by 28

On the map: LLM agents and tool use → Agent threats, guardrails and governance

also in 1 more
Abstract (arXiv)

Large language model (LLM) agents increasingly rely on external tools and retrieval systems to autonomously complete complex tasks. However, this design exposes agents to indirect prompt injection (IPI), where attacker-controlled context embedded in tool outputs or retrieved content silently steers agent actions away from user intent. Unlike prompt-based attacks, IPI unfolds over multi-turn trajectories, making malicious control difficult to disentangle from legitimate task execution. Existing inference-time defenses primarily rely on heuristic detection and conservative blocking of high-risk actions, which can prematurely terminate workflows or broadly suppress tool usage under ambiguous multi-turn scenarios. We propose AgentSentry, a novel inference-time detection and mitigation framework for tool-augmented LLM agents. To the best of our knowledge, AgentSentry is the first inference-time defense to model multi-turn IPI as a temporal causal takeover. It localizes takeover points via controlled counterfactual re-executions at tool-return boundaries and enables safe continuation through causally guided context purification that removes attack-induced deviations while preserving task-relevant evidence. We evaluate AgentSentry on the textscAgentDojo benchmark across four task suites, three IPI attack families, and multiple black-box LLMs. AgentSentry eliminates successful attacks and maintains strong utility under attack, achieving an average Utility Under Attack (UA) of 74.55 %, improving UA by 20.8 to 33.6 percentage points over the strongest baselines without degrading benign performance.

Key facts. Cited by 28 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 21 of its 60 references that are in the map. First posted on arXiv 26 Feb 2026.

Builds on

21 of 60 references.

Closest ancestors · 8

Same direction, newest first

  1. 2025AgentSentinel: An End-to-End and Real-Time Security Defense Framework for Computer-Use Agents9 Sep
  2. 2025Adaptive Attacks Break Defenses Against Indirect Prompt Injection Attacks on LLM Agents27 Feb
  3. 2025AgentGuard: Repurposing Agentic Orchestrator for Safety Evaluation of Tool Orchestration13 Feb
  4. 2025MELON: Provable Defense Against Indirect Prompt Injection Attacks in AI Agents7 Feb
  5. 2024The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agents21 Dec
  6. 2024Imprompter: Tricking LLM Agents into Improper Tool Use19 Oct
  7. 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents3 Oct
  8. 2024EIA: Environmental Injection Attack on Generalist Web Agents for Privacy Leakage17 Sep

Other references · 13

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  3. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
  4. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
  5. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
  6. 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructionscited by 441
  7. 2024StruQ: Defending Against Prompt Injection with Structured Queriescited by 325
  8. 2023Jailbreak in pieces: Compositional Adversarial Attacks on Multi-Modal Language Modelscited by 260
  9. 2022MRKL Systems: A modular, neuro-symbolic architecture that combines large language models, external knowledge sources and discrete reasoningcited by 153
  10. 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Gamecited by 135
  11. 2024PLeak: Prompt Leaking Attacks against Large Language Model Applicationscited by 113
  12. 2025Prompt Injection Detection and Mitigation via AI Multi-Agent NLP Frameworkscited by 14
1 more
  1. 2024Palisade -- Prompt Injection Detection Frameworkcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 28.

28 papers.

Sort:

By area:

  1. 2026SafeHarness: Lifecycle-Integrated Security Architecture for LLM-based Agent Deploymentcited by 14
  2. 2026VIGIL: Runtime Enforcement of Behavioral Specifications in AI Agent Skillscited by 8
  3. 2026FlowSteer: Prompt-Only Workflow Steering Exposes Planning-Time Vulnerabilities in Multi-Agent LLM Systemscited by 7
  4. 2026Structured Security Auditing and Robustness Enhancement for Untrusted Agent Skillscited by 6
  5. 2026Assessing Automated Prompt Injection Attacks in Agentic Environmentscited by 5
  6. 2026Toward Secure LLM Agents: Threat Surfaces, Attacks, Defenses, and Evaluationcited by 5
  7. 2026From Prompt Injection to Persistent Control: Defending Agentic Harness Against Trojan Backdoorscited by 3
  8. 2026Intent-Governed Tool Authorization for AI Agentscited by 3
  9. 2026Trust No Tool: Evaluating and Defending LLM Agents under Untrusted Tool Feedbackcited by 2
  10. 2026Agent Hacks Agent: Autoresearch for Production-Agent Red-Teamingcited by 2
  11. 2026Causality Laundering: Denial-Feedback Leakage in Tool-Calling LLM Agentscited by 1
  12. 2026When Routine Chats Turn Toxic: Unintended Long-Term State Poisoning in Personalized Agentscited by 1
16 more
  1. 2026ASPI: Seeking Ambiguity Clarification Amplifies Prompt Injection Vulnerability in LLM Agentscited by 1
  2. 2026PI-Hunter: Automated Red-Teaming for Exposing and Localizing Prompt Injectionscited by 1
  3. 2026What Intermediate Layers Know: Detecting Jailbreaks from Entropy Dynamicscited by 1
  4. 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directionscited by 1
  5. 2026ToolGuardian: Declarative Security for AI Agent-Tool Interactionscited by 1
  6. 2026Beyond Pattern Matching: Seven Cross-Domain Techniques for Prompt Injection Detectioncited by 0
  7. 2026An Empirical Study of Privacy Leakage Chains via Prompt Injection in Black-Box Chatbot Environmentscited by 0
  8. 2026GIF: Locally Sound Geometric Information Flow Control for LLMscited by 0
  9. 2026Cross-Agent Campaign Attribution: Linking Asynchronous Attacks Across LLM Agentscited by 0
  10. 2026Why Formal Monitors Fail: Attack Distribution Entropy as a Coverage Bound for LTL-Based LLM Agent Safetycited by 0
  11. 2026Persistent Semantic Entities in Tool-Augmented LLM Systemscited by 0
  12. 2026Counterfactual Sensitivity Is Not Repairability: Auditing Replay Probes for Video Evidencecited by 0
  13. 2026Influence Is Not Authority: When Causal Guardrail Signals Make Legitimate Tool Use Look Like an Attack in Tool-Using LLM Agentscited by 0
  14. 2026OpenAgentFlow: Enabling System-Wide Safety Boundaries for Heterogeneous AI Agent Fleetscited by 0
  15. 2026ActGuard: Pre-execution Action Auditing against Indirect Prompt Injection in LLM Agentscited by 0
  16. 2026ChronosAttack: Adversarial Tool Scheduling Attacks on LLM Agentscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026ARGUS: Defending LLM Agents Against Context-Aware Prompt Injection
  2. 2025SIEVE: Selective Integrity Verification and Escalation for Defending LLM Agents against Indirect Prompt Injection
  3. 2025IPIGuard: A Novel Tool Dependency Graph-Based Defense Against Indirect Prompt Injection in LLM Agents
  4. 2025MemoryGraft: Persistent Compromise of LLM Agents via Poisoned Experience Retrieval
  5. 2026AttriGuard: Defeating Indirect Prompt Injection in LLM Agents via Causal Attribution of Tool Invocations
  6. 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis
  7. 2026AgentAbstain: Do LLM Agents Know When Not to Act?
  8. 2026Universal Defenses for Tool-Integrated LLM Agents Against Adversarial Attacks