EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agents
Abstract
EvoSafeHarness optimizes deployable safety harnesses by jointly searching natural-language policies and executable logic tailored to a frozen model and target domain, improving safety-utility trade-offs across agent benchmarks.
Large Language Model (LLM) agents are turning language into real-world effects, making safety necessary against both indirect prompt injections and direct harmful requests. System-level safety harnesses add an enforcement layer beyond model-level defenses, but existing harnesses are usually designed once by experts and applied across heterogeneous models and domains. Effective protection is deployment-dependent: models differ in how much enforcement they need before utility declines, while domains differ in the effects, state, and action sequences that must be governed. A harness that is strict enough for one model may over-block another, and a policy that transfers across domains may miss application-specific safety relations. We present EvoSafeHarness, a safety-specific optimization framework that synthesizes a deployable harness for a frozen model in a target domain. It jointly searches a natural-language policy and executable code logic, guided by model behavior, domain specifications, and fresh-context adversarial review to reject benchmark-specific rules. Across four agent benchmark families, EvoSafeHarness achieves a stronger safety-utility frontier than fixed expert-designed defenses. On DecodingTrust-Agent, it reduces average attack success rate from 45.6% to 10.0% at a 3.3-point utility cost and achieves the best score in 14 of 15 cells. On AgentDojo, it reaches 82.8% utility at 0.0% ASR, twice CaMeL's utility at the same operating point, and transfers unchanged to unseen AgentDyn suites. It also achieves the best score on Agent-SafetyBench for every victim and keeps mean ASR below 20% under adaptive PAIR attacks with a refinement budget of 16. Analysis shows that domain semantics determine which safety relations and trajectory state are needed, while model and runtime behavior determine how and where those relations should be enforced.
Community
LLM agents now move money, edit files and act on real systems. Yet most safety harnesses are designed once by experts and reused for every model and every domain. One size does not fit all.
🚀 We are excited to introduce EvoSafeHarness, a framework that automatically evolves a safety harness for your model and your domain. It writes both the natural-language safety policy and the code that enforces it on every tool call, while the model itself stays frozen.
Why this matters: the same harness can wipe out one model's usefulness while leaving another exposed, and a policy written for a file system has no idea what a wash trade is. Agent safety depends on the deployment.
📈 Across four agent benchmarks, the evolved harnesses beat expert-designed defenses such as CaMeL, DRIFT and Progent on the safety–utility trade-off. On DecodingTrust-Agent, attack success drops from 45.6% to 10.0% at a cost of only 3.3 utility points.
📄 Paper: https://arxiv.org/abs/2609.05903
💻 Code: https://github.com/SaFo-Lab/EvoSafeHarness
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Beyond Handcrafted Security: Towards Self-Evolving Defense for LLM Agents (2026)
- SHE: Trajectory-driven Safety Harness Evolution for LLM Agents (2026)
- SafeEvolve: Harness-Policy Co-Evolution from Agent Experience for Safety Alignment (2026)
- HarnessRisk: A Lifecycle-Oriented Benchmark for Agent Harness Safety (2026)
- Reachability-Based Capability Confinement for LLM Agents under Indirect Prompt Injection (2026)
- ChannelGuard: Safe Models Do Not Compose into Safe Multi-Agent Systems (2026)
- SkillShield: Prompt-Space Security Skills for LLM Coding Agents (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
Get this paper in your agent:
hf papers read 2609.05903 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper