Back to index
OtherSelf-paced, hello world in under an hour·Free and open source, you pay only for model API calls

SWE-agent and mini-swe-agent

4.0

The most educational codebase in the coding agent space, because it is a research artefact rather than a product and you can read how it actually works. Go straight to mini-swe-agent, since the original is in maintenance mode and the successor is the better teacher anyway.

What We Liked

  • Reading the source teaches you more about agent design than any course will
  • Academic provenance means the design decisions are documented and justified
  • mini-swe-agent achieves comparable results with drastically less complexity
  • Free, Apache-style open source, with costs limited to your own model API usage

What Could Be Better

  • The original SWE-agent is explicitly maintenance-only, so do not build on it
  • Documentation is research-grade, meaning accurate but assuming a lot
  • Model API costs on a long agent run add up faster than newcomers expect
  • Benchmark performance does not translate to arbitrary real codebases

Detailed review

There is a version of learning about AI agents that consists of watching a tutorial where someone calls a framework and something impressive happens, and you come away able to reproduce the tutorial and unable to reason about anything else. SWE-agent is the antidote, because it came out of a research group at Princeton and Stanford rather than a product team, which means the interesting decisions are visible and explained rather than buried in a library. The central insight is worth stating because it is not obvious and it reframed a lot of thinking. The team found that the interface you give a language model matters enormously, independent of the model.

Not the prompt, the interface. What the tools look like, what the file editor returns when you make a mistake, how errors are surfaced, how much context a command dumps. They called this the agent-computer interface and showed that designing it deliberately produced large performance gains with the same underlying model. If you build agents, this is the most useful idea you can absorb, and almost everyone building agents is still spending their effort on prompt wording instead.

Now the practical guidance, which the project itself gives and which people keep ignoring. SWE-agent is in maintenance-only mode. Development has moved to mini-swe-agent, which achieves comparable benchmark results with dramatically less code and far fewer moving parts. Do not start a new project on the original.

Read mini-swe-agent instead, and read it rather than only running it, because it is short enough to hold in your head, which is exactly why it is the better teaching object. A system you can fully understand teaches more than a system that performs marginally better and cannot be reasoned about. The fact that a stripped-down rewrite matched the elaborate original is itself the lesson, and it is one the whole agent ecosystem could stand to learn. On what it actually does, it takes a GitHub issue, works in the repository, and produces a patch, and it has also been pointed at vulnerability discovery.

Benchmark performance on SWE-bench has been at or near the top for open source approaches. Treat that number with the caution any benchmark deserves. SWE-bench issues are drawn from popular Python repositories with good test coverage and clear issue descriptions, which is a favourable distribution. Your codebase, with its sparse tests and its issue that says login is broken sometimes, is a different problem, and performance drops accordingly.

This is not a criticism of the research, which is honest about its scope. It is a caution against the coverage that turns a benchmark number into a claim about software engineering being solved. Cost is the thing newcomers underestimate. The agent is free.

The model calls are not, and an agent that explores a large repository across many turns can run up a real bill on a frontier model for a single issue. Set spending limits before you experiment, and understand that cost per attempt multiplied by attempts needed is the number that matters, not the headline per-token price. Documentation is research-grade. Accurate, assumes competence, includes installation, a hello world for solving a GitHub issue, configuration, CLI usage and API reference.

Nobody is holding your hand and the material does not waste your time. Four point zero. Read it as literature about agent design rather than adopting it as infrastructure, and use the successor.

[ final ]

The verdict.

The best thing to read if you want to understand how coding agents work rather than just use one. Start with mini-swe-agent and resist the urge to build on the deprecated original.