Skip to main content
Vantaige
SWE-Agent screenshot
SWE-Agent logo

SWE-Agent

Free

SWE-Agent is an open-source autonomous software engineering agent from Princeton University that uses a custom Agent-Computer Interface to resolve GitHub issues, fix bugs, and tackle cybersecurity challenges. Free, MIT-licensed, model-agnostic.

Features:Open Source

SWE-Agent is an autonomous software engineering agent built by researchers at Princeton University and Stanford University. Released in 2024 and presented at NeurIPS 2024, the tool takes a GitHub issue URL and attempts to write a patch that resolves it, using whichever language model you supply. The project is maintained by John Yang, Carlos Jimenez, Kilian Lieret, and Ofir Press under the Princeton NLP group. It is free, MIT-licensed, and lives entirely on your own infrastructure.

The agent's defining idea is the Agent-Computer Interface (ACI), a purpose-built abstraction layer that replaces raw shell access with structured commands optimized for how language models process information. File viewing, search, and editing are surfaced as concise, bounded operations rather than open-ended terminal calls. The same GPT-4 model scores roughly double on SWE-bench when given ACI tools versus raw bash, a finding detailed in the NeurIPS 2024 paper. Beyond issue resolution, SWE-Agent includes EnIGMA mode for offensive cybersecurity tasks and supports batch processing, YAML-based full configuration, and the SWE-ReX runtime for parallelized cloud execution. The project's mini-SWE-agent variant, roughly 100 lines of Python, scores over 74% on SWE-bench Verified using a modern frontier model.

What SWE-Agent actually does in May 2026

At its core, SWE-Agent accepts a GitHub issue URL and a model API key, then runs an autonomous loop that reads the repository, reproduces the bug, edits code, and tests the fix. The agent loop is driven by the ACI: every file view is bounded to prevent context overflow, edits run through a linter that auto-reverts broken syntax, and the agent's state (current file, cursor position) is tracked by the runtime rather than inferred from conversation history.

The current stable release is v1.1.0 (May 22, 2025), which introduced SWE-smith trajectory generation and the SWE-agent-LM-32b open-weights model. The architecture supports any LLM through litellm, including OpenAI, Anthropic, Google, and local models. Parallel execution is handled by SWE-ReX, which can route sandboxed runs to Docker, AWS, Modal, or Fargate backends. Every run produces a structured trajectory file suitable for research replay, fine-tuning, or auditing.

EnIGMA, introduced in v0.7.0 (September 2024), is a separate mode for capture-the-flag cybersecurity challenges. It adds Interactive Agent Tools and a summarizer for handling long terminal outputs from exploitation scripts, achieving a 3.3x improvement over previous agents on the NYU CTF benchmark. EnIGMA was presented as a separate paper at ICML 2025.

The mini-SWE-agent project, released mid-2025, takes the opposite philosophy: strip everything down to a single bash tool and a simple ReAct loop. It achieves over 74% on SWE-bench Verified using Gemini or Claude, matching the performance of the full agent with 100x less code. For new users who want results without YAML configuration, the Princeton team now recommends starting with mini-SWE-agent rather than the full framework.

"The insight that bash is all a modern LLM needs to solve coding tasks is very validating. Very instructive and inspiring to start hacking." - scottyeager, Hacker News, July 2025

Where SWE-Agent sits versus OpenHands and Aider

Three open-source coding agents dominate the research leaderboards: SWE-Agent, OpenHands, and Aider. They share a mission but differ mechanically in almost every dimension.

SWE-Agent vs OpenHands: OpenHands runs inside Docker containers with an event-stream architecture: Agent produces Actions, the Environment executes them and returns Observations, and the loop continues. Each session gets SSH access, a Jupyter kernel for Python execution, and a BrowserGym interface for web automation. Multi-agent delegation is native: a parent agent can spin up sub-agents for specific subtasks and integrate their results. OpenHands also ships a polished web UI and a VSCode extension. SWE-Agent has none of that. It is CLI-only, has no web UI, and its multi-agent support is experimental. What SWE-Agent has that OpenHands lacks is EnIGMA's cybersecurity mode, a deeper YAML configuration surface for researchers, and the SWE-ReX parallel execution engine. OpenHands suits teams who want a general-purpose autonomous developer. SWE-Agent suits researchers and developers who want to control every part of the agent loop.

SWE-Agent vs Aider: Aider is git-first: every edit becomes an auto-committed, named commit in your repository's history. Aider runs interactively from the terminal, excels at collaborative back-and-forth with a developer, and uses roughly 4.2x fewer tokens per task because it stays shallow on repository context. SWE-Agent runs non-interactively in autonomous mode, generates structured trajectories, and has a much higher SWE-bench ceiling because the ACI allows deeper repository traversal. Aider is better for paired, iterative coding sessions. SWE-Agent is better for fully automated, asynchronous issue resolution with no developer in the loop. Neither has a cybersecurity mode; that remains unique to SWE-Agent's EnIGMA variant.

