Metadata-Version: 2.4
Name: swesmith
Version: 0.0.5
Summary: The official SWE-smith package - A toolkit for generating software engineering training data at scale.
Author-email: John Yang <byjohnyang@gmail.com>
License: MIT License
        
        Copyright (c) 2024 John Yang
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Documentation, https://github.com/SWE-bench/SWE-smith
Project-URL: Bug Reports, https://github.com/SWE-bench/SWE-smith/issues
Project-URL: Source Code, https://github.com/SWE-bench/SWE-smith
Project-URL: Website, https://swesmith.com
Keywords: nlp,benchmark,code
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: astor
Requires-Dist: datasets
Requires-Dist: docker
Requires-Dist: ghapi
Requires-Dist: jupyter
Requires-Dist: libcst
Requires-Dist: litellm
Requires-Dist: matplotlib
Requires-Dist: modal
Requires-Dist: openai
Requires-Dist: pre-commit
Requires-Dist: python-dotenv
Requires-Dist: rich
Requires-Dist: sglang
Requires-Dist: sparklines
Requires-Dist: swebench
Requires-Dist: tiktoken
Requires-Dist: tqdm
Requires-Dist: tree-sitter>=0.23
Requires-Dist: tree-sitter-c==0.23.4
Requires-Dist: tree-sitter-go
Requires-Dist: tree-sitter-javascript
Requires-Dist: tree-sitter-java
Requires-Dist: tree-sitter-ruby
Requires-Dist: tree-sitter-rust==v0.23.2
Requires-Dist: unidiff
Requires-Dist: textual
Requires-Dist: tree-sitter-php>=0.23.11
Provides-Extra: docs
Requires-Dist: mkdocs; extra == "docs"
Requires-Dist: mkdocs-material; extra == "docs"
Requires-Dist: mkdocs-glightbox; extra == "docs"
Requires-Dist: mkdocs-include-markdown-plugin; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.18; extra == "docs"
Requires-Dist: mike; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Dynamic: license-file

<p align="center">
  <a href="https://swesmith.com/">
    <img src="docs/assets/banner.png" style="height: 10em" alt="Kawhi the SWE-smith" />
  </a>
</p>

<br>

<div align="center">
<a href="https://www.python.org/">
  <img alt="Build" src="https://img.shields.io/badge/Python-3.10+-1f425f.svg?color=purple">
</a>
<a href="https://copyright.princeton.edu/policy">
  <img alt="License" src="https://img.shields.io/badge/License-MIT-blue">
</a>
<a href="https://badge.fury.io/py/swesmith">
  <img src="https://badge.fury.io/py/swesmith.svg">
</a>
<a href="https://arxiv.org/abs/2504.21798">
  <img src="https://img.shields.io/badge/arXiv-2504.21798-b31b1b.svg">
</a>
</div>

<hr />

SWE-smith is a toolkit for training software engineering (SWE) agents. With SWE-smith, you can:
* Create an *unlimited* number of [SWE-bench](https://github.com/SWE-bench/SWE-bench) style task instances for any Python repository.
* *Generate trajectories* of [SWE-agent](https://github.com/SWE-agent/SWE-agent) solving those task instances.
* *Train local LMs* on these trajectories to improve their software engineering capabilities ([SWE-agent-LM-32B](https://huggingface.co/SWE-bench/SWE-agent-LM-32B)).

## 🚀 Get Started
Check out the [documentation](https://swesmith.com/getting_started/) for a complete guide on how to use SWE-smith, including how to
* [Install](https://swesmith.com/getting_started/installation/) the repository locally or as a PyPI package.
* [Create Task Instances](https://swesmith.com/guides/create_instances/) for any Python repository with SWE-smith.
* Use your task instance to [train your own SWE-agents](https://swesmith.com/guides/train_swe_agent/)

## 🏎️ Quick Start
Install the repo:
```bash
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](https://huggingface.co/SWE-bench), including:
* [50k Python Task Instances](https://huggingface.co/datasets/SWE-bench/SWE-smith), created using SWE-smith.
* [SWE-agent-LM-32B](https://huggingface.co/SWE-bench/SWE-agent-LM-32B), trained using SWE-smith. Achieves **41.6%** pass@1 on [SWE-bench Verified](https://huggingface.co/datasets/SWE-bench/SWE-bench_Verified)!
* [5k Trajectories](https://huggingface.co/datasets/SWE-bench/SWE-smith-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](CONTRIBUTING.md) for more.

Contact Person: [John Yang](https://john-b-yang.github.io/), [Kilian Lieret](https://lieret.net)
(Email: [johnby@stanford.edu](mailto:johnby@stanford.edu))

## 🪪 License
MIT. Check `LICENSE` for more information.

## ✍️ Citation

```bibtex
@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:
<div align="center">
  <a href="https://github.com/SWE-bench/SWE-bench"><img src="docs/assets/swebench_logo_text_below.svg" alt="SWE-bench" height="120px"></a>
  &nbsp;&nbsp;
  <a href="https://github.com/SWE-agent/SWE-agent"><img src="docs/assets/sweagent_logo_text_below.svg" alt="SWE-agent" height="120px"></a>
  &nbsp;&nbsp;
  <a href="https://github.com/SWE-agent/SWE-ReX"><img src="docs/assets/swerex_logo_text_below.svg" alt="SWE-ReX" height="120px"></a>
  &nbsp;&nbsp;
  <a href="https://github.com/SWE-bench/sb-cli"><img src="docs/assets/sbcli_logo_text_below.svg" alt="sb-cli" height="120px"></a>
</div>
