A framework to classify, attack, and guard against safety risks in long-running LLM agent tasks. Small guardrail models (0.8B–9B) match or beat GPT-6.1-Sol on safety evaluation at up to 100× lower latency, and a recursive self-improvement loop cuts attack success rates.
Trajectory-level binary safety evaluation across benchmarks. Green shading marks the top five entries per column outside the closed-source group, with boldface indicating first place. | R-Judge | ATBench | ATBench-Pro | Overall Model | Acc (uparrow) | F1 (uparrow) | Acc (uparrow) | F1 (uparrow) | Acc (uparrow) | F1 (uparrow) | Acc (uparrow) | F1 (uparrow) Closed-Source Models GPT-6.1-Sol | 94.9 | 95.0 | 78.0 | 77.5 | 62.7 | 67.8 | 78.5 | 80.1 Gemini-3.8-Flash | 91.7 | 92.6 | 59.2 | 53.1 | 76.3 | 66.8 | 75.7 | 70.8 Open-Weight Models DeepSeek-V4.1-Flash | 81.4 | 80.9 | 66.1 | 63.7 | 82.2 | 79.2 | 76.6 | 74.6 GLM-5.3 | 87.9 | 88.2 | 76.6 | 71.5 | 83.4 | 75.1 | 82.6 | 78.3 Qwen3.5-397B | 85.6 | 87.4 | 66.8 | 67.8 | 68.6 | 37.1 | 73.7 | 64.1 Qwen3.8-27B | 93.4 | 93.5 | 71.3 | 61.8 | 77.1 | 61.6 | 80.6 | 72.3 Qwen3.5-9B | 77.0 | 80.3 | 62.7 | 53.9 | 61.8 | 17.2 | 67.2 | 50.5 Llama-3.1-8B | 53.7 | 69.5 | 45.3 | 61.9 | 39.5 | 27.1 | 46.2 | 52.8 Qwen3.5-4B | 81.0 | 82.0 | 45.9 | 27.6 | 57.6 | 12.1 | 61.5 | 40.6 Guard Models LlamaGuard3-8B | 61.2 | 56.7 | 53.1 | 7.3 | 59.9 | 0.0 | 58.1 | 21.3 Qwen3Guard-8B | 40.6 | 9.0 | 51.5 | 0.8 | 59.6 | 0.0 | 50.6 | 3.3 ShieldAgent-7B | 81.0 | 84.6 | 62.5 | 67.7 | 17.9 | 7.5 | 53.8 | 53.3 StepGuard-4B | 87.1 | 87.9 | 77.7 | 76.8 | 67.3 | 60.1 | 77.4 | 74.9 StepSafe-4B | 84.6 | 85.2 | 69.9 | 59.7 | 61.1 | 13.4 | 71.9 | 52.8 BraveGuard-4B | 75.5 | 75.5 | 55.0 | 22.5 | 59.9 | 0.5 | 63.5 | 32.8 AgentDoG1.5 AgentDoG1.5-U 0.8B | 81.2 | 80.2 | 61.0 | 62.6 | 65.6 | 61.0 | 69.3 | 67.9 AgentDoG1.5-U 2B | 78.4 | 80.9 | 76.8 | 76.9 | 53.0 | 57.6 | 69.4 | 71.8 AgentDoG1.5-U 4B | 90.4 | 90.6 | 78.4 | 76.1 | 72.1 | 66.9 | 80.3 | 77.9 AgentDoG1.5-U 8B | 86.9 | 86.3 | 77.3 | 75.6 | 66.9 | 62.2 | 77.0 | 74.7 AgentDoG1.5-U 9B | 81.4 | 83.4 | 78.1 | 78.0 | 72.9 | 71.4 | 77.5 | 77.6 AgentDoG2 AgentDoG2 0.8B | 76.6 | 71.7 | 76.3 | 76.1 | 75.4 | 58.6 | 76.1 | 68.8 AgentDoG2 2B | 80.1 | 79.9 | 80.3 | 81.7 | 78.3 | 69.4 | 79.6 | 77.0 AgentDoG2 4B | 83.3 | 83.3 | 78.1 | 76.7 | 80.3 | 69.7 | 80.6 | 76.6 AgentDoG2 8B | 78.4 | 74.5 | 73.5 | 75.3 | 81.0 | 71.8 | 77.6 | 73.9 AgentDoG2 9B | 88.8 | 88.8 | 77.5 | 76.3 | 78.4 | 64.2 | 81.6 | 76.4
Pre-execution step-level safety evaluation across three benchmarks. Green shading marks the top three entries per column outside the closed-source group, including ties. Boldface indicates first place. Model | TS-Bench-Dojo | TS-Bench-ASB | StepShield | Overall | Acc uparrow | F1 uparrow | WCR uparrow | Acc uparrow | F1 uparrow | WCR uparrow | Acc uparrow | F1 uparrow | WCR uparrow | Acc uparrow | F1 uparrow | WCR uparrow Closed-Source Models GPT-6.1-Sol | 96.9 | 94.9 | 96.4 | 69.2 | 55.0 | 66.3 | 85.4 | 35.5 | 84.9 | 83.8 | 61.8 | 82.5 Gemini-3.8-Flash | 97.7 | 97.0 | 97.7 | 91.0 | 87.4 | 87.8 | 95.9 | 71.6 | 94.4 | 94.9 | 85.4 | 93.3 Open-Weight Models DeepSeek-V4.1-Flash | 97.7 | 96.1 | 97.5 | 82.5 | 73.2 | 81.8 | 90.7 | 46.2 | 90.3 | 90.3 | 71.8 | 89.8 GLM-5.3 | 97.1 | 95.2 | 96.8 | 83.7 | 73.9 | 81.4 | 94.6 | 59.8 | 94.4 | 91.8 | 76.3 | 90.9 Qwen3.5-397B | 91.6 | 87.3 | 88.6 | 76.2 | 64.9 | 75.8 | 95.6 | 64.9 | 95.5 | 87.8 | 72.3 | 86.6 Qwen3.8-27B | 95.5 | 92.7 | 94.2 | 78.4 | 64.1 | 67.9 | 96.1 | 67.3 | 96.0 | 90.0 | 74.7 | 86.0 Qwen3.5-9B | 86.8 | 74.5 | 65.6 | 76.8 | 59.2 | 58.1 | 95.2 | 62.6 | 95.2 | 86.3 | 65.5 | 73.0 Llama-3.1-8B | 70.9 | 65.0 | 54.3 | 66.7 | 32.4 | 23.4 | 84.9 | 70.1 | 75.9 | 74.2 | 55.8 | 51.2 Qwen3.5-4B | 86.9 | 77.7 | 79.0 | 77.0 | 63.5 | 70.7 | 90.5 | 45.3 | 90.2 | 84.8 | 62.2 | 80.0 Guard Models Qwen3Guard-8B | 71.2 | 00.0 | 00.0 | 73.2 | 13.1 | 07.0 | 98.3 | 73.7 | 58.3 | 80.9 | 28.9 | 21.8 LlamaGuard3-8B | 77.5 | 43.5 | 30.1 | 73.4 | 41.9 | 33.8 | 97.9 | 64.6 | 48.2 | 82.9 | 50.0 | 37.3 StepGuard-4B | 96.2 | 93.7 | 94.9 | 84.9 | 66.4 | 52.4 | 99.1 | 89.8 | 98.2 | 93.4 | 83.3 | 81.8 StepSafe-4B | 92.2 | 86.5 | 86.6 | 73.4 | 30.4 | 20.4 | 98.2 | 81.1 | 95.4 | 88.0 | 66.0 | 67.5 BraveGuard-4B | 75.2 | 68.8 | 67.2 | 77.2 | 50.5 | 41.1 | 82.2 | 31.1 | 81.5 | 78.2 | 50.1 | 63.2 Our Models AgentDoG-Step 0.8B | 88.0 | 82.1 | 84.9 | 80.4 | 65.6 | 66.0 | 96.5 | 65.7 | 82.4 | 88.3 | 71.1 | 77.8 AgentDoG-Step 2B | 95.6 | 92.6 | 95.4 | 86.6 | 75.6 | 73.3 | 98.0 | 78.2 | 89.8 | 93.4 | 82.2 | 86.2 AgentDoG-Step 4B | 96.2 | 93.6 | 95.9 | 89.1 | 82.1 | 87.9 | 98.8 | 86.9 | 98.2 | 94.7 | 87.5 | 94.0 AgentDoG-Step 8B | 95.8 | 93.0 | 95.7 | 88.5 | 78.8 | 74.9 | 96.8 | 70.6 | 94.4 | 93.7 | 80.8 | 88.4 AgentDoG-Step 9B | 96.5 | 94.1 | 96.1 | 83.3 | 72.0 | 75.7 | 98.8 | 87.4 | 98.8 | 92.9 | 84.5 | 90.2
Going deeper

