SWE-agent is a free, open source ai assisted coding project written in Python and released under MIT. It has 20,344 GitHub stars, 2,224 forks and 102 open issues, and was last pushed 3 days ago. On this registry it ranks #13 of 24 tracked projects in AI Assisted Coding, with 5 head-to-head comparisons available. It gained 34 stars over the last 6 tracked days.

What is SWE-agent?

What it is

SWE-agent is a Python, MIT-licensed open-source project in the AI-assisted coding and agent ecosystem. It is an agent-based model for developer tools that takes a GitHub issue and tries to automatically fix it using a chosen language model. The project is associated with NeurIPS 2024 and is maintained by researchers from Princeton University and Stanford University.

The concrete problem it addresses is manual repository maintenance: a maintainer must read an issue, reproduce it, inspect code, edit files, test, and submit a change. SWE-agent packages that workflow into an autonomous loop in which the language model uses tools to work on real GitHub repositories. It also extends the same idea to offensive cybersecurity challenges and custom coding tasks.

Key capabilities

  • It takes a GitHub issue as input and attempts to fix the issue in a real repository with a chosen language model.
  • It lets the language model autonomously use tools, rather than forcing a fixed step-by-step script, and the README describes this as leaving maximal agency to the model.
  • It uses a configurable setup governed by a single YAML file, so users can define or adjust agent behavior without editing multiple configuration sources.
  • It includes EnIGMA, a mode for offensive cybersecurity capture-the-flag challenges, with results reported on multiple cybersecurity benchmarks.
  • It supports custom tasks, coding challenges, and SWE-bench benchmarking workflows, including batch mode.

Who uses it and how

  • Researchers and developers run the command-line hello-world workflow to fix a GitHub issue with a chosen language model.
  • Benchmarking users run batch mode to evaluate SWE-agent on SWE-bench rather than on one repository issue.
  • Cybersecurity participants use EnIGMA for capture-the-flag tasks, while the README says to use SWE-agent 0.7 until EnIGMA is updated for 1.0.
  • Contributors use issues and pull requests for changes, with larger code changes discussed in issues first.

Getting started

The README recommends trying SWE-agent through GitHub Codespaces and also directs users to source installation documentation. Common workflows are the command-line hello-world run, SWE-bench batch mode, and EnIGMA cybersecurity mode, with EnIGMA currently pointing to SWE-agent 0.7.

When to use it — and when not to

Use SWE-agent when the full SWE-agent research framework, SWE-bench benchmarking, or EnIGMA cybersecurity workflows are needed. Do not choose it as the default new project if the simpler mini-SWE-agent is acceptable, because the README says most current development effort is on mini-SWE-agent and recommends it going forward. Also, EnIGMA is not fully aligned with the 1.0 codebase, since the README instructs users to use SWE-agent 0.7 while EnIGMA is updated for 1.0.

project readme (upstream, from github) — read inline

Docs Slack arxiv 2405.15793

[!warning] Most of our current development effort is on mini-swe-agent, which has superseded SWE-agent. It matches the performance performance of SWE-agent, while being much simpler. See the FAQ for more details about the differences. Our general recommendation is to use mini-SWE-agent instead of SWE-agent going forward.

SWE-agent enables your language model of choice (e.g. GPT-4o or Claude Sonnet 4) to autonomously use tools to fix issues in real GitHub repositories, find cybersecurity vulnerabilities, or perform any custom task.

  • State of the art on SWE-bench among open-source projects
  • Free-flowing & generalizable: Leaves maximal agency to the LM
  • Configurable & fully documented: Governed by a single yaml file
  • Made for research: Simple & hackable by design

SWE-agent is built and maintained by researchers from Princeton University and Stanford University.

📣 News

🚀 Get started!

👉 Try SWE-agent in your browser: Open in GitHub Codespaces (more information)

Read our documentation to learn more:

SWE-agent for offensive cybersecurity (EnIGMA)

SWE-agent: EnIGMA is a mode for solving offensive cybersecurity (capture the flag) challenges. EnIGMA achieves state-of-the-art results on multiple cybersecurity benchmarks (see leaderboard). Please use SWE-agent 0.7 while we update EnIGMA for 1.0.

In addition, you might be interested in our other projects:

        

  

Contributions

If you'd like to contribute to the codebase, we welcome issues and pull requests! For larger code changes, we always encourage discussion in issues first.

Citation & contact

SWE-agent is an academic project started at Princeton University by John Yang*, Carlos E. Jimenez*, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. Contact person: John Yang, Carlos E. Jimenez, and Kilian Lieret (Email: [email protected], [email protected], [email protected]).

If you found this work helpful, please consider citing it using the following:

SWE-agent citation
@inproceedings{yang2024sweagent,
  title={{SWE}-agent: Agent-Computer Interfaces Enable Automated Software Engineering},
  author={John Yang and Carlos E Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik R Narasimhan and Ofir Press},
  booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
  year={2024},
  url={https://arxiv.org/abs/2405.15793}
}

If you used the summarizer, interactive commands or the offensive cybersecurity capabilities in SWE-agent, please also consider citing:

EnIGMA citation
@misc{abramovich2024enigmaenhancedinteractivegenerative,
      title={EnIGMA: Enhanced Interactive Generative Model Agent for CTF Challenges},
      author={Talor Abramovich and Meet Udeshi and Minghao Shao and Kilian Lieret and Haoran Xi and Kimberly Milner and Sofija Jancheska and John Yang and Carlos E. Jimenez and Farshad Khorrami and Prashanth Krishnamurthy and Brendan Dolan-Gavitt and Muhammad Shafique and Karthik Narasimhan and Ramesh Karri and Ofir Press},
      year={2024},
      eprint={2409.16165},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2409.16165},
}

🪪 License

MIT. Check LICENSE.

Pytest build-docs codecov pre-commit.ci status Markdown links

Frequently asked questions

Is SWE-agent free to use?

SWE-agent is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does SWE-agent do?

AI agents that autonomously fix code and resolve GitHub issues

What is SWE-agent written in?

SWE-agent is primarily written in Python. Its source is publicly available at https://github.com/swe-agent/swe-agent, and it has 20,344 GitHub stars.