EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agents
cs.CR
Submitted: 2026-09-05
Updated: 2026-10-14
Code: https://github.com/SaFo-Lab/EvoSafeHarness
License: http://creativecommons.org/licenses/by/4.0/
The gist: Large Language Model (LLM) agents are turning language into real-world effects, making safety necessary against both indirect prompt injections and direct harmful requests.
Terminology
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.
Sources
- GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning
- IPIGuard: A Novel Tool Dependency Graph-Based Defense Against Indirect Prompt Injection in LLM Agents
- DecodingTrust-Agent Platform (DTap): A Controllable and Interactive Red-Teaming Platform for AI Agents
- LlamaFirewall: An open source guardrail system for building secure AI agents
- Defeating Prompt Injections by Design
- Defending Against Indirect Prompt Injection Attacks With Spotlighting
- Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations
- DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines
- Meta-Harness: End-to-End Optimization of Model Harnesses
- AgentDyn: Are Your Agent Security Defenses Deployable in Real-World Dynamic Environments?
- LPG: Balancing Efficiency and Policy Reasoning in Latent Policy Guardrails
- AgentCanary: A Security Evaluation Framework for Autonomous AI Agents in Real Executable Environments
- Agentic Harness Engineering: Observability-Driven Automatic Evolution of Coding-Agent Harnesses
- Harness Updating Is Not Harness Benefit: Disentangling Evolution Capabilities in Self-Evolving LLM Agents
- SafeHarness: Lifecycle-Integrated Security Architecture for LLM-based Agent Deployment
- Natural-Language Agent Harnesses
- Ignore Previous Prompt: Attack Techniques For Language Models
- Progent: Securing AI Agents with Privilege Control
- VeRO: A Harness for Agents to Optimize Agents
- The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions
Related papers
- SoK: AI-Augmented Binary Reversing
- Relaxed Sender Anonymity for CBDC Interbank Settlement: A Zero-Knowledge Approach on Permissioned EVM
- Calibration-Family Overfit: Why Trusted Sabotage Monitors Don't Transfer Across Lineages
- Efficient Fuzzy PSI under One-Sided Assumptions
- Sealing the Audit-Runtime Gap for LLM Skills
- Token Composition: A Graph Based on EVM Logs