For commercial context, both SWE-Agent and OpenHands significantly undercut Devin on price (free vs per-ACU billing) while matching or exceeding it on benchmark performance. Cursor and Cline occupy a different niche, IDE-integrated completion and chat rather than autonomous issue resolution, so they complement rather than compete directly with SWE-Agent.

"SWE-bench only tests issue resolution in Python repositories, limiting predictive value for real-world scenarios across languages and task types." - ToolHalla AI, comparative analysis, 2026

What the agent loop reality looks like

Running SWE-Agent follows a consistent pattern. You install via pip install sweagent, set your LLM API key in environment variables, and invoke the CLI with a GitHub issue URL and your chosen model. The agent clones the repository into a sandbox, reads the issue, explores relevant files through ACI commands, makes targeted edits, and attempts to run the test suite. The run produces a patch file and a trajectory log.

The ACI design is what separates a successful run from a failed one. On repositories with clear, well-specified issues and Python test coverage, the agent resolves a meaningful fraction of problems without human intervention. On ambiguous issues ("it crashed on my machine"), the agent either fails cleanly or produces a plausible but incomplete patch. The SWE-bench-Live benchmark, which tests truly novel issues with no dataset contamination, shows both SWE-Agent and OpenHands at roughly 18-20%, a sobering gap from the 70%+ numbers on curated benchmarks. Real production use requires human review of every proposed patch.

The February 2025 SWE-Agent 1.0 release introduced SWE-ReX, which made parallel evaluation practical. Researchers can now run hundreds of issue-resolution attempts simultaneously across Modal or AWS backends. For teams evaluating agent quality at scale, this eliminates the wall-clock time bottleneck that made the original sequential execution impractical for large backlogs.

Token cost is a recurring uncertainty. SWE-Agent does not surface per-run cost estimates before execution. Cost depends entirely on model choice, issue complexity, and how many ACI turns the agent takes. Experienced users report averaging several hundred thousand tokens per complex issue using Claude or GPT-4o, translating to $1-5 per issue at current API rates. For batch processing, the team recommends provider-level batch APIs to cut costs by 50%.

The v1.0 upgrade also introduced breaking changes that caught some users off guard. The messages field in trajectory data was renamed to query, tool bundles were renamed, and the CLI subcommand structure changed significantly. Teams running SWE-Agent as part of evaluation pipelines needed to update their tooling. The team documented the changes in migration notes, but the churn was a real cost for anyone not following the repository closely. Version discipline matters with SWE-Agent more than with most open-source tools because the research pace is fast and the team prioritizes benchmark improvements over API stability.

Who SWE-Agent is built for

SWE-Agent was built for researchers first. The YAML configuration system, trajectory logging, support for custom tool bundles, and academic paper lineage all point at a tool that expects its users to read the documentation and modify the source. The 19,100 GitHub stars and citations from IBM, NVIDIA, Meta, Nebius, and Anyscale reflect that audience. It is adopted widely in ML research labs as the baseline to beat for new agent designs.

Beyond research, SWE-Agent fits solo developers and small teams who want autonomous issue triage. The workflow is: feed the agent a backlog of labeled GitHub issues, review the patches it generates, merge the ones that pass CI. This is not turnkey, it requires familiarity with your test suite and careful review, but it is a real workflow that teams report saving hours per week on well-specified bug fixes.

EnIGMA opens a distinct user segment: security researchers and CTF competitors. The 3.3x improvement on NYU CTF challenges and CyBench results make it one of the stronger freely available automated penetration-testing tools. Security teams at universities and research-oriented companies are the primary adopters here.

What SWE-Agent is not

SWE-Agent is not a product for non-technical users. There is no hosted web UI, no one-click install for non-developers, and no customer support beyond GitHub issues and the Discord community. If your evaluation criteria include a polished interface, look at OpenHands instead.

It is not a persistent coding assistant. Unlike Aider's interactive mode or IDE-based tools like Cursor, SWE-Agent has no memory between runs. The agent starts fresh for every invocation. Users expecting it to accumulate knowledge about their codebase across sessions will be disappointed. Workarounds exist (supplying project context in YAML config), but they are manual.

It is not a replacement for developer judgment on patch quality. SWE-bench Verified performance in the high 70s is impressive, but those benchmarks are curated. Real-world repositories with partial test coverage, ambiguous specifications, and cross-language dependencies bring performance down substantially. Every SWE-Agent patch that goes to production should pass your CI pipeline and receive a human code review.

It is not a commercial product with vendor SLAs, enterprise support, or compliance certifications. For teams that need guaranteed uptime, audit trails, or SSO integration, Devin's enterprise tier or a managed alternative is more appropriate.

User Reviews

No reviews yet. Be the first to share your experience!

Sign in to write a review.

Featured in collections

Curated lists that include SWE-Agent.

Related articles

Guides and articles related to SWE-Agent.