Skip to content

mini-swe-agent

About 100 lines of Python that solve GitHub issues, from the Princeton and Stanford team behind SWE-bench and SWE-agent.

Reviewed by Sheela · Updated

View on GitHub Open source

Our rating

4.0/5

A benchmark harness so plain that its results measure the model, which is exactly why it feels bare as a daily coding tool.

What it is

mini-swe-agent is a deliberately tiny coding agent from the Princeton and Stanford team behind SWE-bench and SWE-agent. The agent class is roughly 100 lines of Python, its only tool is bash, and every action runs as a fresh subprocess, so it works with any model and drops into Docker, Podman, Singularity, bubblewrap or Modal sandboxes by swapping one call.

The team now recommends it over SWE-agent, which is in maintenance-only mode. It is on version 2 (v1 configs need the migration guide), the latest release is v2.4.6 from July 2026, and the README lists Meta, NVIDIA, IBM and Anyscale among its users. The project reports a score above 74% on SWE-bench Verified.

Our review

mini-swe-agent is the cleanest baseline harness for coding agents and a poor substitute for a working assistant. It has about 8,800 GitHub stars, shipped v2.4.6 in July 2026 and had commits as recently as 19 October. With no tools beyond bash, it does not even need a model's tool-calling interface, so any model that can write shell commands can be compared on equal terms.

That neutrality is why researchers use it. The SWE-bench bash-only leaderboard runs every model through it, Ramp's SWE-Bench is built on it, and the 2026 DeepSWE paper found it matched or beat several vendors' own harnesses on small samples, though the authors note the gaps were within noise. Its linear history means the trajectory is exactly what the model saw, which makes runs easy to debug and convenient as fine-tuning or RL data.

The defaults deserve attention. The interactive mini command runs in your local shell, not a sandbox; it starts in confirm mode and asks before each action, but the -y flag switches to yolo mode and whitelisted commands skip the prompt. The SWE-bench runner uses Docker by default with x86 Linux images, caps each task at $3 of model spend and 250 steps, and offers global cost limits through environment variables.

For everyday work the minimalism bites. There is no MCP, no IDE integration and no persistent shell, so a cd or an exported variable does not survive to the next step. SWE-agent remains the better tool only for experimenting with custom tool interfaces or reproducing its older EnIGMA security results. A harness that adds almost nothing is the right control for an experiment, and the same quality is what OpenHands and OpenCode users would miss within an hour.

Where it earns its place

  • An ML researcher comparing three frontier models on SWE-bench Verified

    Get scores where the scaffold is not the variable

    Run mini-extra swebench --subset verified --workers 4 on an x86 Linux box with Docker, then score with sb-cli, which usually returns results within 20 minutes. At the default $3 cap per task, the 500-task set costs at most $1,500 per model in API fees; typical runs come in under the cap.

  • A post-training team generating agent trajectories for fine-tuning or RL

    Collect clean, replayable agent runs at scale

    Each step simply appends to the message list, so the saved trajectory is the training example with no reconstruction. Singularity or Apptainer environments run it on HPC clusters without Docker. The software is free under MIT; the cost is model tokens and compute.

  • An engineering manager choosing which model provider to standardise on for internal agents

    Compare models on the team's own bug backlog before signing a contract

    Point the Python bindings at a sample of real issues and run each model through the same 100-line loop, so differences reflect the model, not a vendor's harness. Costs are API tokens only; there is no paid tier.

Before you commit

Setup
pip install mini-swe-agent on Python 3.10 or later, set MSWEA_MODEL_NAME and an API key, then run mini; a first task takes minutes. Batch evaluation needs Docker on x86 Linux.
Integrations
Models through LiteLLM, OpenRouter and Portkey, including /completion and /response endpoints; environments for local, Docker, Podman, Singularity/Apptainer, bubblewrap, contree and Modal; Python bindings and a trajectory browser.
Data and privacy
The project runs no hosted service; prompts and repository content go to whichever model provider you configure. In local mode the model's commands run on your machine, guarded only by confirm mode. MIT licence; no security advisories are published for the repository.
Cost at scale
Free; you pay for model usage. Default configs cap each run at $3, and MSWEA_GLOBAL_COST_LIMIT and MSWEA_GLOBAL_CALL_LIMIT set ceilings across a batch.
Limits
Each command runs in a fresh subshell, so directory and environment changes do not persist; no MCP or IDE hooks; about 112 open issues and pull requests; SWE-bench images are x86 only.

What's good

  • Agent loop of about 100 lines that you can read in one sitting
  • Bash-only design works with any model, no tool calling needed
  • Per-task and global cost caps for batch runs
  • Used as the harness for the SWE-bench bash-only leaderboard

What's not

  • Interactive mode executes on the host shell, not in a sandbox
  • No MCP, IDE integration or persistent shell state
  • SWE-bench images assume x86 Linux
  • v2 broke v1 configs

Best for

Researchers and engineers benchmarking models or learning how coding agents work.

Alternatives

mini-swe-agent: common questions

Is mini-swe-agent worth it?
A benchmark harness so plain that its results measure the model, which is exactly why it feels bare as a daily coding tool. We rate it 4.0 out of 5.
How much does mini-swe-agent cost?
Free and open source (MIT). You pay your model provider.
What are the downsides of mini-swe-agent?
Interactive mode executes on the host shell, not in a sandbox; no MCP, IDE integration or persistent shell state; sWE-bench images assume x86 Linux; v2 broke v1 configs.
Who is mini-swe-agent best for?
Researchers and engineers benchmarking models or learning how coding agents work.
How much does mini-swe-agent cost for a team or in production?
Free; you pay for model usage. Default configs cap each run at $3, and MSWEA_GLOBAL_COST_LIMIT and MSWEA_GLOBAL_CALL_LIMIT set ceilings across a batch.
Is mini-swe-agent safe for company data?
The project runs no hosted service; prompts and repository content go to whichever model provider you configure. In local mode the model's commands run on your machine, guarded only by confirm mode. MIT licence; no security advisories are published for the repository.
What are the best mini-swe-agent alternatives?
The closest alternatives we have reviewed are OpenHands and OpenCode.

Answers checked Oct 23, 2026.

Make mini-swe-agent? Show this rating on your sitemini-swe-agent rated 4.0 out of 5 on ReviewRamble