The official SWE-smith package - A toolkit for generating software engineering training data at scale.
Project description
SWE-smith is a toolkit for training software engineering (SWE) agents. With SWE-smith, you can:
- Create an unlimited number of SWE-bench style task instances for any Python repository.
- Generate trajectories of SWE-agent solving those task instances.
- Train local LMs on these trajectories to improve their software engineering capabilities (SWE-agent-LM-32B).
🚀 Get Started
Check out the documentation for a complete guide on how to use SWE-smith, including how to
- Install the repository locally or as a PyPI package.
- Create Task Instances for any Python repository with SWE-smith.
- Use your task instance to train your own SWE-agents
🏎️ Quick Start
Install the repo:
git clone https://github.com/SWE-bench/SWE-smith
cd SWE-smith
conda create -n smith python=3.10;
conda activate smith;
pip install -e .
Then, check out scripts/cheatsheet.sh for scripts to (1) create execution environments, (2) create task instances, and (3) train SWE-agents.
[!TIP] SWE-smith requires Docker to create execution environments. SWE-smith was developed and tested on Ubuntu 22.04.4 LTS. We do not plan on supporting Windows or MacOS.
💿 Resources
In addition to this toolkit, we've also provided several artifacts on the SWE-bench HuggingFace, including:
- 50k Python Task Instances, created using SWE-smith.
- SWE-agent-LM-32B, trained using SWE-smith. Achieves 41.6% pass@1 on SWE-bench Verified!
- 5k Trajectories that SWE-agent-LM-32B was trained on.
And there's more coming!
💫 Contributions
Excited about SWE-smith? We're actively working on several follow ups, and love meaningful collaborations! What we're thinking about...
- Make SWE-smith work for non-Python languages
- New bug generation techniques
- Train SWE-agents with more trajectories and new methods
Check out the Contributing Guide for more.
Contact Person: John Yang, Kilian Lieret (Email: johnby@stanford.edu)
🪪 License
MIT. Check LICENSE for more information.
✍️ Citation
@misc{yang2025swesmith,
title={SWE-smith: Scaling Data for Software Engineering Agents},
author={John Yang and Kilian Leret and Carlos E. Jimenez and Alexander Wettig and Kabir Khandpur and Yanzhe Zhang and Binyuan Hui and Ofir Press and Ludwig Schmidt and Diyi Yang},
year={2025},
eprint={2504.21798},
archivePrefix={arXiv},
primaryClass={cs.SE},
url={https://arxiv.org/abs/2504.21798},
}
📕 Related Works
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swesmith-0.0.3.tar.gz.
File metadata
- Download URL: swesmith-0.0.3.tar.gz
- Upload date:
- Size: 85.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7003ad8601278f7bbda3d075bcbde78e51703a10115897c2a9b14a549a33e544
|
|
| MD5 |
243666f87421e6f7387abe4230e622f0
|
|
| BLAKE2b-256 |
44b6e7dbdaa9fcc3594bbbc420fbdb1a722f5b344ff632cff9e1cc10044ae7b8
|
File details
Details for the file swesmith-0.0.3-py3-none-any.whl.
File metadata
- Download URL: swesmith-0.0.3-py3-none-any.whl
- Upload date:
- Size: 109.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
377263b7815847051c66f8435e226ba11a0f5afc44f2eb58fa03116c39b18537
|
|
| MD5 |
b8bb8624bce5493ae3b6a2448610a0e6
|
|
| BLAKE2b-256 |
d5a2d39872b1a06e944a7126ac48ca310b854656459937571022efa01519af79
|