JiangHoucheng/RePolicy-4B

TEXT GENERATIONPricing:Input $0.4 / Cached $0.08 / Output $0.8Concurrent Unit Cost:1Model Size:4BQuant:BF16Context Size:32kTool Calling:SupportedPublished:Aug 19, 2026License:apache-2.0Architecture:Transformer0.0K Open Weights Featherless Exclusive Cold

RePolicy-4B by JiangHoucheng is a 4 billion parameter agent safeguard model, built on Qwen3-4B-Instruct-2507, designed to dynamically invoke safety policies for agent trajectories. Unlike traditional guards, it learns to select relevant policies from a dynamic library based on titles, then retrieves and reasons over their clauses. This model excels at producing policy-grounded rationales and trajectory-level safety judgments, achieving an 88.15% overall F1 score on agent safety benchmarks.

Loading preview...

RePolicy-4B: Dynamic Agent Safeguard

RePolicy-4B is a 4 billion parameter model developed by JiangHoucheng, built upon the Qwen3-4B-Instruct-2507 backbone. Its core innovation lies in its ability to dynamically invoke safety policies through reinforcement learning, rather than processing all policy text upfront. Given an agent trajectory and a library of policy titles, RePolicy-4B intelligently selects the most applicable policy, retrieves its clauses via a tool call, and then generates a policy-grounded rationale along with a trajectory-level safety judgment.

Key Capabilities & Differentiators

  • Dynamic Policy Invocation: Learns to select relevant policies from a library using only titles, significantly differing from guards that receive full policy text as passive prompt context.
  • Reinforcement Learning for Safety: Trained using cold-start SFT on PolicyTraj-20K followed by GRPO with verifiable rewards and policy-context perturbation.
  • Strong Performance: Achieves an 88.15% overall F1 score on six agent safety benchmarks (ATBench, R-Judge, OpenAgentSafety, ASSEBench, HINTBench, AgentHazard), outperforming its backbone (58.47%) and specialized 4B guards like DynaGuard-4B (76.52%) and AgentDoG-4B (79.69%). It even surpasses larger models like Claude Sonnet 4.6 (84.17%) and GPT-5.4 (83.12%) in overall F1 score.
  • Two-Step Inference: Involves an initial tool call to get_policy to retrieve clauses, followed by generating a rationale and a <JUDGE> tag (safe/unsafe).

Good For

  • Developers building agent systems requiring dynamic and context-aware safety policy enforcement.
  • Use cases where efficient policy retrieval and reasoning are critical, avoiding the overhead of passing entire policy documents.
  • Applications needing policy-grounded explanations for agent behavior safety judgments.

Limitations

  • Assumes the policy library contains an applicable policy; performance can be affected by incomplete coverage or ambiguous policies.
  • Primarily evaluated on English, offline, trajectory-level benchmarks with binary labels, not designed for multilingual or online intervention settings.
  • The two-step invocation process incurs more inference cost than single-pass guards.