mini-swe-agent Hits 74% on SWE-bench in Just 100 Lines of Python
A radically stripped-down coding agent from the SWE-bench team hits over 74% on SWE-bench Verified using just bash and 100 lines of Python.
PRO- mini-swe-agent is a ~100-line Python coding agent from the SWE-bench team.
- Scores over 74% on SWE-bench Verified using only bash, no custom tool schemas.
- Every action runs via
subprocess.run, making it trivial to swap in Docker or Singularity sandboxes. - Linear message history means the trajectory equals what the LM sees, ideal for fine-tuning and RL.
- Works with any model via litellm, OpenRouter, or Portkey; MIT licensed.
- Adopted internally by Meta, NVIDIA, IBM, Anyscale, Princeton, and Stanford per the maintainers.
The team behind SWE-bench and the original SWE-agent has been pushing a contrarian thesis: as language models get better, the elaborate scaffolding around them matters less. Their mini-swe-agent project takes that thesis to its logical extreme, packing a working coding agent into roughly 100 lines of Python and still landing near the top of the SWE-bench leaderboard.
The result is a command-line assistant that solves GitHub issues or works interactively in your shell, with no sprawling config, no monorepo, and no bespoke tool schemas. It scores over 74% on SWE-bench Verified, ships under an MIT license, installs from PyPI, and has already reached v2 with a migration guide for anyone on the earlier branch.

Bash is the only tool
The design bet is that a capable model plus a shell is enough. The agent class runs about 100 lines of Python, with a bit more for the environment, model, and run script, and no exotic dependencies. There is no retrieval layer, no file-editing tool, no planner module. When the agent wants to open a pull request or run tests, it writes the bash commands itself.
Two choices do the heavy lifting:
- Linear history. Every step appends to the message list, so the trajectory and the prompt sent to the model are the same object. That makes debugging and fine-tuning much easier.
This story is for Pro members
You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.