Jev-Guard: Fast Routing and Auditing Agent Actions over Editable Policy Trees

Wenbin Hu, Huihao Jing, Haochen Shi, Yuxuan Liu, Changxuan Fan, Sirui Zhang, Kawai Chung, Hanyu Yang, Zhenhuan Wang, Ziyi Chen, Haoran Li, Yangqiu SongarXiv 2026

TL;DR

Jev-Guard is a high-speed, 2B-parameter guardrail model designed to audit AI agent actions against complex, editable policy trees. By replacing slow auto-regressive reasoning with direct classification heads, it achieves 93.72% safety accuracy with a median latency of just 58ms—nearly 9x faster than standard generative approaches.

What Problem Does This Paper Address?

As AI agents move from simple chat to executing tool calls (e.g., sending emails, writing code, accessing databases), they require "guardrails" to ensure safety and compliance. However, current solutions face a "latency vs. flexibility" trade-off:

  1. High Latency: Standard LLM-based judges generate long rationales before giving a verdict, which is too slow for real-time agent loops.
  2. Rigidity: Most models use fixed safety taxonomies. If a company changes its internal data-handling policy, the model usually needs expensive retraining.
  3. Context Bloat: Shoving every possible policy into a single prompt for a "flat" evaluation quickly exceeds context limits and confuses the model.

Jev-Guard addresses these by using a unified model that first routes an action to the correct policy in a hierarchy and then diagnoses it based on that specific rule.

Methods

The authors built Jev-Guard on top of the Qwen3.5-2B architecture, fine-tuned with LoRA. Unlike typical LLMs, it doesn't "talk"; it uses two specialized prediction heads:

  • Safety Head: A binary classifier (safe/unsafe).
  • Candidate Head: A flexible head that scores labels based on the similarity between the model's hidden state and the text embeddings of the labels themselves.
Figure 1: Policy tree, routed diagnosis, and execution gate. (a) The tree is editable without retraining. (b) The router picks one child per node, then the leaf review diagnoses. (c) A separate permission call decides execution without reading the diagnosis. S and C mark the heads. Scores and edits are illustrative.

This embedding-based approach is the secret to its editability. Because the model looks at the meaning of the label text rather than a fixed output index, operators can rename categories or move nodes in the policy tree without retraining the model.

The system operates in a three-step pipeline:

  1. Routing: Navigates an 85-node tree (covering Content, Cyber, Privacy, and Compliance) to find the relevant leaf policy.
  2. Diagnosis: Evaluates the action against that specific leaf's rules.
  3. Execution Gate: A separate permission check decides if the action should proceed, allowing for "unsafe" actions to be permitted in specific contexts (e.g., a security researcher saving a phishing email for analysis).

Datasets

The authors compiled a massive training set of 377,930 records spanning four domains:

  • Content: AEGIS, SafeMT, VLGuard.
  • Cyber: PrimeVul (code vulnerability), PhreshPhish (phishing), DiverseVul.
  • Privacy: OPP-115, PrivaCI (GDPR/HIPAA compliance).
  • Compliance: OmniCompliance-100K (platform terms of service, legal clauses).

They also introduced a 200-case tree-edit study to test how well the frozen model adapts to changes in policy structure.

Key Insights and Ideas

  • Direct Classification > Rationale Generation: For guardrails, you don't always need a paragraph of explanation. Direct heads are significantly faster and can be just as accurate.
  • Separation of Diagnosis and Permission: Recognizing that an action is "unsafe" (e.g., "this code has a buffer overflow") shouldn't always mean "deny." By separating the diagnosis from the execution gate, the system supports complex workflows like authorized security auditing.
  • The "Frozen" Editability: By using frozen text embeddings for labels, the model can follow new rules it wasn't explicitly trained on, provided the semantic meaning of the new labels is clear.
  • Routing Efficiency: Hierarchical routing is 3.5x faster than a "full flat" prompt where all 73 leaf policies are crammed into one context window.

Key Results

Jev-Guard matches the performance of much larger, slower models while providing a massive speedup.

Jev-Guard matches SFT accuracy while being significantly faster.
  • Accuracy: Achieved 93.72% safety accuracy, effectively matching a generative SFT baseline (93.36%).
  • Latency: Median per-case latency of 58.31ms, compared to 513.94ms for the generative baseline. The full routing-and-review pipeline averages 240ms.
  • Real-world Integration: When integrated into the Hermes agent harness, it reduced mean review time per task from 4.80s (using an LLM judge) to 1.33s.
  • Editability: The model successfully followed tree edits (renaming, moving nodes) with 95% accuracy on sampled cases. However, it struggled with "split" edits that required making entirely new semantic distinctions.
Results of testing the frozen model against various policy and tree edits.

Limitations and Future Work

  • Complex Edits: While the model handles renaming and moving well, it fails when a category is split into two new subtypes that require fine-grained distinctions the model hasn't learned.
  • Binding Edits to Execution: In the current implementation, editing a leaf policy changes the diagnosis but doesn't automatically update the permission gate rules. Future work aims to bind these more tightly.
  • Domain Imbalance: Accuracy varies significantly across tasks (e.g., high on phishing detection, lower on complex legal clause F1 scores).
  • Static Attacks: The agent evaluations used static attacks; testing against adaptive attackers who know the guardrail's logic is a necessary next step.

Summary updated

Abstract

Agent harnesses require a low-latency guardrail model together with customizable audit policies. However, deploying an auto-regressive guardrail model remains challenging: such models incur high inference latency and are often poorly aligned with customized policies. To address these problems, we present Jev-Guard, a unified model for safety classification and policy routing. We further construct a policy tree over which Jev-Guard performs routing, spanning diverse domains including content moderation, cybersecurity, privacy, and legal compliance. Specifically, Jev-Guard first navigates the policy tree to select the applicable audit policy given the caller's audit context, and then performs safety classification conditioned on the retrieved policies. On 7,033 evaluation cases, Jev-Guard achieves 93.72\% safety accuracy, a mean latency of 58ms, and 93.10\% hierarchical routing accuracy. The full routing-and-classification pipeline averages 240ms. Furthermore, we integrate Jev-Guard into the Hermes harness framework. Across agent trajectories, its separate permission gate cuts mean review time per task from 4.80s for an SFT-LLM judge to 1.33s, with no policy violations are observed for either guard.
BibTeX
@misc{hu2026jev,
  author = {Wenbin Hu and Huihao Jing and Haochen Shi and Yuxuan Liu and Changxuan Fan and Sirui Zhang and Kawai Chung and Hanyu Yang and Zhenhuan Wang and Ziyi Chen and Haoran Li and Yangqiu Song},
  title = {{Jev-Guard: Fast Routing and Auditing Agent Actions over Editable Policy Trees}},
  year = {2026},
  eprint = {2610.18326},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.18326},
}
Figure