SWE-agent is an open source coding agent built by researchers at Princeton and Stanford. Give it a GitHub issue and it tries to fix the problem automatically, driving shell, editor, and search tools inside a sandboxed copy of the repository with a language model of your choice. It was presented at NeurIPS 2024 and holds state-of-the-art results on SWE-bench among open source projects.
Quick verdict
Developers and researchers who want an autonomous first attempt at real GitHub issues should shortlist SWE-agent: it is free MIT software, works with many models, and records every sandboxed run. Avoid it if you need offline use, one-click setup, or a hosted service, and note the maintainers now recommend mini-swe-agent for new work. If your workflow is interactive terminal pair programming rather than autonomous issue fixing, compare Aider first.
Key features
Point the command line tool at a GitHub issue and the agent attempts a fix on its own, working through the repository until it produces a change.
Model access goes through LiteLLM, so operators can use GPT-4o, Claude, or other supported providers with their own API keys rather than being locked to one vendor.
The agent works through an agent-computer interface of purpose-built commands for viewing, editing, searching, and executing code, leaving the problem-solving strategy to the language model.
Every run executes inside a Docker sandbox, and trajectories are recorded so runs can be inspected and replayed afterward.
Behavior is governed by a single YAML configuration file with documented templates for models, tools, environments, and demonstrations.
A batch mode runs the agent across SWE-bench task sets for benchmarking, with tooling for competitive runs and output comparison.
Who will love it
Developers who triage real GitHub issues and want an autonomous first attempt at a fix will get the most from the issue-to-patch workflow.
Agent researchers benefit from the hackable design, recorded trajectories, and batch evaluation support built for SWE-bench experiments.
Python shops comfortable with pip installs, Docker, and bringing their own model keys can self-host the whole setup without paying for software.
Who should avoid it
Setup is moderately involved: Python 3.11 or newer, an editable pip install, Docker for the sandbox, and a configured model API key are all required before the first run.
The agent cannot work offline. Documented runs depend on a hosted language-model API and container images, so network access and provider billing apply.
Maintainers now steer new users toward mini-swe-agent as the simpler successor, so teams adopting SWE-agent itself should expect the ecosystem's momentum to sit elsewhere.
Alternatives and compatibility
Aider is the closest documented alternative for LLM-driven code changes from the terminal: where SWE-agent autonomously pursues a GitHub issue, Aider pair-programs interactively with git-native commits. This comparison is editorial, not vendor-endorsed.
Mini-SWE-agent from the same team is the recommended path for new work, matching SWE-agent's performance in about a hundred lines of Python.
SWE-agent runs on the operator's own Linux, macOS, or Windows machine via Python and Docker, with a Codespaces option, and there is no hosted cloud edition to switch to.
Questions worth asking
How much does SWE-agent cost to run?
The software itself is free under the MIT license with no paid edition or tiers. You supply your own language-model API key, and the model provider bills your usage separately, so running it costs whatever your chosen model charges.
How do I install and start SWE-agent?
Clone the repository and run pip install at the root, then configure a model API key. Runs execute inside a Docker sandbox, so Docker is required, and a browser-based GitHub Codespaces path is documented for trying it without local setup.
Which language models does SWE-agent support?
SWE-agent connects through LiteLLM, so it works with many hosted providers, and its README names GPT-4o and Claude Sonnet-class models as examples. You choose and configure the model, including its API key, before running.
Is SWE-agent still maintained, or should I use mini-swe-agent?
SWE-agent is still maintained, with 1.x releases through May 2025, but the maintainers now recommend mini-swe-agent for new work, saying it matches SWE-agent's performance in a simpler package. Choose SWE-agent if you want the full documented configuration system; choose mini-swe-agent if you prefer the smaller successor.
Compared with these products
No explicit proprietary baseline is recorded.