Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

SWE-agent/mini-swe-agent

Developer Tools

A minimal Python coding agent that solves GitHub issues and runs command-line tasks with only bash, scoring over 74% on SWE-bench verified.

9,361
1,295
Python
MIT
1 year old

What it is

mini-swe-agent is a deliberately small software-engineering agent. The core agent class is roughly 100 lines of Python; it has no tools other than bash, does not rely on a model's tool-calling interface, keeps a fully linear message history, and runs each action through subprocess.run rather than a persistent shell session (agent class, motivation).

The project is for developers who want a readable, hackable coding agent they can run locally or in batch over a benchmark, and for researchers who want a simple baseline for fine-tuning or RL instead of an overfit scaffold. It ships a CLI (mini), batch SWE-bench evaluation, a trajectory browser, and Python bindings. Model access goes through LiteLLM, with OpenRouter, Portkey, and /completion or /response endpoints also supported (README).

Quick start

Requirements: Python and an API key for whichever model provider you configure. The fastest path installs the CLI into an isolated environment:

pip install uv && uvx mini-swe-agent

Alternatively, install it into your current environment:

pip install mini-swe-agent
mini

For development, install from source:

git clone https://github.com/SWE-agent/mini-swe-agent.git
cd mini-swe-agent && pip install -e .
mini

The CLI then takes a task prompt in natural language. Configuration details and model credentials are covered in the quickstart and global configuration pages. For library use:

agent = DefaultAgent(
    LitellmModel(model_name=...),
    LocalEnvironment(),
)
agent.run("Write a sudoku game")

Constraints and limits

  • It is currently v2; the previous release lives on the v1 branch, and existing setups should follow the migration guide.
  • Real work happens through shell commands, so sandboxing matters. Docker/Podman, Singularity/Apptainer, bubblewrap, and other environments are offered, but the local environment executes directly on your machine (README).
  • Batch evaluation is benchmark-oriented and expects the corresponding SWE-bench-style environments. A separate HN thread raises environment issues with SWE-bench-Pro as a caution for benchmark runs.
  • Because every action is an independent subprocess, there is no stateful shell between steps; the FAQ explains why and what to expect (FAQ).
  • Licensed MIT.

HotRepo's take

On the 2026-11-08 Python daily list, mini-swe-agent ranked 11th with 84 stars gained that day, against 9,359 total stars — steady attention for a project that has already been around since mid-2025. The Show HN thread from 2025-07-25 is the more interesting record: the author framed the goal as the simplest agent that still scores near state of the art, and commenters responded to the design rather than just the benchmark, with one noting that the whole agent code fits nearly on one screen and is easy to study and hack (comment). Another later commenter singled out the agent owning its conversation history as the right design for an autonomous agent (comment). The gap between the 65% reported in 2025 and the README's current >74% claim tracks model progress more than agent complexity, which is exactly the point the project makes.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

Hacker News

Show HN: Mini-swe-agent achieves 65% on SWE-bench in 100 lines of python
▲ 7 · 4 comments · July 25, 2025
Mini-Swe-Agent
▲ 2 · 1 comment · October 24, 2026