Mini-SWE-agent

Mini-SWE-agent is an open-source, 100-line Python coding agent from Princeton and Stanford scoring over 74% on SWE-bench with pure bash execution.

Last Update: 2026-08-27

Monthly visits: 180000

Visit Tool

Starting price Free / Open Source

Tool Information

Mini-SWE-agent platform architecture and minimalist agent loop

Mini-SWE-agent (developed by the research team at Princeton NLP & Stanford University, accessible via mini-swe-agent.com and GitHub) is an open-source, ultra-lightweight autonomous software engineering agent. Designed as the radical evolution of the original SWE-agent framework that helped ignite the coding agent revolution in 2024, Mini-SWE-agent proves that an AI agent implemented in just 100 lines of clean Python can match and exceed the performance of monolithic, tool-heavy agent frameworks.

Distributed under the permissive MIT license, Mini-SWE-agent strips away bloated scaffolds, stateful shell watchers, and complex tool-calling abstractions. Instead, it places the reasoning capabilities of modern language models front and center, executing tasks purely through standard bash commands and strict linear conversation histories. Adopted globally by research labs and enterprises including Meta, NVIDIA, Essential AI, IBM, Nebius, and Anyscale, Mini-SWE-agent provides the gold standard for reproducible agent evaluations.

Pure bash execution, linear history, and pluggable sandboxes

Mini-SWE-agent delivers exceptional architectural clarity and engineering advantages:

  • Radical 100-Line Codebase: The entire core agent loop is implemented in approximately 100 lines of standard Python code, making it instantly readable, fully auditable, and trivial to customize for bespoke research and fine-tuning.
  • Pure Bash Tool Interface: Does not rely on vendor-locked tool-calling schemas or custom file-editing commands. The model navigates codebases, performs edits, runs compilers, and executes test suites using standard shell tools (sed, awk, pytest, git).
  • Stateless Subprocess Execution: Runs each command independently via subprocess.run or container execution calls rather than maintaining fragile stateful shell sessions, eliminating hang-ups and desynchronization bugs.
  • Strict Linear History: Eliminates hidden prompt injections and complex history processors. The agent trajectory maps 1:1 to the message array passed to the model, making debugging and trajectory inspection completely transparent.
  • Universal Model Support via LiteLLM: Seamlessly connects to leading frontier models including Anthropic Claude Opus 5, Claude Sonnet 5, OpenAI GPT-5.3-Codex, Google Gemini 3.7 Flash, DeepSeek-V3, as well as local GGUF/vLLM inference engines.
  • Pluggable Sandboxing Backends: Natively executes inside local environments, Docker containers, Podman, Singularity/Apptainer, Bubblewrap, and Contree for high-throughput batch evaluation.

Comparative benchmark: Mini-SWE-agent vs. SWE-agent and OpenHands

Mini-SWE-agent demonstrates that minimalist agent scaffolding delivers higher stability and faster execution on standardized benchmarks.

Dimension Mini-SWE-agent SWE-agent (Classic) OpenHands
Scaffold complexity Radical minimalism: ~100 lines of pure Python, zero complex dependencies Complex agent scaffold with custom Agent-Computer Interface (ACI) tools Full-stack multi-agent event stream engine with desktop/cloud UI
Tool calling mechanism Pure bash execution via subprocess.run, no proprietary tool abstractions Custom search, file edit, and navigation commands via persistent shell Multi-tool execution, browser automation, and bash tool integrations
Sandboxing & Execution Pluggable: Local subprocess, Docker, Podman, Singularity, Bubblewrap, Contree Docker container isolation with persistent interactive shell streams Docker microVM sandboxes with cloud cluster orchestration
Benchmark score >74% on SWE-bench Verified (fastest initialization time) Top-tier benchmark baseline for agentic research High benchmark scores across SWE-bench and web development evals
Pricing & License 100% Free & Open Source (MIT License) / Zero platform markup 100% Free & Open Source (MIT License) / Research baseline 100% Free & Open Source (MIT License) / Optional cloud hosting

