[论文解读] ToolGym: an Open-world Tool-using Environment for Scalable Agent Testing and Data Curation
ToolGym 提供一个可扩展的开世界环境,拥有 5,571 种工具、204 个应用,以及任务创建引擎与状态控制器,用于评估和训练具备长远任务能力且数据高质量的工具使用型大语言模型代理。
Tool-using LLM agents still struggle in open-world settings with large tool pools, long-horizon objectives, wild constraints, and unreliable tool states. For scalable and realistic training and testing, we introduce an open-world tool-using environment, built on 5,571 format unified tools across 204 commonly used apps. It includes a task creation engine that synthesizes long-horizon, multi-tool workflows with wild constraints, and a state controller that injects interruptions and failures to stress-test robustness. On top of this environment, we develop a tool select-then-execute agent framework with a planner-actor decomposition to separate deliberate reasoning and self-correction from step-wise execution. Comprehensive evaluation of state-of-the-art LLMs reveals the misalignment between tool planning and execution abilities, the constraint following weakness of existing LLMs, and DeepSeek-v3.2's strongest robustness. Finally, we collect 1,170 trajectories from our environment to fine-tune LLMs, achieving superior performance to baselines using 119k samples, indicating the environment's value as both a realistic benchmark and a data engine for tool-using agents. Our code and data will be publicly released.
研究动机与目标
- 在具备大量工具和长工作流的开世界环境中,激励对工具使用型大语言模型代理进行现实且可扩展的评估的必要性。
- 将 ToolGym 作为统一环境引入,具备大型且经筛选的工具库、在野外约束下的任务综合,以及用于模拟失败的状态控制器。
- 提出规划器–执行者代理框架,将推理与执行分离,从而提升长时任务的鲁棒性。
- 证明 ToolGym 数据可用于高效微调模型,并在数据有限的情况下提升性能。
提出的方法
- 将 5,571 种工具从 276 个 MCP 服务器覆盖的 204 个应用整合为统一 MCP 格式。
- 开发任务创建引擎,在野外约束下综合长时程、多工具工作流。
- 引入状态控制器,在执行过程中注入中断与失败(包括工具级、状态级、约束级)。
- 实现规划器–执行者代理框架,将深思熟虑的规划与逐步执行解耦(Planner 指导,Actor 执行)。
- 使用多模型集成的工具检索、规划与执行循环,对任务成功与约束满足采用“LLM 作为评审”协议进行评估。
- 创建自动数据管线,生成 1,170 条轨迹用于微调 LLM,并与在更大数据集上训练的基线进行对比。

实验结果
研究问题
- RQ1现有的 LLM 在使用大型开工具库时,能在长远工作流中进行良好规划与执行吗?
- RQ2在开放世界工具环境中,主导的失败模式是来自规划、执行还是对约束的遵守?
- RQ3规划器–执行者分解是否能提升工具任务的鲁棒性与成功率?
- RQ4ToolGym 的轨迹数据在多大程度上能高效提升下游对工具使用的 LLM 微调?
- RQ5ToolGym 的自动数据生成是否在工具使用代理方面超越更大的人类标注数据集合?
主要发现
- LLMs 展现出较强的规划能力,但执行对齐较弱,导致任务成功存在差距。
- 约束遵守,而非工具调用,是当前模型的主要瓶颈。
- DeepSeek-v3.2 在中断情况下表现出强鲁棒性,具高恢复与适应性。
- 较高的工具使用率并不保证更高的成功率,因为可能存在推理失败。
- 在 1,170 条 ToolGym 轨迹上进行微调,性能优于基线在 119k 样本上的训练结果。
- ToolGym 数据作为高效的数据驱动引擎,在评估与数据整理方面均具有效性。

更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。