AgentSafeEvo: Adversarial Co-Evolution for LLM Agent Safety
Abstract
AgentSafeEvo uses adversarial co-evolution to train LLM agents to resist malicious tool-use attacks across diverse tasks without sacrificing general capabilities.
Large language model (LLM) agents accomplish complex tasks through multi-turn interactions with external tools. However, malicious content embedded in user queries, tool descriptions, or environment observations can manipulate their decisions and induce unsafe actions. Adversarial co-evolution has emerged as an effective approach to strengthening LLM safety, but existing work primarily focuses on language-level safety or indirect prompt injection in web tasks. In this paper, we introduce AgentSafeEvo, a co-evolutionary reinforcement learning framework for agent safety built on an attacker-defender game spanning diverse tasks and attack types. The attacker learns to construct adversarial agent tasks that expose weaknesses in the defender's tool use, while the defender learns to complete tasks safely under these attacks. We further introduce learnability-guided task weighting, which uses within-task defender-reward variability to adjust each task's contribution to attacker and defender updates. Extensive experiments on agent safety and general capability benchmarks demonstrate that our method improves adversarial robustness while maintaining general agent capabilities.
Community
Hi, I’m one of the authors of AgentSafeEvo. We introduce an adversarial co-evolution framework that jointly trains attacker and defender LLM agents for safer multi-turn tool use. We evaluate across seven safety and capability benchmarks and release our code, models, and datasets to support further research: https://github.com/lalalamdbf/AgentSafeEvo.
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
- CoER: Defending against Adaptive Indirect Prompt Injection via Adversarial Co-Evolution and Refinement (2026)
- AdvSim2Real : Training Web Agents Against Adaptive Prompt Injection in a Web World Model (2026)
- Reward Stealing Attack on Large Language Models (2026)
- Fully Unleashing the Multimodal Attacker: Meta-Adaptive Jailbreaking of Vision-Language Models (2026)
- BenchShield: Formal Model-Backed Instrumentation for Reward Integrity in LLM-Agent Evaluation Infrastructure (2026)
- Self-Reflection Fine-Tuning: Enhancing Agent Security against Prompt Injection Attacks from Failure Experience (2026)
- Forgotten in Weights, Recovered by Tools: Agentic Tool Unlearning for LLM 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
Models citing this paper 3
lalalamdbf/AgentSafeEvo-Attacker-Qwen3-8B-RL
Datasets citing this paper 1
lalalamdbf/AgentSafeEvo-Attacker-SFT-Data
Spaces citing this paper 0
No Space linking this paper