SafeCoEvo: Co-Evolving Safety Harnesses and Guards for LLM Agents at Test-Time
Yu Cheng, Yongkang Hu, Shuaijie Ma, Zhihang Lin, Weicheng Meng, Jingyang Qiao, Jiuan Zhou, Yushuo Zhang, Yihang Chen, Weilin Luo, Kun Shao, Dong Li, Zhizhong Zhang, Yuan Xie, Zhaoxia Yin
Abstract
LLM agents deployed in real-world environments continually encounter new tasks and safety risks, while execution feedback typically becomes available only after each task is completed. However, existing self-evolving approaches commonly rely on multiple rounds of optimization over fixed and repeatedly accessible task distributions, fundamentally differing from test-time adaptation in real-world deployment, where only experience accumulated from past tasks can be used to improve safety decisions on future unseen tasks. To address this limitation, we propose SafeCoEvo, a test-time Harness-Guard co-evolution framework for LLM agent safety that enables the external safety system to continually adapt from accumulated runtime experience. SafeCoEvo jointly improves two complementary safety capabilities at different timescales: S-Harness rapidly externalizes recent runtime experience into updatable explicit safety knowledge that can promptly influence subsequent tasks, while GuardVPO internalizes accumulated runtime safety experience over a longer timescale into parametric risk-judgment capabilities. By combining short-term rapid adaptation with long-term capability consolidation, SafeCoEvo continually improves the agent's safety capabilities, reducing the unsafe outcome rate by 10.05% while improving the task success rate by 12.15% over the strongest baseline, thereby achieving simultaneous gains in safety and task utility.
Create a lesson
Metadata
- Comments
- 35 pages, 10 figures
Related papers
Learning Meta-Skills for Agent Harness Design in Test-Time AI4AI
Shared title terminologycs.AICheng Qian, Kunlun Zhu, Beibin Li et al.
Composing Task-specific Agent Harnesses at Test Time with Reusable Primitives
Shared title terminologycs.AIPeng Kuang, Haibo Jin, Dehao Wu et al.
Budget Boundary Effects in Test-Time Mathematical Reasoning
Shared title terminologycs.AIGuilin Zhang, Ziqi Tan, Wulan Guo et al.
WISE-ATTA: When to Ask for Labels in Budgeted Active Test-Time Adaptation
Shared title terminologycs.AIMuhammad Huzaifa, Lea Schönherr, Thorsten Eisenhofer
A Generative AI Agent to Emulate Interactive Human-driven Vehicles for Automated Driving Testing in Urban Areas
Shared title terminologycs.AIJia Hu, Changjian Yu, Panqu Wang et al.
TACT-Bench: Testing Adaptive Conversational Threats against Tool-Use Agents
Shared title terminologycs.AIIlia Hashemi Rad, Feijie Wu, Haoyu Wang et al.