Imagine a robot assistant that runs your errands all day: it books flights, files reports, and handles emails. The longer it works unsupervised, the easier it is for a subtle trick buried in one email to gradually steer the robot off course without you noticing, like someone slowly turning your car's steering wheel while you look at the road.
This paper builds three security guards of different speeds. The first reads the robot's full work log and flags problems with no extra thinking aloud, making it much faster. The second is an instant scanner that checks just one token and gives a yes-or-no in a single glance. The third stands at the door and inspects every action before the robot carries it out, catching bad moves before they happen.
To test these guards, the authors also play the villain: they design sneaky multi-step tricks that redirect the robot's goal without obvious signs. Then they set up a training loop where the guards and the robot learn together from each attack, getting tougher each round. The catch is that all of this happens on synthetic errands the authors created themselves, not on real robots running real errands for real people.
The abstract, word for word, with the seven densest phrases unpacked.
Recent large language model (LLM) agents exhibit promising capabilities on complex long-horizon tasks yet introduce more challenging and covert safety risks1. In this work, we propose an efficient framework for characterizing, evaluating, and mitigating these risks in long-horizon agent tasks. Specifically, we update the agentic safety taxonomy to accommodate emergent risks from long-horizon execution scenarios with ATBench-Pro2. We further develop ManipulationArena3 and introduce goal manipulation attack methods, which frequently occur in long-horizon agent tasks. To identify these risks more efficiently, we train AgentDoG2, AgentDoG-Jev, and AgentDoG-Step4 (0.8B, 2B, 4B, 8B, and 9B parameters) for trajectory- and step-level safety evaluation, outperforming closed-source models (e.g., GPT-6.1-Sol)5 with almost 100× speedup6 compared to AgentDoG1.5. Finally, we explore a preliminary safe agentic recursive self-improvement method7 with AgentDoG for auto-alignment. Extensive experimental results indicate that the AgentDoG2 family and the proposed attack method achieve state-of-the-art performance in diverse and complex long-horizon agentic scenarios. All models and datasets are openly released. Figure 1: Average inference cost, efficiency, and performance of AgentDoG2 vs. frontier and guardrail models. (a) Illustration of unsafe F1 and API cost on ATBench. We prioritize official API prices and use DeepInfra or OpenRouter rates for the base models of small open-source models and their derivatives. (b) Inference latency and relative speedups for AgentDoG variants on ATBench binary safety evaluation. (c) Performance comparison on ATBench fine-grained safety evaluation.
Two lines converge: agent safety evaluation and efficient guard models.
Read four parts, in this order.
Skip Appendix A unless you need taxonomy sub-labels, prompt templates, or pricing details.
If the gains are smaller than they look, these places show why.
| Benchmark | Cases | Avg. Turns | Avg. Tool Calls | Avg. Tokens |
| R-Judge (Yuan et al., 2024) | 564 | 5.41 | 1.79 | 0.47k |
| ASSE-Safety (Luo et al., 2025) | 1,476 | 5.01 | 1.49 | 0.47k |
| ASSE-Security (Luo et al., 2025) | 817 | 5.75 | 1.62 | 0.78k |
| ATBench500 (Li et al., 2026e) | 500 | 8.97 | 3.49 | 1.52k |
| ATBench (Li et al., 2026e) | 1,000 | 9.01 | 2.97 | 3.95k |
| HINTBench (v2) (Wang et al., 2026b) | 596 | 22.16† | 6.92† | 4.78k† |
| ATBench-Pro (Ours) | 1,000 | 95.09 | 48.98 | 57.51k |
Attack evaluation on ManipulationArena: ASR (%, lower is better) per attack strategy. Column abbreviations follow the seven strategies of Figure 5. Harness | Policy model | Role-play | Decomp. | Sleeper | Criteria | Self- preservation | Oversight Evasion | Obstruction | Average Closed-Source Agents Claude Code | Opus 5.5 | 51.80% | 51.45% | 36.64% | 52.55% | 44.19% | 24.47% | 66.67% | 46.82% Codex | GPT-6.1-Sol | 44.60% | 59.42% | 48.85% | 62.04% | 84.50% | 41.49% | 38.33% | 54.18% Open-Source Agents DeepSeek Harness | DeepSeek-V4.1-Flash | 82.01% | 83.33% | 78.63% | 82.48% | 74.42% | 56.38% | 63.33% | 74.37% KimiCode | Kimi-3.1-Pro | 67.63% | 71.01% | 64.12% | 69.34% | 94.57% | 73.40% | 47.50% | 69.65% ZCode | GLM-5.3 | 58.27% | 63.04% | 50.38% | 68.61% | 72.87% | 51.06% | 50.00% | 59.18% DeepSeek Harness | Qwen3.8-27B | 64.03% | 67.39% | 65.65% | 72.26% | 75.19% | 63.83% | 52.50% | 65.84%
| R-Judge | ATBench | ATBench-Pro | Overall | |||||
| Model | Acc () | F1 () | Acc () | F1 () | Acc () | F1 () | Acc () | F1 () |
| Closed-Source Models | ||||||||
| GPT-6.1-Sol | 94.9 | 95.0 | 78.0 | 77.5 | 62.7 | 67.8 | 78.5 | 80.1 |
| Gemini-3.8-Flash | 91.7 | 92.6 | 59.2 | 53.1 | 76.3 | 66.8 | 75.7 | 70.8 |
| Open-Weight Models | ||||||||
| DeepSeek-V4.1-Flash | 81.4 | 80.9 | 66.1 | 63.7 | 82.2 | 79.2 | 76.6 | 74.6 |
| GLM-5.3 | 87.9 | 88.2 | 76.6 | 71.5 | 83.4 | 75.1 | 82.6 | 78.3 |
| Qwen3.5-397B | 85.6 | 87.4 | 66.8 | 67.8 | 68.6 | 37.1 | 73.7 | 64.1 |
| Qwen3.8-27B | 93.4 | 93.5 | 71.3 | 61.8 | 77.1 | 61.6 | 80.6 | 72.3 |
| Qwen3.5-9B | 77.0 | 80.3 | 62.7 | 53.9 | 61.8 | 17.2 | 67.2 | 50.5 |
| Llama-3.1-8B | 53.7 | 69.5 | 45.3 | 61.9 | 39.5 | 27.1 | 46.2 | 52.8 |
| Qwen3.5-4B | 81.0 | 82.0 | 45.9 | 27.6 | 57.6 | 12.1 | 61.5 | 40.6 |
| Guard Models | ||||||||
| LlamaGuard3-8B | 61.2 | 56.7 | 53.1 | 7.3 | 59.9 | 0.0 | 58.1 | 21.3 |
| Qwen3Guard-8B | 40.6 | 9.0 | 51.5 | 0.8 | 59.6 | 0.0 | 50.6 | 3.3 |
| ShieldAgent-7B | 81.0 | 84.6 | 62.5 | 67.7 | 17.9 | 7.5 | 53.8 | 53.3 |
| StepGuard-4B | 87.1 | 87.9 | 77.7 | 76.8 | 67.3 | 60.1 | 77.4 | 74.9 |
| StepSafe-4B | 84.6 | 85.2 | 69.9 | 59.7 | 61.1 | 13.4 | 71.9 | 52.8 |
| BraveGuard-4B | 75.5 | 75.5 | 55.0 | 22.5 | 59.9 | 0.5 | 63.5 | 32.8 |
| AgentDoG1.5 | ||||||||
| AgentDoG1.5-U 0.8B | 81.2 | 80.2 | 61.0 | 62.6 | 65.6 | 61.0 | 69.3 | 67.9 |
| AgentDoG1.5-U 2B | 78.4 | 80.9 | 76.8 | 76.9 | 53.0 | 57.6 | 69.4 | 71.8 |
| AgentDoG1.5-U 4B | 90.4 | 90.6 | 78.4 | 76.1 | 72.1 | 66.9 | 80.3 | 77.9 |
| AgentDoG1.5-U 8B | 86.9 | 86.3 | 77.3 | 75.6 | 66.9 | 62.2 | 77.0 | 74.7 |
| AgentDoG1.5-U 9B | 81.4 | 83.4 | 78.1 | 78.0 | 72.9 | 71.4 | 77.5 | 77.6 |
| AgentDoG2 | ||||||||
| AgentDoG2 0.8B | 76.6 | 71.7 | 76.3 | 76.1 | 75.4 | 58.6 | 76.1 | 68.8 |
| AgentDoG2 2B | 80.1 | 79.9 | 80.3 | 81.7 | 78.3 | 69.4 | 79.6 | 77.0 |
| AgentDoG2 4B | 83.3 | 83.3 | 78.1 | 76.7 | 80.3 | 69.7 | 80.6 | 76.6 |
| AgentDoG2 8B | 78.4 | 74.5 | 73.5 | 75.3 | 81.0 | 71.8 | 77.6 | 73.9 |
| AgentDoG2 9B | 88.8 | 88.8 | 77.5 | 76.3 | 78.4 | 64.2 | 81.6 | 76.4 |
Nothing on this page was recomputed. Every claim points to the paper so you can check it.
More latest news
Read all