IN THIS BREAKDOWN · 10 SECTIONS
You can read 23% of this breakdown.
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.
Research notes: the problem, approach and results
SWE-bench Lite issues resolved by the same model with SWE-agent's interface against a plain shell
chance an edit eventually succeeds, at the start and after one failed attempt
median cost of a successful run (12 steps); failed runs averaged $2.52 and 21 steps
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.
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.
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.
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.
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
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦3 results tables
- ?5 interview questions with answers
- 03Key takeaways
The ideas to keep, the four design principles, the ablations and the misreadings to avoid
Free account - 04How it works
Each command, the feedback rules, the guardrail and how an agent works an issue
Premium - 05The numbers that matter
Headline results with costs, the edit-failure statistics and the failure taxonomy
Premium - 06Try it yourself
Two agent-facing tools built on the paper's principles: summarized search and a guarded edit
Premium - 07Where it breaks
What the interface cannot fix, and the limits of the evaluation
Premium - 08Using it on a deployment
Designing and testing the tools a customer's agent will use
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
