Summary (Overview)
-
Lightweight Agent Safety Alignment Framework: The paper introduces AgentDoG 1.5, a lightweight and scalable framework for AI agent safety and security, featuring models ranging from 0.8B to 8B parameters that achieve performance comparable to leading closed-source models like GPT-5.4 and Gemini-3.1-Pro.
-
Updated Safety Taxonomy and ATBench Family: The authors extend the original three-dimensional safety taxonomy (risk source, failure mode, real-world harm) to accommodate emergent risks from Codex and OpenClaw execution scenarios, creating ATBench-Claw and ATBench-Codex benchmarks.
-
Extreme Data Efficiency: Using only ~1k training samples (purified via influence-function-based data selection), AgentDoG 1.5 achieves state-of-the-art performance in trajectory-level safety evaluation and fine-grained risk diagnosis across diverse agentic scenarios.
-
Scalable Training Environment: A finite-state simulation-based training environment reduces deployment overhead to 1/100 of Docker-level environments, supporting over 10,000 concurrent agentic environments on a standard 8-core machine.
-
Training-Free Online Guardrail: AgentDoG 1.5 is deployed as a real-time safety moderation guardrail for OpenClaw agents, auditing execution trajectories before final response delivery with low latency and minimal overhead.
Introduction and Theoretical Foundation
Background and Motivation
Large language models (LLMs) have driven rapid development of agentic AI systems deployed in research assistance, software engineering, information retrieval, and workflow automation. Modern open-world agents like OpenClaw and Hermes significantly improve cross-application environmental interaction and execution capabilities, but introduce substantial under-explored risk surfaces due to their near-infinite action spaces. Concurrently, frontier AI models drastically lower the technical barriers to adversarial attacks on agentic systems.
Theoretical Foundation
The framework builds on the AgentDoG and ATBench prior work, which decompose trajectory-level safety diagnosis into three dimensions:
- Risk Source – where the risk enters (user instructions, tool descriptions, environment observations, persistent state, runtime feedback, repository artifacts, or agent reasoning)
- Failure Mode – how the agent fails (incorrect tool calls, over-privileged actions, missing validation, unsafe command executions, unverified success claims)
- Real-world Harm – what consequences follow (privacy leakage, system-integrity damage, financial loss, physical/psychological/reputational/governance harm)
The key insight is that a flat label space conflates these aspects, making interpretable diagnosis difficult. The framework preserves the three-dimensional decomposition while customizing leaf categories for new execution settings through two operations: adding new leaf categories and strengthening inherited categories.
Methodology
Safety Taxonomy and Benchmark Construction
Taxonomy Design: The framework keeps the three high-level dimensions fixed while customizing leaf categories per execution setting. ATBench-Claw focuses on sessions, approvals, cross-tool execution, channel routing, and unattended automation. ATBench-Codex focuses on repository artifacts, command execution, dependency/MCP interactions, workspace mutation, and verification claims.
Benchmark Instances:
- ATBench: 1,000 audited trajectories (503 safe, 497 unsafe), 2,084 available tools, averaging 9.01 turns and 3.95k tokens per trajectory
- ATBench-Claw: 500 trajectories (204 safe, 296 unsafe), averaging 13.09 message events per trajectory
- ATBench-Codex: 500 trajectories (250 safe, 250 unsafe), with an average conversation length of 7.51 turns and rollout of 21.80 events
Data Engine and Purification
Taxonomy-Guided Data Collection (three stages):
- Planning: Sample a risk configuration tuple (one category from each dimension), determine safety outcome, and produce a trajectory sketch
- Trajectory Synthesis: Instantiate sketches into complete multi-turn interactions with user messages, agent responses, tool calls, and environment feedback
- Automatic Validation: Dual-layer quality control (rule checker for structural validity, model checker for semantic quality)
Influence-Function-Based Data Purification: The raw SFT pool is filtered using a preference-aware influence function method. The guardrail direction is computed as:
where is the preference weight (normalized likelihood of target-positive response), and examples are scored by their alignment with this direction:
The highest-scoring examples (~1k) form the purified dataset.
Training Pipeline
Two-Stage Training:
- Supervised Fine-Tuning (SFT): Minimize the negative log-likelihood objective on the purified CoT-augmented dataset:
- Reinforcement Learning (RL): Using Group Reward-Decoupled Normalization Policy Optimization (GDPO) to preserve multi-dimensional reward signals (failure mode, real-world harm, risk source) with weights
Empirical Validation / Results
Trajectory-Level Safety Evaluation
AgentDoG 1.5-4B achieves the best overall performance among open-source and guard models:
| Model | R-Judge Acc | R-Judge F1 | ATBench Acc | ATBench F1 |
|---|---|---|---|---|
| GPT-5.4 | 93.3 | 93.7 | 73.7 | 76.7 |
| Gemini-3.1-Pro | 97.3 | 97.4 | 75.5 | 75.0 |
| Qwen3.5-397B-A17B | 85.6 | 87.4 | 66.8 | 67.8 |
| LlamaGuard4-12B | 63.8 | 63.2 | 58.1 | 41.7 |
| AgentDoG 1.0-4B | 91.8 | 92.7 | 64.0 | 71.1 |
| AgentDoG 1.5-4B | 92.2 | 92.7 | 72.4 | 74.3 |
| AgentDoG 1.5-4B-U | 90.4 | 90.6 | 78.4 | 77.7 |
Key Findings:
- AgentDoG 1.5-4B improves ATBench accuracy by 8.4 points and F1 by 3.2 points over AgentDoG 1.0
- Even the 0.8B variant outperforms several larger general-purpose and guard models
- The unified variant (4B-U) achieves 84.4% accuracy on ATBench-Codex and 87.6% on ATBench-Claw
Fine-Grained Risk Diagnosis
AgentDoG 1.5-4B achieves the best overall performance across all compared models:
| Model | Risk Source | Failure Mode | Real-world Harm | Avg. |
|---|---|---|---|---|
| GPT-5.4 | 33.6 | 13.5 | 30.2 | 25.8 |
| Gemini-3.1-Pro | 24.8 | 12.6 | 18.5 | 18.6 |
| AgentDoG 1.0-4B | 46.8 | 16.5 | 40.6 | 34.6 |
| AgentDoG 1.5-4B | 75.2 | 27.5 | 62.9 | 55.2 |
AgentDoG 1.5-4B improves the average score by 20.6 points over AgentDoG 1.0-4B, substantially outperforming both open-source and closed-source frontier models.
Application 1: Agentic Safety SFT & RL
SFT with AgentDoG 1.5 Filtering (Table 4, key results with Qwen3.5-4B base):
| Setting | AgentHarm HS↓ | RR↑ | AgentSafetyBench SR↑ | AgentSecurityBench ASR↓ | BFCL↑ |
|---|---|---|---|---|---|
| Base | 57.49 | 28.41 | 34.37 | 90.39 | 76.04 |
| + Unfilt-Safe | 31.91 | 62.50 | 49.32 | 34.72 | 78.69 |
| + AgentDoG 1.5-Filt | 20.32 | 75.00 | 53.23 | 23.82 | 81.12 |
RL with AgentDoG 1.5 as Reward Model (Table 5, key results):
| Setting | AgentHarm HS↓ | RR↑ | AgentSafetyBench SR↑ | BFCL↑ |
|---|---|---|---|---|
| + SFT only | 20.32 | 75.00 | 53.23 | 81.12 |
| + RL only | 28.48 | 59.09 | 45.81 | 67.81 |
| + SFT + RL | 18.04 | 77.27 | 59.32 | 81.25 |
Scalability Results: The lightweight environment supports up to 10,000 concurrent environments with execution latency remaining stable under exponential workload growth, consuming less than 2.5 GB of peak memory.
Theoretical and Practical Implications
Theoretical Contributions
-
Extensible Safety Taxonomy: Demonstrates that a three-dimensional decomposition with customizable leaf categories can adapt to rapidly evolving agent execution settings without fragmenting into incompatible tasks, preserving cross-setting comparability at the level of risk source, failure mode, and real-world harm.
-
Data Efficiency Paradigm: Shows that influence-function-based data purification can reduce training data to ~1k samples while improving or maintaining quality, challenging the assumption that large-scale data is necessary for specialized safety models.
-
Fine-Grained Supervision Bonus: Discovery that fine-grained diagnostic reasoning supervision can improve coarse-grained trajectory-level judgment (the "bonus effect"), suggesting that learning structured risk identification provides useful intermediate representations for binary safety decisions.
Practical Implications
-
Deployment Accessibility: The tiny model variants (0.8B-4B) enable low-cost, low-latency deployment in real-world agent monitoring systems, making safety alignment accessible to organizations without frontier-scale compute.
-
Scalable Training Infrastructure: The finite-state simulation environment reduces deployment overhead by two orders of magnitude, enabling a standard 8-core machine to support over 10,000 concurrent agentic environments—critical for practical RL-based safety alignment.
-
Online Guardrail Architecture: The training-free guardrail system provides a practical mechanism for real-time safety moderation of OpenClaw agents, addressing the critical gap between offline safety evaluation and runtime deployment.
Conclusion
Main Takeaways
AgentDoG 1.5 presents a comprehensive lightweight and scalable alignment framework for AI agent safety, addressing the emerging threats from modern open-world agents. The framework's key innovations—an updated three-dimensional safety taxonomy, a taxonomy-guided data engine with influence-function purification, and a two-stage training pipeline—enable training compact models (0.8B-8B parameters) with only ~1k samples that achieve state-of-the-art performance in trajectory-level safety evaluation, fine-grained risk diagnosis, and cross-environment generalization.
The framework demonstrates practical utility through two applications: (1) agentic safety SFT and RL training where AgentDoG 1.5 serves as a data filter and reward model, and (2) a training-free online guardrail system for real-time safety moderation. The joint SFT + RL approach achieves the best safety-utility trade-off, reducing harm scores while preserving general task utility.
Limitations and Future Directions
The authors note that the unified coarse-to-fine model (AgentDoG 1.5-4B-U) was not systematically optimized for fine-grained diagnosis due to resource constraints, leaving this as future work. Additionally, as agent execution settings continue to evolve rapidly, the taxonomy will require ongoing extension, and the framework's adaptability to entirely new paradigms of agent interaction remains an open question. The authors release all models and datasets openly to support community development and further research.
Related papers
- How Do Agents Fail on AutoResearch: End-to-End Diagnostic Evaluation on 100 Real-World Frontier Research Tasks
Autonomous research agents fail across all models because they lack a metacognitive loop: they cannot check outputs against evidence, act on identified flaws, or question their methods.
- Meta$^n$: Recursive Self-Improvement through Emergent Depth
Metaⁿ achieves state-of-the-art results by recursively applying a fixed meta-operation to its own outputs, dissolving the stability-depth dilemma and enabling emergent higher-order reasoning that flat self-refinement cannot match.
- A Jagged Frontier: Evaluating Robustness of Code Agents to Semantics-Preserving Transformations
Repository-level code agents lose up to 6.7 points in resolution rate under semantics-preserving code perturbations, and robustness is a jagged frontier—jointly determined by model, scaffold, and workload, not the model alone.