MCPcopy Index your code
hub / github.com/SWE-bench/SWE-smith

github.com/SWE-bench/SWE-smith @v0.0.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.6 ↗ · + Follow
1,059 symbols 3,286 edges 115 files 262 documented · 25%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Kawhi the SWE-smith

Build License


SWE-smith is a toolkit for training SWE-agents. You can: * Turn any Github repository into a SWE-gym. * Create unlimited tasks (e.g., file localization, program repair, SWE-bench) for that repo. * Train an LM to become a better SWE (SWE-agent-LM-32B).

⚒️ Build Environments

If you're interested in turning a GitHub repository into a SWE-gym, install the package from source.

[!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.

You can then build a dataset for the repository by... 1. Creating an environment 2. Synthesizing task instances 3. Keep tasks that break 1+ unit tests 4. Generating issue text for your tasks

🏋️ Train SWE-agent's

Training SWE-agent's using the SWE-smith dataset is super simple.

from swesmith.profiles import registry
from datasets import load_dataset
ds = load_dataset("SWE-bench/SWE-smith", split="train") # Loads all 52k task instances
for task in ds:
    rp = registry.get_from_inst(task)  # Get the RepoProfile for the task
    container = rp.get_container(task) # Returns pointer to a Docker container with the task initialized

    """TODO: Train!"""

SWE-smith has been used to * Fine-tune Qwen 2.5 Coder into SWE-agent-LM-32B (A +32% jump on SWE-bench Verified!) using SWE-agent [Tutorial] * Perform GRPO style reinforcement learning using SkyRL

💿 Resources

And there's more coming!

💫 Contributions

We're actively working on several follow ups! Check out the Contributing Guide for more.

Contact Person: John Yang, Kilian Lieret (Email: johnby@stanford.edu)

🪪 License

CC-BY-4.0. 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}, 
}

📕 Our Other Projects

SWE-bench    SWE-agent    SWE-ReX    sb-cli

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 422
Class 333
Method 296
FuncType 2
Route 2
Struct 2
Interface 1
TypeAlias 1

Languages

Python89%
Rust2%
Ruby2%
TypeScript2%
Go2%
C2%

Modules by API surface

swesmith/profiles/python.py148 symbols
swesmith/profiles/golang.py119 symbols
tests/profiles/test_base.py41 symbols
swesmith/profiles/javascript.py39 symbols
swesmith/profiles/base.py31 symbols
tests/test_logs/files/rust/cookie.rs21 symbols
tests/bug_gen/adapters/test_javascript.py21 symbols
tests/bug_gen/adapters/test_c_sharp.py20 symbols
tests/test_logs/files/ruby/query_parser.rb18 symbols
swesmith/bug_gen/adapters/javascript.py18 symbols
tests/test_logs/files/javascript/sample.js17 symbols
tests/test_logs/files/go/logger.go17 symbols

For agents

$ claude mcp add SWE-smith \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page