SWE-agent

SWE-agent

SWE-agent takes a GitHub issue and tries to automatically fix it, using GPT-4, or your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Stars: 13448

Visit
 screenshot

SWE-agent is a tool that turns language models (e.g. GPT-4) into software engineering agents capable of fixing bugs and issues in real GitHub repositories. It achieves state-of-the-art performance on the full test set by resolving 12.29% of issues. The tool is built and maintained by researchers from Princeton University. SWE-agent provides a command line tool and a graphical web interface for developers to interact with. It introduces an Agent-Computer Interface (ACI) to facilitate browsing, viewing, editing, and executing code files within repositories. The tool includes features such as a linter for syntax checking, a specialized file viewer, and a full-directory string searching command to enhance the agent's capabilities. SWE-agent aims to improve prompt engineering and ACI design to enhance the performance of language models in software engineering tasks.

README:

swe-agent.com

Documentation  |   Discord  |   Preprint  |   EnIGMA preprint

SWE-agent turns LMs (e.g. GPT-4) into software engineering agents that can resolve issues in real GitHub repositories and more.

On SWE-bench, SWE-agent resolves 12.47% of issues of the full test set and 23% of issues of SWE-bench lite. SWE-agent EnIGMA solves more than 3x more challenges of the offensive cybersecurity NYU CTF benchmark than the previous SOTA agent.

We accomplish our results by designing simple LM-centric commands and feedback formats to make it easier for the LM to browse the repository, view, edit and execute code files. We call this an Agent-Computer Interface (ACI). Read more about it in our paper!

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

swe-agent-gui-demo

🚀 Get started!

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

Read our documentation to learn more:

Our most recent lecture touches on the project's motivation, showcases our research findings and provides a hands-on tutorial on how to install, use, and configure SWE-agent:

🕵️ 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). The EnIGMA project introduced multiple features that are available in all modes of SWE-agent, such as the debugger and server connection tools and a summarizer to handle long outputs.

💫 Contributions

  • If you'd like to ask questions, learn about upcoming features, and participate in future development, join our Discord community!
  • If you'd like to contribute to the codebase, we welcome issues and pull requests!

Contact person: John Yang and Carlos E. Jimenez (Email: [email protected], [email protected]).

📝 Citation

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

@misc{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 Narasimhan and Ofir Press},
      year={2024},
      eprint={2405.15793},
      archivePrefix={arXiv},
      primaryClass={cs.SE}
}

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

@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 Test build containers Release to dockerhub (nightly) Release to dockerhub (release) build-docs codecov pre-commit.ci status Markdown links

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for SWE-agent

Similar Open Source Tools

For similar tasks

For similar jobs