mini-swe-agent is a free, open source ai development platforms project written in Python and released under MIT. It has 7,727 GitHub stars, 1,043 forks and 65 open issues, and was last pushed 3 days ago. On this registry it ranks #68 of 116 tracked projects in AI Development Platforms, with 5 head-to-head comparisons available.

What is mini-swe-agent?

mini-swe-agent is an MIT-licensed, roughly 100-line Python AI agent from the Princeton and Stanford team behind SWE-bench and SWE-agent that solves GitHub issues and assists in the command line, built for developers, researchers and platform teams who want a capable coding agent without a large configuration surface or giant monorepo.

What it is

mini-swe-agent is a minimal software engineering agent written in Python and published under the MIT licence. It sits in the AI & Machine Learning category as an AI development platform, and its centre of gravity is a single agent class of about 100 lines, supported by small environment, model and run-script modules. The project is version two, so the v1 branch remains available and a migration guide exists for users moving forward. Documentation lives at mini-swe-agent.com, and the package is distributed on PyPI as mini-swe-agent.

The concrete problem it addresses is weight. The earlier SWE-agent generation placed heavy emphasis on special tools and bespoke interfaces; mini-swe-agent replaces that harness pattern with an agent that has no tools other than bash and does not even require the tool-calling interface of the language model. The result is an agent that can run against virtually any model, that needs nothing installed inside a sandbox beyond bash, and that keeps a completely linear history in which every step simply appends to the messages. That linearity means the trajectory and the message list passed to the model are the same object, which matters for debugging and fine-tuning, and execution through subprocess.run keeps each action independent rather than depending on a stateful shell session.

Key capabilities

  • Minimal core: agent class in src/minisweagent/agents/default.py, with environment support in src/minisweagent/environments/local.py, model access in src/minisweagent/models/litellm_model.py, and a run script at src/minisweagent/run/hello_world.py.
  • Benchmark performance: scores above 74% on the SWE-bench verified benchmark and starts much faster than Claude Code.
  • Bash-only operation: no tools beyond bash, and no requirement for the model's tool-calling interface, so it runs with literally any model.
  • Linear trajectory: every step appends to the messages, so the recorded trajectory equals the messages handed to the model.
  • Independent actions: each action runs through subprocess.run with no persistent shell, which makes swapping in docker exec for sandboxing trivial and scaling straightforward.
  • Deployment targets: local environments, docker/podman, singularity/apptainer, bubblewrap, and contree.
  • Model access: litellm, openrouter and portkey integrations, support for /completion and /response endpoints, and interleaved thinking.

Who uses it and how

  • Adopted by Meta, NVIDIA, Essential AI, IBM, Nebius, Anyscale, Princeton University and Stanford University, among others, which indicates both industrial and academic deployment.
  • Powers Ramp SWE-Bench, so it serves as production infrastructure for an external benchmarking effort rather than only as a research artifact.
  • Runs on ProgramBench, the project's own challenging benchmark, giving evaluation teams a target for agent testing.
  • Used as an evaluation harness: it beats Claude Code and Codex on DeepSWE, making it a reference point in head-to-head agent comparisons.
  • Suits command-line work and batch sandbox execution, where independent, stateless actions and fast startup matter more than rich interactive tooling.

Getting started

Install the mini-swe-agent package from PyPI and follow the documentation at mini-swe-agent.com/latest, using the run script src/minisweagent/run/hello_world.py as the entry point. Users upgrading from the previous release should read the v2 migration guide first.

How it compares

Among the similar tools named in the facts, mini-swe-agent positions itself directly against Claude Code and Codex: it starts much faster than Claude Code and, per DataCurve's evaluation harness, beats both Claude Code and Codex on DeepSWE. It also differs in kind from its own predecessor, SWE-agent, by discarding the tool-and-interface-heavy design in favour of bash plus a linear message history.

When to use it — and when not to

A self-hoster must supply model access through litellm, openrouter or portkey, and must provide a sandbox runtime such as docker/podman, singularity/apptainer, bubblewrap or contree if isolation is required. Teams that depend on persistent shell sessions, rich tool interfaces, or workflows carrying state across commands should look elsewhere, because every action here is independent by design. Users on the previous release must also account for the v2 migration before adopting the current code.

project readme (upstream, from github) — read inline

mini-swe-agent banner

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

Docs Slack PyPI - Version

[!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 /completion and /response endpoints, interleaved thinking etc.
  • Built by the Princeton & Stanford team behind SWE-bench, SWE-agent, and more
  • Tested: Codecov
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 pass on to the LM. Great for debugging & fine-tuning.
  • Executes actions with subprocess.run — every action is completely independent (as opposed to keeping a stateful shell session running). This makes it trivial to execute the actions in sandboxes (literally just switch out subprocess.run with docker exec) and to scale up effortlessly. Seriously, this is a big deal, trust me.

This makes it perfect as a baseline system and for a system that puts the language model (rather than the agent scaffold) in the middle of our attention. You can see the result on the SWE-bench (bash only) leaderboard, that evaluates the performance of different LMs with mini.

More motivation (as a tool)

Some agents are overfitted research artifacts. Others are UI-heavy frontend monsters.

The mini agent wants to be a hackable tool, not a black box.

  • Simple enough to understand at a glance
  • Convenient enough to use in daily workflows
  • Flexible to extend

Unlike other agents (including our own swe-agent), it is radically simpler, because it:

  • Does not have any tools other than bash — it doesn't even need to use the tool-calling interface of the LMs. Instead of implementing custom tools for every specific thing the agent might want to do, the focus is fully on the LM utilizing the shell to its full potential. Want it to do something specific like opening a PR? Just tell the LM to figure it out rather than spending time to implement it in the agent.
  • Executes actions with subprocess.run — every action is completely independent (as opposed to keeping a stateful shell session running). This is a big deal for the stability of the agent, trust me.
  • Has a completely linear history — every step of the agent just appends to the messages that are passed to the LM in the next step and that's it. This is great for debugging and understanding what the LM is prompted with.
Should I use SWE-agent or mini-SWE-agent?

You should consider mini-swe-agent your default choice. In particular, you should use mini-swe-agent if

  • You want a quick command line tool that works locally
  • You want an agent with a very simple control flow
  • You want even faster, simpler & more stable sandboxing & benchmark evaluations
  • You are doing FT or RL and don't want to overfit to a specific agent scaffold

You should use swe-agent if

  • You want to experiment with different sets of tools, each with their own interface
  • You want to experiment with different history processors

What you get with both

  • Excellent performance on SWE-Bench
  • A trajectory browser
CLI (mini) Batch inference

mini

swebench

Trajectory browser Python bindings

inspector

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

Let's get started!

Option 1: If you just want to try out the CLI (package installed in anonymous virtual environment)

pip install uv && uvx mini-swe-agent
# or
pip install pipx && pipx ensurepath && pipx run mini-swe-agent

Option 2: Install CLI & python bindings in current environment

pip install mini-swe-agent
mini  # run the CLI

Option 3: Install from source (developer setup)

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

Read more in our documentation:

readme truncated — read the full docs on github

Frequently asked questions

Is mini-swe-agent free to use?

mini-swe-agent is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does mini-swe-agent do?

The 100 line AI agent that solves GitHub issues or helps you in your command line. Radically simple, no huge configs, no giant monorepo—but scores >74% on SWE-b

What is mini-swe-agent written in?

mini-swe-agent is primarily written in Python. Its source is publicly available at https://github.com/SWE-agent/mini-swe-agent, and it has 7,727 GitHub stars.