En 30 secondes
In April 2024, Matthew Berman introduces Princeton’s SWE-agent and its custom tools for browsing, editing, and testing code. He discusses a project-reported SWE-bench comparison, attempts to configure the agent, and runs it on an issue in its own repository. Berman’s local setup fails on his Apple Silicon Mac and his subsequent hosted run stops at its cost limit without a verified fix. A separate author demonstration by Carlos shows an older SymPy benchmark issue passing the demonstrated tests. Historical commands, scores, and product comparisons should not be treated as current documentation or universal success rates.
- 1A coding agent for issuesSWE-agent uses language models and repository tools to attempt fixes for software issues.
- 2Historical benchmark snapshotThe project chart reports 12.29% for SWE-agent with GPT-4 and 13.84% for Devin, with the latter evaluated on a subset.
- 3Agent-computer interfaceThe project describes a linter, a bounded file viewer, directory search, and explicit feedback for empty command output.
- 4Installation problemBerman’s Docker setup fails on his Apple Silicon Mac, so he switches to a hosted environment.
- 5Run stopped by budgetHis run reaches the configured cost limit; the video does not establish that the issue was solved.
- 6A separate author exampleCarlos demonstrates a SymPy matrix issue and reports that the generated patch passes the displayed benchmark tests.
À retenir
- SWE-agent gives a language model specialized repository navigation, editing, search, and feedback tools.
- The project’s displayed SWE-bench chart reports 12.29% for SWE-agent with GPT-4 and 13.84% for Devin, with Devin evaluated on 25% of the test set.
- Berman’s Apple Silicon setup failed, and his later run was interrupted by a cost cap before the fix was verified.
- The author’s separate SymPy demonstration reproduces a bug, edits code, reruns the example, and reports passing benchmark tests.
- A benchmark percentage is an aggregate for a particular evaluation, not a calibrated probability that an arbitrary issue will be fixed.
- The 2024 setup instructions and API prices are historical; provider access and costs depend on current configuration.
Lire le texte remanié, chapitre par chapitre
SWE-agent and its benchmark
Berman introduces the Princeton project and discusses its historical SWE-bench chart. The displayed Devin result uses a subset of the test set.
I introduce SWE-agent, a coding-agent project from a Princeton team designed around an agent-computer interface. The goal is to give a language model tools to work on GitHub issues: inspect a repository, try to reproduce a problem, edit files, and produce a proposed fix. These are capabilities the project aims to provide, not a promise that every issue will be solved.
The project’s displayed SWE-bench chart reports 12.29% resolved for SWE-agent using GPT-4 and 13.84% for Devin. Its footnote says the Devin result was evaluated on 25% of the SWE-bench test set. These historical, project-presented results involve different evaluation scopes, so the chart alone cannot establish a universal head-to-head ranking.

The project illustrates an agent reading an issue, reproducing a problem involving conversion to R, searching for relevant files, and editing the likely source. I am impressed by the step-by-step interaction because a model has to find useful parts of a repository rather than receive an entire codebase in one prompt.
The team attributes its results partly to commands and feedback designed for language models. I compare the challenge of finding relevant context in a large repository with tools such as Aider, which I say uses Universal Ctags. The question is how to expose enough useful code without overwhelming the model.
Tools designed for the model
The agent-computer interface includes file viewing, search, editing feedback, and a syntax check. Berman considers the challenge of understanding larger repositories.

The project describes a linter that prevents an edit from proceeding when it introduces syntax errors. Its custom file viewer shows about 100 lines per turn and provides commands for scrolling and searching within a file. I wonder whether a snippet always provides enough context, but the authors report finding this interface useful.
A separate directory-search command returns concise matches, while commands with no output receive an explicit success message. I think of the collection as a small custom development environment for the agent. These interface choices are described by the project; this video does not isolate the effect of each one in an independent experiment.
Setting up the environment
Berman walks through Docker, Conda, repository setup, and credentials. His Apple Silicon installation fails, so he continues in a hosted environment.
For the 2024 setup I begin with Docker and Miniconda, clone the repository in a terminal, create the project’s Conda environment from its environment file, activate it, and run the setup script to build a Docker image. These are the steps shown for that version and may differ in later releases.

Despite my initial praise for the packaged setup, I cannot get past a Miniconda-related Docker error on my Apple Silicon Mac. I switch to Lightning, which I say is not sponsoring the video, and complete the image build there. The change of environment is a workaround for my demonstration, not proof of the error’s exact cause.
I create a keys configuration file in the project directory and configure a GitHub token and the OpenAI key used for this test. The interface also lists other provider keys as optional. The setup is specific to the version being demonstrated; credentials and provider settings depend on the actual environment.
An interrupted issue run
The agent inspects an issue in its own repository and edits code. The run reaches its cost cap before a fix is verified.
I run the agent with a model, a configuration file, and the URL of an issue in the SWE-agent repository itself. The issue concerns a missing `base_commit` record. The agent initializes its environment and starts reading the problem and repository files.
The agent identifies the reported key error and navigates a long file with its built-in viewing commands. It scrolls through several locations before finding the relevant method, then proposes an edit and notices a duplicated setting. I find the sequence interesting, although activity and a proposed patch are not proof of a working solution.

The run stops after exceeding the configured $2 cost limit. I see evidence that the agent made changes, but no completed verification showing that its proposed fix resolves the issue. The project’s aggregate benchmark score cannot be read as the exact probability that this particular issue would be fixed.
I notice that the cost limit can be configured and say I would like to use a local model to avoid the same hosted API charges. At the time I do not find a straightforward local-model option and speculate that future versions might make it easier. Local inference still has hardware and operating costs.
An author’s SymPy demonstration
Carlos presents a separate benchmark example, from reproducing a matrix bug through patch submission and displayed test results.
A separate demonstration by an author who introduces himself as Carlos uses a SymPy issue from SWE-bench involving unexpected output from `Matrix.col_insert`. He sends the issue to the agent and then walks through an earlier run of the same example.
Carlos shows the agent creating a reproduction script from the issue and confirming the unexpected behavior. It searches the repository, opens the matrix implementation, and identifies the insertion function as a place to investigate.

The agent identifies an indexing problem, applies an edit, and reruns the reproduction script. Carlos says the output now matches the expected result. The agent removes the temporary reproduction file and submits a proposed diff for benchmark evaluation.


Carlos reports that the submitted patch passes the previously failing test and does not break the existing tests shown in the SWE-bench evaluation. This is one author-selected demonstration, distinct from my interrupted run and from a guarantee about future issues.
Sur la même chaîne
34:21EN
25:50EN
32:20EN
1:03:37EN
0:53EN
0:22EN