AgentWatcher detects prompt injections in long LLM contexts using rule-based monitoring
AgentWatcher can effectively detect prompt injection attacks while preserving agent utility
Security & privacy arXiv 1 Apr 2026 Method Prototype evidence
Published as “AgentWatcher: A Rule-based Prompt Injection Monitor”
Why it matters
Provides a more explainable and scalable detection layer for LLM agents, allowing deployment with near-zero attack success while preserving most task performance.
Summary
AgentWatcher reduces prompt-injection attack success rate to ≤1% on the AgentDojo benchmark while incurring only about 2% utility loss, and across all evaluated agent and long-context datasets keeps ASR at most 10% with the best utility-ASR trade-off among nine baselines. The evidence comes from tables showing ASR of 0.01% and utility of 0.71, and a claim that it is the only method consistently achieving ≤10% ASR.
What they found 2
- ASR reduced to 0.01% on AgentDojo with utility 0.71
“AgentWatcher (ours) 0.71 0.01 0.0”
- Only method that consistently keeps ASR ≤10% across all settings
“AgentWatcher is the only method that consistently reduces ASR to at most 10% across all settings.”
Caveats 4
- AgentWatcher incurs a higher computational cost (8.2s per detection)
- maintaining low utility loss (≤4%)
- The computational time of AgentWatcher is non-negligible (e.g., around 10 seconds) due to the reasoning process.
- The trajectory length can grow large in complex agent tasks.
What’s new here 4
- Uses context attribution to focus detection on a short, causally influential text segment, enabling scalability to long contexts.
- Applies explicit, customizable rule-based reasoning via a monitor LLM for explainable detection decisions.
- Demonstrates consistent low ASR across multiple agent backbones and long-context datasets.
- Explores automatic generation of detection rules with comparable performance to hand-crafted rules.