SkillGym:使用自动可验证环境生成训练技能使用智能体
研究论文 · 2026/10/01
技能为LLM智能体提供专业知识和指导,以完成长时程复杂任务。尽管技能已被广泛采用,但如何合成可靠的训练数据以及如何训练智能体使用技能仍未被充分探索。本文提出SkillGym,一个自动流水线,用于构建可验证环境、收集轨迹并训练技能使用智能体。SkillGym首先从互联网爬取大量技能,然后保留那些工作流可离线可复现运行的技能。采用构建者-审查者流水线构建难度受控的任务,涵盖四种任务类型,每种类型都有参考解决方案和可执行验证器。通过该流水线,构建了6.8k个环境并收集了19k条验证成功的轨迹用于监督微调。在这些轨迹上微调提升了不同系列和规模(2B到122B参数)的LLM在四个技能使用基准上的表现;Qwen3.5-9B SFT模型在其中两个基准上优于397B未训练模型。进一步分析表明,训练教会智能体调用技能,将阅读相关技能的比例从28%提升至96%,且增益在不同推理结构下保持,并扩展到占训练数据少数的任务类型以及训练中未见的技能。
该工作首次系统性地解决了技能使用智能体的训练数据合成与训练问题,通过自动构建可验证环境和收集大规模轨迹,显著提升了不同规模LLM的技能使用能力,并揭示了训练如何改变智能体行为,对智能体技能学习领域具有重要推动意义。
Skills equip LLM agents with professional knowledge and guidance to complete long-horizon and complex tasks. Although skills have been widely adopted in recent agent paradigms and harnesses, how to synthesize reliable training data and how to train agents for skill use remain underexplored. In this work, we propose SkillGym, an automatic pipeline to build verifiable environments, collect trajectories, and train skill-use agents. SkillGym first crawls a large volume of skills from the internet, then keeps those whose workflows can run reproducibly offline. A builder-reviewer pipeline is used to construct difficulty-controlled tasks, spanning four task types, each with a reference solution and an executable verifier. With this pipeline, we build 6.8k environments and collect 19k verified successful trajectories for supervised finetuning. Finetuning on these trajectories improves LLMs of different families and sizes, from 2B to 122B parameters across four skill-use benchmarks; Our Qwen3.5-9B SFT model outperforms the 397B untrained model on two of them. Further analysis shows that training teaches agents to invoke skills, raising the rate of reading the relevant skill from 28% to 96%, and that the gains hold across reasoning structures, extending to task types that form a minority of the training data and to skills held out from training