RedEvoAgent: Automatic Red-Teaming Agent with Experience-Driven Skill Evolution

Junjie Zhang, Hui Liu, Kecheng Chen, Xianbo Mo, Changsheng Chen, Haoliang LiarXiv 2026

TL;DR

RedEvoAgent is an automatic, black-box red-teaming agent designed to uncover security vulnerabilities in LLM-based applications. Instead of relying on rigid attack templates or bloated interaction histories, it distills complex multi-turn attack trajectories into a concise, human-readable "attack skill" document. This natural-language strategy adaptively evolves over time, outperforming state-of-the-art baselines while significantly reducing context overhead and tool usage.

What Problem Does This Paper Address?

Large Language Models (LLMs) are rapidly evolving from simple chatbots into autonomous agents integrated into product-level environments (like Claude Code or Codex). These agents can execute code, modify local files, and call external APIs. Consequently, a successful "jailbreak" attack on these systems poses a much higher risk than mere unsafe text generation—it can lead to destructive, persistent system state changes.

To secure these systems, developers use automatic red-teaming to simulate real-world attacks. However, current methods are either too rigid (using fixed, single-strategy attacks) or inefficient. Recent agentic approaches try to coordinate multiple jailbreak tools by retrieving full histories of past attempts. This creates massive context bloat and introduces retrieval biases. Crucially, these systems suffer from a "credit assignment" problem: they struggle to identify which specific tool actually caused an attack to succeed versus which tools just happened to be used along the way.

Methods

Figure 1: RedEvoAgent overview. Given a jailbreak prompt, the attacker agent uses the current attack skill to select and call tools from an extensible attack toolbox, such as GCG and FlipAttack, and iteratively attacks a product-level target agent. On the training split, RedEvoAgent collects successful and failed attack trajectories and independently evaluates each attack tool to build a tool- effectiveness profile. Skill evolution combines the profile with these trajectories to extract tool priorities and attack strategies. A candidate attack skill update is accepted only if it improves attack performance on the validation split, while the test split remains locked for final evaluation.

RedEvoAgent addresses these flaws through an experience-driven skill evolution framework:

  • The Attack Skill: Rather than keeping raw history logs, RedEvoAgent distills cross-case experiences into a compact Markdown document containing core principles, tool priorities, and an actionable attack policy.
  • Toolbox Integration: The agent operates within a ReAct framework, orchestrating seven diverse jailbreak tools (including GCG, AutoDAN, FlipAttack, and a novel LLM-driven Prompt Substitution tool).
  • Tool-Effectiveness Profile: Before evolving its skill, the agent tests each tool in isolation on a training split to establish an empirical baseline ranking.
  • Deciding-Tool Attribution: To fix the credit assignment problem, RedEvoAgent specifically attributes success to the exact tool that immediately preceded a successful system compromise. This prevents the agent from repeatedly choosing popular but ineffective tools.
  • Validation Ratchet: Candidate skills are generated via parallel minibatch reflection. A strict "validation gate" ensures a new skill is only adopted if it strictly outperforms the current best skill on an independent validation set.
Figure 2: Trajectory-to-skill case study. (a) Each card shows the prompt sent after the labeled trans- formation; arrows preserve attempt order, and badges report the target outcome. The first successful query follows FlipAttack, so Deciding-Tool Attribution credits FlipAttack. (b) Together with other training cases, this evidence contributes to an evolved skill that records tool priorities and an action- able attack policy.

Datasets

The authors evaluated RedEvoAgent using two prominent agent security benchmarks:

  1. Agent Security Bench (ASB): Features 400 test cases spanning 10 distinct agent types and 40 attacker tools.
  2. AgentHarm: Contains 208 cases designed to evaluate real-world harmful behaviors in agent execution environments.

These benchmarks were tested against three target models (MiniMax-M2.5, DeepSeek-V4-Flash, and Qwen3.5-35B) deployed inside two real-world execution environments: Claude Code and Codex.

Key Insights and Ideas

  • Abstraction Beats Raw Memory: Distilling complex, multi-turn interaction histories into a high-level natural language "skill" document reduces context bloat and guides the LLM attacker more effectively than raw trajectory retrieval.
  • The Co-occurrence Trap: LLM agents have inherent biases and will repeatedly select certain tools. Without Deciding-Tool Attribution, the agent misattributes success to these frequently co-occurring tools, leading to strategy collapse.
  • Harness-Dependent Vulnerabilities: Target models show highly uneven resistance depending on the execution harness they are paired with, proving that red-teaming must adapt to the specific deployment environment, not just the base model.

Key Results

  • State-of-the-Art Success Rates: RedEvoAgent consistently matched or outperformed all isolated tools and agentic baselines (such as RedCodeAgent and MAJIC). For example, attacking DeepSeek-V4-Flash on the Codex harness achieved a perfect 100% Attack Success Rate (ASR).
  • High Efficiency: The evolved skill allowed the agent to be highly surgical, drastically reducing the average number of attack-tool calls per case (often dropping from ~3 calls down to fewer than 1.5).
  • Zero-Shot Transferability: Skills evolved using a GPT-4o mini attacker on Claude Code transferred seamlessly to entirely different attacker models (Qwen3-8B/4B) and target harnesses (Codex) without any re-evolution, yielding up to a +9.7% ASR gain over baselines.

Limitations and Future Work

  • Toolbox Boundedness: The agent's ultimate performance is strictly capped by the diversity and strength of the underlying tools in its toolbox.
  • Validation Overfitting: In one experiment (AgentHarm with MiniMax), later rounds of evolution improved validation scores but caused a drop in test performance. This happened because the skill over-indexed on a narrow set of tools that worked on the validation split but failed to generalize. The authors suggest that employing a more diverse validation split is a critical direction for future work.

Summary updated

BibTeX
@misc{zhang2026redevoagent,
  author = {Junjie Zhang and Hui Liu and Kecheng Chen and Xianbo Mo and Changsheng Chen and Haoliang Li},
  title = {{RedEvoAgent: Automatic Red-Teaming Agent with Experience-Driven Skill Evolution}},
  year = {2026},
  eprint = {2608.27439},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.27439},
}
Figure