EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agents
Nanxi Li, Yingzi Ma, Yulong Cao, Edward Suh, Bo Li, Dawn Song, Chaowei Xiao
Johns Hopkins University · University of Wisconsin–Madison · NVIDIA · University of Illinois Urbana–Champaign · UC Berkeley
Published September 5, 2026 · on the feed September 11, 2026 · ▲ 40 · arXiv 2609.05903
The abstract
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.
The Brief
3:19A short podcast summary of the paper. Written and voiced by AI.
Transcript
EvoSafeHarness. Evolving Model- and Domain-Specific Harnesses for Securing Agents. By Nanxi Li and six others, from Johns Hopkins University, the University of Wisconsin-Madison, and three other institutions. Published on the fifth of September. Its code repository is worked out: about ninety-five source files, with a readme.
LLM agents turn language into real-world effects. Once a model can act, safety becomes necessary on two fronts: indirect prompt injections, where hostile instructions arrive through the content an agent reads, and direct harmful requests from the user. Beyond the defenses built into the model itself, a system-level safety harness can add a separate enforcement layer. The trouble is how those harnesses are usually made. Experts design one once, and it is then applied across heterogeneous models and heterogeneous domains, as though one design fitted them all.
The authors argue that effective protection depends on the deployment. Models differ in how much enforcement they can take before their utility declines. Domains differ in the effects, the state, and the sequences of actions that need governing. So a harness strict enough for one model may over-block another, refusing work it should have allowed. And a policy that carries across domains may miss safety relations that are specific to one application. A single fixed design is too strict in one place and too loose in another.
EvoSafeHarness is a safety-specific optimization framework that synthesizes a deployable harness for one frozen model in one target domain. The model itself is not retrained. Instead of an expert writing the rules once for everyone, the harness around the model is searched for, and the search is specific to that pairing of model and domain.
The search is joint. It covers two things at once: a natural-language policy, and executable code logic that enforces it. Three sources of information guide it. The first is the behaviour of the model. The second is the specification of the domain. The third is an adversarial review carried out in a fresh context, whose job is to reject rules that are specific to a benchmark rather than to the real safety problem. That review is what keeps the search from simply learning to pass the test in front of it.
The evaluation spans four families of agent benchmarks, and across them EvoSafeHarness reaches a stronger safety-utility frontier than fixed defenses designed by experts. On DecodingTrust-Agent, the average attack success rate drops from forty-five point six percent to ten percent, at a cost of three point three points of utility, and the method takes the best score in fourteen of fifteen cells.
On AgentDojo it reaches eighty-two point eight percent utility with an attack success rate of zero. That is twice the utility of CaMeL at the same operating point, and the same harness transfers unchanged to unseen AgentDyn suites. On Agent-SafetyBench it achieves the best score for every victim model. Under adaptive PAIR attacks, with a refinement budget of sixteen, the mean attack success rate stays below twenty percent.
The analysis splits the problem cleanly in two. The domain's semantics decide which safety relations, and which parts of the trajectory state, are needed at all. The model and its runtime behaviour decide how, and where, those relations should be enforced. A harness that respects both halves has to be fitted to its deployment, and fitting it automatically, rather than by hand, is the contribution.
Paper Quest · 7 chapters · about 40 min
Play this paper
Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.
Chapter 1 🧩 · The problem
Agents now act in the world, and one safety layer has to fit them all. Or does it?
You secure language model agents that can move money, edit files and touch production systems. Attacks arrive two ways: instructions hidden in content the agent reads, and harmful requests straight from the user.
The road ahead
- 1 · The problem ~6 min One fixed, expert-built safety layer around an agent is too strict for some models, too loose for others, and blind to each domain's own risks.
- 2 · What came before ~3 min
- 3 · The key idea ~9 min Search for a safety harness per deployment: a policy plus enforcing code, tuned to one frozen model in one domain, with guards against gaming the benchmark.
- 4 · Choose your own research ~3 min
- 5 · Build the method ~8 min Fix a frozen model and domain, search policy and code together, screen each candidate with a fresh reviewer, then deploy the winning harness.
- 6 · The experiment ~6 min You’ll guess: On DecodingTrust-Agent, the average attack success rate started at 45.6% with no searched harness. Where did it end up with EvoSafeHarness?
- 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Free, with Google or an email address. Your stars and progress are kept.