SWE-Gym
SWE-Gym is an open environment for training software engineering agents and verifiers, providing 2.4K real-world tasks from 11 Python repositories with executable environments and test verification. It solves the lack of training environments for RL in repository-level coding, enabling agents to achieve state-of-the-art results on SWE-Bench. It is for researchers and developers training or fine-tuning language models for software engineering tasks.
✨ Key features
- 2.4K real tasks from 11 Python repos
- Lite split of 234 instances
- Executable environments with test verification
- Trains agents via RL and fine-tuning
- Supports self-improvement via rejection sampling
- Enables inference-time scaling with verifiers
🎯 Use cases
- Train LM agents to solve real-world software engineering issues
- Fine-tune models like OpenHands or MoatlessTools for SWE-Bench
- Train verifiers for best-of-n selection in inference-time scaling
- Reproduce state-of-the-art results on SWE-Bench Verified and Lite
📦 Installation
🧰 Requirements: Requires Python environment, access to Hugging Face for dataset, Docker for pre-built images, and API keys for models like GPT-4o or Claude if used for trajectory generation.
To access the SWE-Gym dataset, visit the Hugging Face hub page: https://huggingface.co/SWE-Gym. Environment constants are saved at the SWE-Bench-Fork repository: https://github.com/SWE-Gym/SWE-Bench-Fork. Pre-built Docker images are available under the prefix xingyaoww/sweb.eval.x86_64 on Docker Hub. For detailed experiment reproduction, see the docs: OpenHands and MoatlessTools.
🚀 Usage
For reproducing results with OpenHands or MoatlessTools, follow the instructions in the respective docs. For generating trajectories with OpenHands for training, refer to the instructions at: https://github.com/All-Hands-AI/OpenHands/blob/main/evaluation/benchmarks/swe_bench/SWE-Gym.md
⚠️ Good to know
The current results are primarily bottlenecked by training and inference compute, not the size of the environment.
❓ FAQ
What is SWE-Gym?
SWE-Gym is an open environment for training software engineering agents and verifiers, providing real-world tasks from Python repositories with executable environments and test verification.
How many tasks does SWE-Gym include?
It includes 2.4K real tasks from 11 Python repos, with a Lite split of 234 instances.
What results can be achieved with SWE-Gym?
Baselines achieve 32% and 26% on SWE-Bench Verified and Lite respectively, a new open state-of-the-art.
How can I access the dataset?
The dataset is available on Hugging Face at https://huggingface.co/SWE-Gym, with environment constants in the SWE-Bench-Fork repository.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.