MEGA Hub

SHE: Trajectory-driven Safety Harness Evolution for LLM Agents

Authors

Do you know Wanying Qu?You can claim authorship or link another user.Do you know Qinghua Mao?You can claim authorship or link another user.Do you know Yu Li?You can claim authorship or link another user.Do you know Jiyao Liu?You can claim authorship or link another user.Do you know Xin Zhang?You can claim authorship or link another user.Do you know Dadi Guo?You can claim authorship or link another user.Do you know Yanxu Zhu?You can claim authorship or link another user.Do you know Qingyu Liu?You can claim authorship or link another user.Do you know Leitao Yuan?You can claim authorship or link another user.Do you know Xi Lin?You can claim authorship or link another user.Do you know Shanfeng Zhu?You can claim authorship or link another user.Do you know Yanwei Fu?You can claim authorship or link another user.Do you know Jing Shao?You can claim authorship or link another user.Do you know Xia Hu?You can claim authorship or link another user.Do you know Dongrui Liu?You can claim authorship or link another user.

Abstract

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.

Community

00

Publication notes

Author note
Project: https://github.com/RainbowQTT/SHE