# SWE-agent (2024)

> An agent that fixes GitHub issues by navigating, editing and testing a repository through commands designed for language models rather than people.

Page: https://mralbu.github.io/ai-datasets/p/swe-agent

## Key facts

- Title: SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
- Authors: John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, Ofir Press
- Venue: NeurIPS 2024
- Category: LLMs
- Paper: https://www.alphaxiv.org/abs/2405.15793

## Why it matters

It showed that the interface around a model can matter as much as the model, and coined the agent-computer interface. SWE-agent and its later minimal version became standard scaffolds for evaluating models on SWE-bench and its successors, and the edit-run-check loop is the core of today's coding agents.

## The idea

Language models are a new kind of computer user, so give them their own interface. Instead of a raw Linux shell, SWE-agent offers a few commands: search a file or directory with a short summary of matches, view 100 lines of a file at a time, and edit a range of lines with a linter that rejects edits that break the syntax. The model works in a ReAct-style loop, usually reproducing the bug, finding the code, editing it and rerunning its script.

## The result

With GPT-4 Turbo it resolved 12.47% of the full SWE-bench test set, against 3.8% for the best earlier non-interactive system, and 18.0% of SWE-bench Lite, against 11.0% for the same model in a plain shell. Removing the linting check or showing whole files instead of 100-line windows each cost 3 to 5 points.

## The data

- [SWE-bench (2023)](https://mralbu.github.io/ai-datasets/d/swe-bench.md): 2,294 GitHub issues from 12 Python projects; a fix counts only if the project's tests pass.

## Builds on

- [ReAct (2022)](https://mralbu.github.io/ai-datasets/p/react.md)
- [SWE-bench (2023)](https://mralbu.github.io/ai-datasets/p/swe-bench.md)

## Led to

- [Agentless (2024)](https://mralbu.github.io/ai-datasets/p/agentless.md)
- [SWE-bench Pro (2025)](https://mralbu.github.io/ai-datasets/p/swe-bench-pro.md)

## Part of

- [Coding agents](https://mralbu.github.io/ai-datasets/t/coding-agents.md) (step 4 of 8)