Research workflows, SWE-bench evaluations, and operational guardrails

  • Automated benchmark evaluation: Execute large-scale batch runs on SWE-bench Verified, Ramp SWE-bench, and ProgramBench to benchmark open and proprietary model capabilities.
  • Fine-tuning and reinforcement learning (RL): Collect clean, uncorrupted agent trajectories without scaffolding artifacts to train specialized code-generation models.
  • Local CLI bug fixing: Run the interactive mini command line tool inside local repositories to autonomously resolve GitHub issues and unit test failures.
  • Visual trajectory inspection: Launch the built-in web-based trajectory inspector to review step-by-step model reasoning, commands, and bash outputs.

Operational guardrails: Mini-SWE-agent runs by default inside isolated Docker or container sandboxes, ensuring that file modifications, package installations, and system commands remain quarantined from host development machines.

Licensing tiers, commercial usage, and Mini-SWE-agent pricing

Mini-SWE-agent is fully open source under the MIT license with zero commercial restrictions:

Deployment Tier Pricing Included Features & Infrastructure
Mini-SWE-agent Core CLI & SDK 100% Free (MIT License) Full Python source code, interactive mini CLI, SWE-bench runner, trajectory inspector, and container sandbox integrations
Direct Inference (BYO-API) Direct Provider API Rates Connect directly to Anthropic, OpenAI, Google Gemini, OpenRouter, or DeepSeek with zero intermediate platform surcharges
Local Offline Inference $0.00 / Free Run open-weight models via Ollama or vLLM locally with zero external API fees and total privacy

*Pricing and plan details verified as of August 2026.

Step-by-step installation and local terminal onboarding guide

  1. Install via pip: Install the official package using Python package manager: pip install mini-swe-agent.
  2. Configure environment variables: Set your target model API key (e.g. export ANTHROPIC_API_KEY=your_key or export OPENAI_API_KEY=your_key).
  3. Run interactive session: Launch the agent in your project directory by typing mini in your terminal.
  4. Execute batch evaluations: Run mini-swe-agent-swebench across benchmark datasets or launch the trajectory inspector to analyze step-by-step agent execution logs.

Editorial verdict

  • Best for: AI researchers, benchmark evaluators, and developers looking for a fast, radically simple, and highly transparent coding agent that executes tasks through standard bash.
  • Not recommended for: Non-technical users seeking a heavy visual GUI with drag-and-drop workflow builders.
  • Learning curve: Very low. The 100-line architecture can be read and understood in minutes; CLI execution is immediate.
  • Value threshold: Unbeatable. Clean, open-source MIT code with zero platform overhead or subscription locks.
  • Bottom line: Mini-SWE-agent is a masterclass in agentic engineering, proving that minimalist architectures deliver faster startup times, higher benchmark stability, and uncompromised coding power.

F.A.Q

Mini-SWE-agent is an open-source, ultra-minimal coding agent developed by Princeton NLP and Stanford that implements a complete software engineering agent in just 100 lines of Python.

Mini-SWE-agent focuses exclusively on empowering the language model through standard bash commands and clean subprocess execution, removing complex agent scaffolding that can degrade model reasoning.

Mini-SWE-agent supports Anthropic Claude (Opus 5, Sonnet 5), OpenAI GPT-5.3-Codex, Google Gemini 3.7 Flash, DeepSeek-V3, and local models across Docker, Podman, Singularity, and Bubblewrap sandboxes.

Mini-SWE-agent is used by Meta, NVIDIA, and universities as the baseline evaluation harness for SWE-bench and for collecting clean trajectories for model fine-tuning and reinforcement learning.

Pros and Cons

Pros

  • Radical ~100-line Python agent scaffold that scores over 74% on SWE-bench Verified
  • Pure bash tool interface removing fragile custom tool schemas and vendor dependencies
  • Stateless subprocess execution eliminating shell session deadlocks and desync errors
  • Strict linear conversation history providing 1:1 transparency for debugging and model fine-tuning
  • Universal model routing via LiteLLM supporting Claude, OpenAI Codex, Gemini, and local LLMs

Cons

  • Command line and Python SDK interface requires terminal familiarity without a native GUI
  • Autonomous shell execution requires running inside Docker containers for safe isolation
  • Refactoring performance depends directly on the coding capabilities of the selected backend LLM

Reviews

0
0 out of 5 stars (based on 0 reviews)
Excellent
Very good
Average
Poor
Terrible

There are no reviews yet. Be the first one to write one.

Quick actions
Visit Tool
Scroll to Top