# SWE-agent

Autonomous coding agent that takes GitHub issues and fixes them using LLMs, achieving state-of-the-art results on SWE-bench.

## Summary
SWE-agent is an open-source autonomous coding agent that takes GitHub issues as input and produces pull request fixes using large language models. It achieves state-of-the-art results on the SWE-bench benchmark and provides a configurable agent-computer interface (ACI) for optimizing how LLMs interact with development environments.


## Guide
SWE-agent is one of the most important projects in the autonomous coding agent space. It demonstrated that LLMs can autonomously fix real-world GitHub issues, and its agent-computer interface design influenced how many subsequent agents structure their tool interactions.

### What it is
SWE-agent is an open-source autonomous coding agent that takes GitHub issues as input and produces pull request fixes. It uses an agent-computer interface (ACI) that defines how the LLM interacts with the development environment — file navigation, code search, editing, and testing. The agent operates autonomously, requiring no human intervention from issue to PR.

### Why it matters
The SWE-bench benchmark, which SWE-agent helped popularize, tests agents on real-world GitHub issues from popular Python repositories. SWE-agent's state-of-the-art results on this benchmark demonstrated that autonomous coding is viable, not just a research curiosity. Its ACI design also showed that tool interface design is a critical factor in agent performance.

### How it works
Given a GitHub issue, SWE-agent clones the repository, navigates the codebase to understand the problem, identifies the relevant files, makes edits, runs tests to verify the fix, and creates a pull request. The ACI provides optimized tools for each step — search commands that work well with LLM context windows, editing interfaces that minimize errors, and testing workflows that catch regressions.


## Use Cases
- Automated bug fix pipelines: Feed GitHub issues to SWE-agent and let it attempt fixes automatically, submitting PRs for human review.
- Agent benchmarking research: Use SWE-agent as a baseline for benchmarking new agent architectures, tool designs, and model capabilities.
- Agent-computer interface research: Study how different tool designs affect agent performance by modifying SWE-agent's ACI and measuring results on SWE-bench.

## Alternatives
- Use Claude Code for interactive coding sessions vs Claude Code: SWE-agent is autonomous and issue-driven. Claude Code is interactive and conversational, better suited for iterative development workflows.
- Use Aider for model-agnostic pair programming vs Aider: SWE-agent is designed for autonomous operation. Aider is designed for interactive pair programming with model flexibility.

### Getting Started
- Read the documentation: https://swe-agent.com/docs
- Inspect the repository: https://github.com/SWE-agent/SWE-agent

### FAQ
- Is SWE-agent open source?
  - Yes. SWE-agent is released under the MIT license, making it fully open source for inspection, modification, and redistribution.
- Who should use SWE-agent?
  - Researchers studying autonomous coding agents, teams building automated bug-fixing pipelines, and developers interested in agent-computer interface design.
- How does SWE-agent compare to other coding agents?
  - SWE-agent is unique in its focus on autonomous issue fixing and benchmark performance. Unlike interactive tools like Aider or Claude Code, it's designed to operate without human intervention.
## Why It Matters
SWE-agent matters because it was one of the first projects to demonstrate that LLMs can autonomously fix real-world GitHub issues at scale. Its agent-computer interface design influenced how many subsequent coding agents structure their tool interactions, and its benchmark results set a standard for the field.


## Best For
- Researchers benchmarking autonomous coding agent capabilities
- Teams studying how LLMs interact with real-world development environments
- Developers building autonomous issue-fixing pipelines for GitHub repositories

## Not For
- Developers who need interactive, conversational coding assistance
- Teams looking for a production-ready CI/CD integration for automated bug fixing

## What It Actually Does
- Autonomous issue fixing: SWE-agent takes a GitHub issue as input and autonomously produces a fix, from understanding the problem to writing the code and creating a pull request.
  - Why it matters: This is the end-to-end vision for coding agents: describe a problem and get a fix, with no human intervention required.
- Agent-computer interface design: SWE-agent's ACI defines how the agent interacts with the development environment — file navigation, search, editing, and testing — optimized for LLM capabilities.
  - Why it matters: The ACI design influenced many subsequent coding agents and demonstrates that how an agent interacts with tools matters as much as the model itself.
- SWE-bench benchmark leader: Achieves state-of-the-art results on the SWE-bench benchmark, which tests agents on real-world GitHub issues from popular Python repositories.
  - Why it matters: Benchmark results provide objective evidence of capability and help researchers compare different agent approaches.

## Typical Use Cases
- Autonomous bug fixing research: Use SWE-agent to study how well LLMs can understand bugs, navigate codebases, and produce correct fixes without human guidance.
- Agent design experimentation: Experiment with different ACI configurations to understand how tool design affects agent performance on coding tasks.
- Issue triage and fixing pipelines: Build pipelines that automatically attempt to fix incoming GitHub issues and submit PRs for human review.

## How It Compares
- Choose SWE-agent for autonomous issue fixing vs interactive coding agents: SWE-agent is designed for autonomous operation: give it an issue and get a fix. Interactive tools like Aider or Claude Code are better for conversational coding sessions.

## Command Line
### Install SWE-agent
Install via pip, then configure your GitHub token and model provider to start running autonomous issue fixes.

```bash
pip install swe-agent
```

## Facts
- Category: agents
- Resource type: agent
- Open source: yes
- License: MIT
- Last verified: 2026-05-27
- GitHub repo: SWE-agent/SWE-agent
- GitHub stars: 19300

## Capabilities
- workflow-orchestration

## Structured Use Case Tags
- developer-workflow

## Getting Started
- Open the GitHub repository: https://github.com/SWE-agent/SWE-agent
- Read the documentation: https://swe-agent.com/docs
- Visit the project website: https://swe-agent.com

## Links
- GitHub: https://github.com/SWE-agent/SWE-agent
- Homepage: https://swe-agent.com
- Docs: https://swe-agent.com/docs

## Structured Outputs
- JSON: https://www.openagent.bot/agents/swe-agent.json
- Markdown: https://www.openagent.bot/agents/swe-agent.md
- Canonical: https://www.openagent.bot/agents/swe-agent
