Preprint · 2025

Training Software Engineering Agents and Verifiers with SWE-Gym

Jiayi Pan, Xingyao Wang, Graham Neubig, Navdeep Jaitly, Heng Ji, Alane Suhr, Yizhe Zhang

VenuearXiv
DOI10.48550/arXiv.2412.21139
URLhttp://arxiv.org/abs/2412.21139
TopicsReplicHAI / Agent Evals / 09 Training environments & gyms
TagsComputer Science - Computation and Language, Computer Science - Software Engineering
archiveIDarXiv:2412.21139
extraarXiv:2412.21139 [cs.SE]
libraryCatalogarXiv.org

Abstract

We present SWE-Gym, the first environment for training real-world software engineering (SWE) agents. SWE-Gym contains 2,438 real-world Python task instances, each comprising a codebase with an executable runtime environment, unit tests, and a task specified in natural language. We use SWE-Gym to train language model based SWE agents, achieving up to 19% absolute gains in resolve rate on the popular SWE-Bench Verified and Lite test sets. We also experiment with inference-time scaling through verifiers trained on agent trajectories sampled from SWE-Gym. When combined with our fine-tuned SWE agents, we achieve 32.0% and 26.0% on SWE-Bench Verified and Lite, respectively, reflecting a new state-of-the-art for open-weight SWE agents. To facilitate further research, we publicly release SWE-Gym, models, and agent trajectories.

BibTeX

@misc{pan_training_2025,
	title = {Training {Software} {Engineering} {Agents} and {Verifiers} with {SWE}-{Gym}},
	url = {http://arxiv.org/abs/2412.21139},
	doi = {10.48550/arXiv.2412.21139},
	abstract = {We present SWE-Gym, the first environment for training real-world software engineering (SWE) agents. SWE-Gym contains 2,438 real-world Python task instances, each comprising a codebase with an executable runtime environment, unit tests, and a task specified in natural language. We use SWE-Gym to train language model based SWE agents, achieving up to 19\% absolute gains in resolve rate on the popular SWE-Bench Verified and Lite test sets. We also experiment with inference-time scaling through verifiers trained on agent trajectories sampled from SWE-Gym. When combined with our fine-tuned SWE agents, we achieve 32.0\% and 26.0\% on SWE-Bench Verified and Lite, respectively, reflecting a new state-of-the-art for open-weight SWE agents. To facilitate further research, we publicly release SWE-Gym, models, and agent trajectories.},
	urldate = {2026-11-06},
	publisher = {arXiv},
	author = {Pan, Jiayi and Wang, Xingyao and Neubig, Graham and Jaitly, Navdeep and Ji, Heng and Suhr, Alane and Zhang, Yizhe},
	month = jun,
	year = {2025},
	note = {arXiv:2412.21139 [cs.SE]},
	keywords = {Computer Science - Computation and Language, Computer Science - Software Engineering},
}