← all repositories
SWE-agent/mini-swe-agent

100 lines of Python, 74% on SWE-bench: the anti-bloat agent

The SWE-bench team asked what happens when you strip an AI coding agent down to bash and stubborn minimalism—and it turned out the answer is "still beats most competitors."

6k stars Python Coding AssistantsAgents
mini-swe-agent
Velocity · 7d
+21
★ / day
Trend
cooling
star history

What it does

mini-swe-agent solves GitHub issues or runs as a CLI assistant. The core agent logic is roughly 100 lines of Python; the rest is thin wrappers for environments, models, and execution. It speaks to any LLM via LiteLLM or OpenRouter, runs commands through subprocess.run, and keeps a completely linear message history—no tool-calling APIs, no stateful shell sessions, no orchestration framework.

The interesting bit

The bet here is that modern LMs are good enough to do software engineering with just bash. No custom file-editing tools, no PR-opening abstractions, no carefully curated agent-computer interfaces. The authors call this “putting the language model (rather than the agent scaffold) in the middle of our attention.” It also makes sandboxing trivial: swap subprocess.run for docker exec and you’re done.

Key highlights

  • Scores >74% on SWE-bench verified (Gemini 3 Pro, per the README’s cited tweet)
  • Supports local, Docker/Podman, Singularity/Apptainer, bubblewrap, and more
  • No tool-calling interface required—works with any model that can emit text
  • Linear trajectory history means the prompt log is the debug log
  • Used by Meta, NVIDIA, IBM, Stanford, Princeton, and others as a baseline

Caveats

  • v2 is a rewrite; the README warns about migration from v1
  • The “100 lines” refers specifically to the agent class; environment and model wrappers add more
  • No built-in tools beyond bash means the LLM carries the full load—weak models will struggle

Verdict

Grab this if you want a hackable research baseline, need reproducible benchmark runs, or are doing fine-tuning/RL and don’t want to overfit to a complex scaffold. Skip it if you need rich tool ecosystems or fancy history processing—use the original SWE-agent instead.

Frequently asked

What is SWE-agent/mini-swe-agent?
The SWE-bench team asked what happens when you strip an AI coding agent down to bash and stubborn minimalism—and it turned out the answer is "still beats most competitors."
Is mini-swe-agent open source?
Yes — SWE-agent/mini-swe-agent is open source, released under the MIT license.
What language is mini-swe-agent written in?
SWE-agent/mini-swe-agent is primarily written in Python.
How popular is mini-swe-agent?
SWE-agent/mini-swe-agent has 6k stars on GitHub and is currently cooling off.
Where can I find mini-swe-agent?
SWE-agent/mini-swe-agent is on GitHub at https://github.com/SWE-agent/mini-swe-agent.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.