SWE-agent is an open-source AI software engineering agent built by researchers from Princeton University and Stanford University that takes GitHub issues and attempts to automatically fix them using your choice of large language model. It addresses the challenge of automating real-world software engineering tasks by providing a custom agent-computer interface that significantly enhances an AI model's ability to create and edit code files, navigate entire repositories, and execute tests. SWE-agent achieved state-of-the-art performance on the SWE-bench benchmark with a 12.5 percent pass rate, demonstrating the viability of autonomous bug fixing on real-world open-source projects.
The core innovation behind SWE-agent is its carefully designed agent-computer interface that offers a small set of simple actions for viewing, searching through, and editing files, with guardrails to prevent common mistakes and concise feedback about command effects at every turn. This interface design proved more impactful than model choice alone, showing that how an AI agent interacts with code is as important as the underlying language model. SWE-agent also includes EnIGMA mode for solving offensive cybersecurity capture-the-flag challenges, achieving state-of-the-art results on multiple cybersecurity benchmarks and demonstrating the versatility of its agent architecture.
SWE-agent is designed for researchers, open-source maintainers, and engineering teams who want to experiment with autonomous software engineering agents or automate the resolution of well-defined GitHub issues. It supports multiple LLM providers, allowing users to choose between different models based on cost, speed, and capability. Compared to commercial AI coding agents like Devin, SWE-agent offers a fully open-source alternative that prioritizes reproducibility and research transparency, making it a foundational tool in the academic study of AI-driven software engineering and a practical option for teams looking to automate routine bug fixes.