ClawGym II: Exploring Black-Box RL on Agent Harness
作者: Huatong Song, Fei Bai, Ming Yang, Renyuan Li, Jia Deng, Jujie He, Zhange Zhang, Daixuan Cheng, Yan Xing, Qi Yun, Xuxing Chen, Danyang Li, Feng Chang, Chuan Hao, Ran Tao, Jian Yang, Bryan Dai, Wayne Xin Zhao, Mingjie Tang, Ji-Rong Wen
分类: cs.CL, cs.AI, cs.LG
发布日期: 2026-08-17
💡 一句话要点
提出统一黑箱强化学习框架以优化复杂代理任务
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 黑箱强化学习 代理工具 长时间任务 策略优化 混合训练
📋 核心要点
- 现有方法在长时间任务的强化学习中面临挑战,尤其是在复杂代理工具的使用上,缺乏有效的优化策略。
- 论文提出了一种黑箱强化学习框架,通过沙箱环境和服务代理的设计,实现了策略优化与代理执行的解耦。
- 实验结果表明,使用Qwen3-30A3B模型,黑箱强化学习在ClawGym-Bench上分别通过OpenClaw和Claude Code提升了9.98和14.81点的Pass@1,且在更具挑战性的任务上也取得了稳定的增益。
📝 摘要(中文)
代理工具显著提升了长时间任务的性能,通过协调代理与环境的交互。然而,通过复杂的代理工具进行强化学习仍然未被充分探索,尤其是在将训练扩展到长时间代理任务时面临根本性挑战。本文提出了一种统一的黑箱强化学习框架,旨在通过复杂的代理工具实现稳定且可扩展的优化。我们首先构建了一个基于沙箱的执行基础设施,将任务环境和代理工具隔离在临时沙箱中,以支持大规模并发回滚。接着,我们将策略优化与不透明的代理执行解耦,并在模型边界放置服务代理以捕获模型调用。为了重构多轮轨迹并提高训练效率,我们将捕获的调用组织成前缀树,并进一步调整基于评论者的PPO和无评论者的GRPO以优化恢复的树结构。最后,我们引入混合代理训练,使单个模型能够通过异构代理工具共同优化。
🔬 方法详解
问题定义:本文旨在解决通过复杂代理工具进行强化学习时的优化难题,现有方法在长时间任务中表现不佳,缺乏有效的训练框架。
核心思路:提出统一的黑箱强化学习框架,通过沙箱环境隔离任务和代理工具,解耦策略优化与代理执行,以提高训练的稳定性和效率。
技术框架:整体架构包括沙箱执行基础设施、服务代理、前缀树结构组织和混合代理训练模块,支持大规模并发回滚和多轮轨迹重构。
关键创新:最重要的创新在于将策略优化与代理执行解耦,并通过服务代理捕获模型调用,优化恢复的树结构,提升训练效率。
关键设计:采用前缀树组织捕获的调用,调整PPO和GRPO算法以适应树结构,确保训练与推理的一致性,同时实现混合代理训练以支持异构系统的联合优化。
🖼️ 关键图片
📊 实验亮点
实验结果显示,使用Qwen3-30A3B模型,黑箱强化学习在ClawGym-Bench上通过OpenClaw和Claude Code分别提升了9.98和14.81点的Pass@1,且在200-400次优化步骤中保持稳定。此外,该框架在JobBench和OfficeQA等更具挑战性的任务上也取得了一致的性能提升。
🎯 应用场景
该研究的潜在应用领域包括机器人控制、自动驾驶、智能助手等需要长时间决策的任务。通过提供稳定且可扩展的优化框架,能够有效提升智能体在复杂环境中的表现,推动智能系统的实际应用和发展。
📄 摘要(原文)
Agent harnesses have substantially improved performance on long-horizon tasks by coordinating agent interactions with the environment. However, reinforcement learning through complex harnesses remains largely unexplored, as scaling such training to long-horizon agent tasks introduces fundamental challenges. In this work, we present a unified black-box RL framework for stable and scalable optimization of general agents through complex harnesses. Concretely, we first build a sandbox-based execution infrastructure that isolates task environments and harnesses within temporary sandboxes for large-scale concurrent rollouts. We then decouple policy optimization from opaque harness execution and place a serving proxy at the model boundary to capture model calls. To reconstruct multi-turn trajectories and improve training efficiency, we organize the captured calls into prefix trees and further adapt both critic-based PPO and critic-free GRPO to optimize over the recovered tree structure. Meanwhile, we maintain training-inference consistency throughout the optimization process. Finally, we introduce mix-harness training, allowing a single model to be jointly optimized by heterogeneous harnesses. With Qwen3-30A3B, black-box RL improves Pass@1 on ClawGym-Bench by 9.98 and 14.81 points through OpenClaw and Claude Code, respectively, while remaining stable over 200-400 optimization steps. Moreover, the framework yields consistent gains on more challenging tasks such as JobBench and OfficeQA. Overall, our framework enables effective, stable, and scalable optimization of general agents through black-box harnesses, supporting unified training across heterogeneous execution systems.