The minimal AI software engineering agent
📣 mini-swe-agent now powers Ramp SWE-Bench
📣 mini-swe-agent beats Claude Code and Codex on DeepSWE
📣 Run mini-swe-agent on our new & extremely challenging benchmark, ProgramBench
📣 New tutorial on building minimal AI agents
[!WARNING] This is mini-swe-agent v2. Read the migration guide. For the previous version, check out the v1 branch.
In 2024, we built SWE-bench & SWE-agent and helped kickstart the coding agent revolution.
We now ask: What if our agent was 100x simpler, and still worked nearly as well?
mini is
- Widely adopted: Used by Meta, NVIDIA, Essential AI, IBM, Nebius, Anyscale, Princeton University, Stanford University, and many more.
- Minimal: Just some 100 lines of python for the agent class (and a bit more for the environment, model, and run script) — no fancy dependencies!
- Performant: Scores >74% on the SWE-bench verified benchmark; starts much faster than Claude Code
- Deployable: Supports local environments, docker/podman, singularity/apptainer, bublewrap, contree, and more
- Compatible: Supports all models via litellm, openrouter, portkey, and more. Support for
/completionand/responseendpoints, interleaved thinking etc. - Built by the Princeton & Stanford team behind SWE-bench, SWE-agent, and more
- Tested:
More motivation (for research)
SWE-agent jump-started the development of AI agents in 2024. Back then, we placed a lot of emphasis on tools and special interfaces for the agent.
However, one year later, as LMs have become more capable, a lot of this is not needed at all to build a useful agent!
In fact, the mini agent
- Does not have any tools other than bash — it doesn't even need to use the tool-calling interface of the LMs. This means that you can run it with literally any model. When running in sandboxed environments you also don't need to take care of installing a single package — all it needs is bash.
- Has a completely linear history — every step of the agent just appends to the messages and that's it. So there's no difference between the trajectory and the messages that you pa