Skip to content
← Tools / Skills
ToolSWE-bench team/10 trustVerified

SWE-smith

Scale training data for software engineering agents by synthesizing bugs into real codebases.

Visit official site →

About

SWE-bench proved that agents can fix real bugs, but its ~2,300 hand-filtered instances are far too few to train on. SWE-smith fixes the data problem by manufacturing it: given any Python codebase, it automatically injects bugs — LM-generated errant rewrites, procedural AST modifications, undone PRs, and bug combinations — then runs the test suite to keep only the bugs that actually break tests. The result is 50,000+ task instances across 128 real repositories, each with a complete test setup and LM-crafted issue text.

This is the toolkit behind a wave of SWE-agent training work: the paper's authors fine-tuned Qwen 2.5 Coder on SWE-smith data (with Claude-generated expert trajectories) to a new open-weight state of the art on SWE-bench Verified, and Meta's SWE-RL and DeepSWE pipelines both consume SWE-smith data. It is MIT-licensed and maintained by the SWE-bench team.

The honest caveat: synthesized bugs are not real bugs — models trained on them can overfit to bug-shaped problems and underperform on genuine issue reports. It is also Python-only and compute-hungry (environment setup per repo). Use it for what it is: the best available way to get training-scale SWE data, not a substitute for real-world evaluation.

What it can do

  • Automatic bug synthesis: LM rewrites, procedural AST modification, PR undo, combined bugs
  • Execution-validated instances: only bugs that break real tests are kept
  • 50k+ instances across 128 real Python repos with full environments
  • LM-generated realistic issue descriptions per instance
  • HuggingFace dataset (SWE-bench/SWE-smith-trajectories) for direct training use
  • MIT licensed; from the SWE-bench team (arXiv:2504.21798)

Setup

  1. Clone https://github.com/SWE-bench/SWE-smith and install dependencies (Python, Docker for execution environments).
  2. Point the pipeline at a Python repository; SWE-smith sets up the SWE-agent execution environment automatically.
  3. Choose bug-generation strategies (LM rewrite, procedural AST edits, PR mirrors, combinations) and difficulty.
  4. Generate task instances with tests and issue text; export the dataset or expert trajectories for training.

Prerequisites

Python 3, Docker; familiarity with SWE-bench-style evaluation; significant compute for environment setup.

Use cases

evalscoderesearchmlopsllm

Works with

Trust score — 7/10

/10 trustVerified

Scored 7/10 (verified tier, metrics-v1). Evidence: SWE-smith, 802 GitHub stars; from the SWE-bench research team.; Trust data reconstructed by coordinator after parallel-worker file overwrite; scores evidence-based from entry metadata..

★ 802 GitHub stars

Sources

Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.