Agent safety harnesses stop freezing at deployment: SHE learns boundaries from rollout trajectories and cuts attack success to 5.5%
Synopsis
A team at Shanghai Artificial Intelligence Laboratory and collaborators turned the safety harness of large language model agents from a fixed deployment artifact into an evolvable object: the harness is split into four editable artifacts, a system prompt, rule bank, safety memory and tool policy, and failures in rollout trajectories are diagnosed and routed to the responsible artifact for local revision. On Agent-SafetyBench the evolved harness lowers average attack success rate from 17.1% for the static SafeHarness to 5.5% while raising utility under attack from 31.6% to 47.6%. The evolved harness also lowers the Harm Score on the held-out AgentHarm from 19.8% to 9.8%.
Interpretation
The safety of large language model agents is no longer set by model weights alone; the harness that manages context, memory, tools and permissions becomes an evolvable object whose safety boundaries can be rewritten from failed trajectories. Earlier harness-level safety mechanisms were largely static after deployment, with boundaries resting on human-designed rules and principles and no automatic learning from execution trajectories. On Agent-SafetyBench, the evolved SHE lowers average attack success rate from 17.1% for the static SafeHarness to 5.5% while raising average utility under attack from 31.6% to 47.6%.
The harness is split into four editable artifacts with explicit safety responsibilities, so a failure can be attributed to one artifact and revised locally without disturbing the others. Earlier harness components had coupled functions, and a single failure could involve context construction, memory retrieval, tool authority or response filtering, making it hard to tell what to change. The evolution loop first diagnoses each trajectory failure along three dimensions, harm domain, attack surface and failure mode, then routes it to the system prompt, rule bank, safety memory or tool policy; candidate edits pass a validity check and are kept only when they improve safety without lowering task utility.
The evolved harness changes transfer to risks and agent models that took no part in evolution. Static harnesses did not accumulate and extrapolate from trajectories in this way. On the held-out AgentHarm, the evolved harness lowers the Harm Score from 19.8% to 9.8% and raises Harm Refusal from 78.4% to 86.4%; a harness evolved on DeepSeek-V3.2 is applied directly to Kimi K2.6, GLM-5.2 and MiniMax M2.7 without additional evolution.
Perspective
The demonstrated scope is the first 200 tasks selected from Agent-SafetyBench, of which 15 tasks and 90 task-condition instances drive evolution and the remaining 185 tasks are reserved for final evaluation, while the full AgentHarm dataset is used only for held-out evaluation; the base agent model is fixed as DeepSeek-V3.2, the evolution model and the Agent-SafetyBench full-trajectory judge are GPT-5.5, the AgentHarm judge is GPT-4o, and evolution runs for 20 rounds.
Different evolution models yield different safety-utility trade-offs: DeepSeek-V3.2 converges at round 3 and favors a stronger safety gain, GPT-5.5 evolves more gradually and preserves utility best, and GLM-5.2 lands in between; the evolution history shows the best harness unchanged from round 5 to round 16, with later candidates improving individual metrics but failing the joint criterion.
