Back to AI Research

AI Research

SHE: Trajectory-driven Safety Harness Evolution for... | AI Research

Key Takeaways

  • SHE: Trajectory-driven Safety Harness Evolution for LLM Agents introduces a framework designed to improve the safety of LLM agents by allowing their safety m...
  • The safety of large language model (LLM) agents depends not only on model weights but also on the agent harness that manages context, memory, tools, permissions, and runtime control.
  • Existing safety mechanisms often treat the harness as a fixed deployment artifact, limiting their ability to evolve with emerging risks.
  • Moreover, coupled functions across harness components obscure safety responsibility attribution, making localized evolution difficult.
  • We propose Safety Harness Evolution (SHE), a framework that learns evolving safe boundaries from rollout trajectories.
Paper AbstractExpand

The safety of large language model (LLM) agents depends not only on model weights but also on the agent harness that manages context, memory, tools, permissions, and runtime control. Existing safety mechanisms often treat the harness as a fixed deployment artifact, limiting their ability to evolve with emerging risks. Moreover, coupled functions across harness components obscure safety responsibility attribution, making localized evolution difficult. We propose Safety Harness Evolution (SHE), a framework that learns evolving safe boundaries from rollout trajectories. SHE decomposes the harness into four artifacts with explicit safety responsibilities, including the System Prompt, Rule Bank, Safety Memory, and Tool Policy, defining clear functional boundaries for localized evolution. Based on this decomposition, SHE introduces an attribution-guided evolution loop that converts trajectory failures into structured diagnoses, learns artifact-specific boundary refinements, and selects evolved harnesses through safety-utility validation. Experiments on Agent-SafetyBench demonstrate that SHE effectively enhances safety through harness evolution, achieving a 3.1x ASR reduction compared with static SafeHarness, while also improving benign utility. The evolved harness further generalizes to unseen risks on the held-out AgentHarm benchmark and transfers across agent models without additional evolution.

SHE: Trajectory-driven Safety Harness Evolution for LLM Agents introduces a framework designed to improve the safety of LLM agents by allowing their safety mechanisms to evolve alongside emerging risks. Rather than relying on static, human-designed rules that remain fixed after deployment, this approach uses an iterative loop to learn from past execution failures, refining safety boundaries based on actual performance in task environments.

Decoupling Safety Responsibilities

The researchers address the challenge of "coupled functions," where safety failures are difficult to diagnose because multiple components of an agent's harness are intertwined. To solve this, the framework decomposes the agent harness into four distinct, editable artifacts, each with specific safety responsibilities:

  • System Prompt: Defines the global behavioral contract and trust boundaries.

  • Rule Bank: Stores specific safety rules for classifying and intervening in risks.

  • Safety Memory: Retains experience from persistent failure cases that were not resolved in previous iterations.

  • Tool Policy: Governs tool-use authority and runtime enforcement.
    By separating these components, the framework enables localized evolution, where a failure in one area can be addressed without unintentionally disrupting the functionality of other parts of the harness.

The Evolution Loop

The framework employs an attribution-guided loop to turn failure data into actionable improvements. When an agent completes a task, the system evaluates the trajectory to identify safety-relevant failures. These failures are then processed through a structured diagnosis that categorizes the harm domain, the attack surface, and the failure mode.
Once diagnosed, the system routes the issue to the specific harness artifact responsible for that safety boundary. It then generates a "bounded edit"—a targeted refinement—which must pass a validity check to ensure it is a genuine safety improvement rather than a shortcut or a degradation of the agent's utility. Only candidates that improve safety scores while maintaining or improving task utility are accepted as the new "best harness."

Performance and Generalization

Experiments conducted on the Agent-SafetyBench dataset show that this evolving approach significantly outperforms static safety mechanisms. The researchers report that the framework achieved a 3.1x reduction in the Attack Success Rate (ASR) compared to a static "SafeHarness" baseline, while simultaneously improving the agent's utility.
Furthermore, the evolved harness demonstrated the ability to generalize to unseen risks on the held-out AgentHarm benchmark. The researchers also noted that the evolved harness could transfer across different agent models without requiring additional evolution cycles, suggesting that the learned safety boundaries are robust and not tied to a single specific model.

Considerations for Implementation

The framework is designed to optimize the harness while keeping the base LLM policy, the task environment, and the evaluation protocol fixed. A key limitation addressed by the design is the potential for "reward hacking" or unnecessary capability removal; the validity check and the requirement for best-harness selection are intended to prevent these issues. By treating the safety harness as an evolving system rather than a fixed deployment artifact, the framework aims to bridge the gap between identifying safety failures and implementing effective, long-term corrections.

Comments (0)

No comments yet

Be the first to share your thoughts!