FDEInterviews logo
★ Read firstNeurIPS 2024

SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering

The 2024 Princeton paper that showed an agent's tools matter as much as its model: a purpose-built interface for searching, viewing and editing code beat a raw shell by seven points.

Breakdown by FDE Interviews · 10 min read · Updated

About the original · 2024
AUTHORS
Yang, Jimenez, Wettig, Lieret, et al.
FROM
Princeton University
PUBLISHED
May 2024 · NeurIPS 2024
CITED BY
2,192Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 23% of this breakdown.

01

The paper in one minute

Human engineers do not fix bugs in a raw terminal. They use editors with search, syntax highlighting and linting. The Princeton team asked whether language model agents also need tools built for them, and found the answer was a clear yes.

They call the tool layer an agent-computer interface (ACI): the commands an agent can run and the format of what comes back. SWE-agent's ACI is deliberately small. find_file and search_dir return a short summary of where a term appears, and refuse when there are too many hits, asking for a narrower query. A file viewer shows 100 lines at a time with line numbers and how many lines are above and below. An edit command replaces a range of lines, shows the result, and runs a linter; if the edit introduces a syntax error, it is rejected and the agent is told why. Plus the usual shell for running code and tests.

On SWE-bench, which asks agents to resolve real GitHub issues in real Python repositories and checks the result with the project's tests, SWE-agent with GPT-4 Turbo resolved 12.5% of issues. The best earlier approach, which retrieved files and generated a patch without interacting with the repository, resolved 3.8%. On the 300-issue Lite subset, the same model with only a shell resolved 11.0%; with the ACI, 18.0%.

The ablations are the lasting contribution: they show which interface choices help and which hurt, with the model held fixed.

THE IDEA, VISUALLY
AN INTERFACE DESIGNED FOR THE MODEL LM agent Agent-computer interface find_file, search_dir open / scroll (100 lines) edit + syntax check python, pytest submit Computer repo, shell, tests Design rules the authors derived: simple commands; compact actions; short, informative feedback; guardrails that stop mistakes before they cascade Full benchmark: 12.5% of issues resolved, against 3.8% for the best earlier system that did not use the repo interactively. CHANGE ONE PART, SWE-BENCH LITE % resolved, GPT-4 Turbo, Tables 1 and 3 SWE-agent, as designed 18.0 no search command 15.7 full history in context 15.0 edit without syntax check 15.0 whole file in viewer 12.7 search that pages results 12.0 plain shell 11.0 no edit command 10.3
Tools are part of the model's performance. Change one command in the interface, keep the model fixed, and the share of issues solved moves by several points.
Research notes: the problem, approach and results
18.0% vs 11.0%

SWE-bench Lite issues resolved by the same model with SWE-agent's interface against a plain shell

90.5% → 57.2%

chance an edit eventually succeeds, at the start and after one failed attempt

$1.21

median cost of a successful run (12 steps); failed runs averaged $2.52 and 21 steps

THE PROBLEM

Agents given a Linux shell struggled with real software tasks: verbose output flooded their context, editing with sed or redirection was error-prone, and one mistake cascaded.

THE IDEA

Design an agent-computer interface (ACI): a few simple commands for finding, viewing and editing code, concise feedback after each action, and a syntax check that rejects broken edits.

THE RESULT

State of the art on SWE-bench at the time (12.5% of real GitHub issues resolved, against 3.8% before), and ablations showing which interface choices mattered.

02

Why it matters to an FDE

Most agent projects start by picking a model and wiring up the customer's existing APIs as tools. This paper says the tools themselves deserve as much design effort as the prompt, and shows what good tool design looks like.

Feedback format changes behavior. A search command that showed results one at a time, like an editor's find-next, made the agent page through every match and burn its budget. It scored worse than having no search command at all (12.0% against 15.7%). A search that returned a compact summary scored best. Customer APIs that return pages of JSON need the same treatment: summarize, cap and tell the agent how to narrow its request.

Guardrails stop cascades. Rejecting edits that break syntax, with a clear message, added three points on its own. After one failed edit, the chance of eventually succeeding fell from 90.5% to 57.2%. Validate tool inputs before they change anything, and return actionable errors.

Less context can be better. Showing whole files instead of a 100-line window cut performance from 18.0% to 12.7%; keeping the full history rather than the last five observations cut it to 15.0%. More information is not more help.

Failure is slow and expensive. Successful runs finished at a median of 12 steps and $1.21; failed runs averaged 21 steps and $2.52, and 93% of successes submitted before hitting the budget. Raising the budget mostly buys more expensive failures.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 49 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦3 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The ideas to keep, the four design principles, the ablations and the misreadings to avoid

    Free account
  2. 04How it works

    Each command, the feedback rules, the guardrail and how an agent works an issue

    Premium
  3. 05The numbers that matter

    Headline results with costs, the edit-failure statistics and the failure taxonomy

    Premium
  4. 06Try it yourself

    Two agent-facing tools built on the paper's principles: summarized search and a guarded edit

    Premium
  5. 07Where it breaks

    What the interface cannot fix, and the limits of the evaluation

    Premium
  6. 08Using it on a deployment

    Designing and testing the tools a customer's agent will use

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →