Agent Lightning v1.0: Towards Harnessed Agentic RL

📄 arXiv: 2608.17528v1 📥 PDF

作者: Zhiyuan He, Siwei Zhang, Zhiwen Zhou, Yuqing Yang, Yu Kang, Yuge Zhang, Luna K. Qiu, Tin Yan Tsui, Jiahang Xu, Chong Luo

分类: cs.AI, cs.SE

发布日期: 2026-08-18


💡 一句话要点

提出Agent Lightning v1.0以解决传统强化学习中的环境交互问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 强化学习 智能体系统 环境交互 代理束 模型训练 实验评估 代码实现

📋 核心要点

  1. 现有的强化学习方法在环境交互上存在局限,训练引擎无法有效管理智能体与环境的交互。
  2. 本文提出的Agent Lightning v1.0框架通过代理束直接参与模型后训练,解决了传统方法中的环境交互问题。
  3. 实验结果显示,使用6K训练样本,RL在SWE-bench Verified上的性能提升了14.6个百分点,显著提高了智能体的表现。

📝 摘要(中文)

现代智能体在代理束中运行,管理工具、上下文和控制流,使得代理束成为智能体系统的关键部分。我们的Agent Lightning引入了一种解耦架构,通过LLM端点代理将任意智能体连接到强化学习训练。这种方法称为束化智能体强化学习,与传统的智能体强化学习有根本区别:代理束而非训练引擎拥有环境交互循环。本文提出的Agent Lightning v1.0是一个轻量级框架,支持任意智能体束,并为研究相关挑战提供了实用的测试平台。我们在指令跟随、搜索和编码智能体上进行了评估,并提供了完整的可重复性管道。使用仅6K训练样本,RL将Qwen3.5-9B在SWE-bench Verified上的表现从41.8%提升至56.4%。

🔬 方法详解

问题定义:本文旨在解决传统强化学习中训练引擎与环境交互的局限性,特别是在智能体与环境交互循环的管理上存在的挑战。现有方法往往无法有效利用代理束的潜力,导致训练效果不佳。

核心思路:Agent Lightning v1.0的核心思路是通过代理束直接参与模型的后训练过程,使得代理束能够控制环境交互循环,从而提高训练的稳定性和有效性。这样的设计使得训练引擎只需关注LLM请求-响应对的序列,简化了训练过程。

技术框架:该框架由多个模块组成,包括LLM端点代理、环境交互管理模块和训练监控模块。通过这些模块,Agent Lightning能够支持任意智能体束,并提供灵活的训练和评估机制。

关键创新:最重要的技术创新在于引入了束化智能体强化学习的概念,使得代理束而非训练引擎负责环境交互。这一创新显著改变了智能体训练的方式,提升了训练的灵活性和效果。

关键设计:在设计中,采用了特定的损失函数和样本合并策略,以应对重token化、优势计算和损失归一化等挑战。此外,框架的代码量约为3500行,确保了轻量级和高效性。

🖼️ 关键图片

fig_0
img_1
img_2

📊 实验亮点

实验结果表明,使用Agent Lightning v1.0,Qwen3.5-9B在SWE-bench Verified上的表现从41.8%提升至56.4%,实现了14.6个百分点的绝对增益。这一显著提升证明了束化智能体强化学习方法的有效性。

🎯 应用场景

该研究的潜在应用领域包括智能体控制、自动化编程和人机交互等。通过改进智能体与环境的交互方式,Agent Lightning v1.0能够在多个实际场景中提高智能体的表现,推动智能体技术的进一步发展和应用。

📄 摘要(原文)

Modern agents operate inside agent harnesses that manage tools, context, and control flow, making the harness a critical part of the agent system. Our original Agent Lightning introduced a disaggregated architecture that connects arbitrary agents to RL training through an LLM endpoint proxy, an approach later adopted by frameworks such as verl Uni-Agent, AReaL 2.0, slime, and Polar. We refer to this paradigm as harnessed agentic RL, where the deploy-time harness directly participates in model post-training. Harnessed agentic RL differs fundamentally from traditional agentic RL: the harness, rather than the training engine, owns the environment interaction loop, while the trainer observes only sequences of LLM request-response pairs. This introduces challenges in retokenization, sample merging, advantage calculation, loss normalization, and backend scheduling, which can substantially affect training stability and effectiveness. We present Agent Lightning v1.0, a lightweight framework for harnessed agentic RL implemented in approximately 3,500 lines of code. It supports arbitrary agent harnesses and serves as a practical testbed for studying these challenges. We evaluate it on instruction-following, search, and coding agents, and provide a complete reproducible pipeline for coding-agent RL. Using only 6K training examples and modest compute, RL improves Qwen3.5-9B on SWE-bench Verified from 41.8% to 56.4%, a 14.6-point absolute gain. We release the complete workflow and training scripts to facilitate reproducible research on harnessed agentic RL.