ClawGym II:探索智能体框架上的黑盒强化学习

·

其他资讯 · 2026/08/18

本文提出了一个统一的黑盒强化学习框架,用于通过复杂代理工具(harness)对通用智能体进行稳定且可扩展的优化。该框架基于沙箱执行基础设施,将任务环境与工具隔离,支持大规模并发回放;通过服务代理捕获模型调用,将多轮轨迹重构为前缀树,并适配PPO和GRPO算法进行策略优化;同时保持训练与推理的一致性,并引入混合工具训练,使单个模型能通过不同工具联合优化。在ClawGym-Bench上,使用Qwen3-30A3B模型,通过OpenClaw和Claude Code分别将Pass@1提升9.98和14.81个百分点,且在200-400步优化中保持稳定;在JobBench和OfficeQA等更具挑战性的任务上也取得了一致提升。

该文提出了一种新颖的黑盒RL框架,解决了通过复杂harness训练智能体的挑战,实验证明其有效性和稳定性,对智能体训练领域有重要参考价值。

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.

阅读原文

参与讨论