{"id":30249105,"url":"https://github.com/swe-agent/mini-swe-agent","last_synced_at":"2026-02-07T00:18:38.718Z","repository":{"id":305904000,"uuid":"1010318950","full_name":"SWE-agent/mini-swe-agent","owner":"SWE-agent","description":"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 68% on SWE-bench verified!","archived":false,"fork":false,"pushed_at":"2025-08-13T23:36:03.000Z","size":4981,"stargazers_count":974,"open_issues_count":20,"forks_count":90,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-14T01:05:16.147Z","etag":null,"topics":["agent","agentic-ai","agentic-ai-cli","ai","ai-agent","textual"],"latest_commit_sha":null,"homepage":"https://mini-swe-agent.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SWE-agent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-28T20:18:15.000Z","updated_at":"2025-08-13T23:35:21.000Z","dependencies_parsed_at":"2025-07-23T18:15:08.104Z","dependency_job_id":"19bbce95-8bcc-4bbe-a1b0-b866eb5efdf0","html_url":"https://github.com/SWE-agent/mini-swe-agent","commit_stats":null,"previous_names":["swe-agent/micro-swe-agent","swe-agent/mini-swe-agent"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/SWE-agent/mini-swe-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SWE-agent%2Fmini-swe-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SWE-agent%2Fmini-swe-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SWE-agent%2Fmini-swe-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SWE-agent%2Fmini-swe-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SWE-agent","download_url":"https://codeload.github.com/SWE-agent/mini-swe-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SWE-agent%2Fmini-swe-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270539723,"owners_count":24603214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agentic-ai","agentic-ai-cli","ai","ai-agent","textual"],"created_at":"2025-08-15T08:12:26.696Z","updated_at":"2026-02-04T22:04:23.931Z","avatar_url":"https://github.com/SWE-agent.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://mini-swe-agent.com/latest/\"\u003e\u003cimg src=\"https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/mini-swe-agent-banner.svg\" alt=\"mini-swe-agent banner\" style=\"height: 7em\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# The minimal AI software engineering agent\n\n📣 [New tutorial on building minimal AI agents](https://minimal-agent.com/)\u003cbr/\u003e\n📣 [Gemini 3 Pro reaches 74% on SWE-bench verified with mini-swe-agent!](https://x.com/KLieret/status/1991164693839270372)\u003cbr/\u003e\n📣 [New blogpost: Randomly switching between GPT-5 and Sonnet 4 boosts performance](https://www.swebench.com/SWE-bench/blog/2025/08/19/mini-roulette/)\n\n[![Docs](https://img.shields.io/badge/Docs-green?style=for-the-badge\u0026logo=materialformkdocs\u0026logoColor=white)](https://mini-swe-agent.com/latest/)\n[![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge\u0026logo=slack\u0026logoColor=white)](https://join.slack.com/t/swe-bench/shared_invite/zt-36pj9bu5s-o3_yXPZbaH2wVnxnss1EkQ)\n[![PyPI - Version](https://img.shields.io/pypi/v/mini-swe-agent?style=for-the-badge\u0026logo=python\u0026logoColor=white\u0026labelColor=black\u0026color=deeppink)](https://pypi.org/project/mini-swe-agent/)\n\n\u003e [!WARNING]\n\u003e This is **mini-swe-agent v2**. Read the [migration guide](https://mini-swe-agent.com/latest/advanced/v2_migration/). For the previous version, check out the [v1 branch](https://github.com/SWE-agent/mini-swe-agent/tree/v1).\n\nIn 2024, we built [SWE-bench](https://github.com/swe-bench/SWE-bench) \u0026 [SWE-agent](https://github.com/swe-agent/swe-agent) and helped kickstart the coding agent revolution.\n\nWe now ask: **What if our agent was 100x smaller, and still worked nearly as well?**\n\nThe `mini` agent is for\n\n- **Researchers** who want to **[benchmark](https://swe-bench.com), [fine-tune](https://swesmith.com/) or RL** without assumptions, bloat, or surprises\n- **Developers** who like to **own, understand, and modify** their tools\n- **Engineers** who want something **trivial to sandbox \u0026 to deploy anywhere**\n\nHere's some details:\n\n- **Minimal**: Just some 100 lines of python for the [agent class](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/agents/default.py) (and a bit more for the [environment](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/environments/local.py),\n[model](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/models/litellm_model.py), and [run script](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/run/hello_world.py)) — no fancy dependencies!\n- **Performant:** Scores \u003e74% on the [SWE-bench verified benchmark](https://www.swebench.com/) benchmark; starts much faster than Claude Code\n- **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more\n- Built by the Princeton \u0026 Stanford team behind [SWE-bench](https://swebench.com), [SWE-agent](https://swe-agent.com), and more (see below)\n- **Widely adopted:** In use by Meta, NVIDIA, Essential AI, Anyscale, and others\n- **Tested:** [![Codecov](https://img.shields.io/codecov/c/github/swe-agent/mini-swe-agent?style=flat-square)](https://codecov.io/gh/SWE-agent/mini-swe-agent)\n\n\u003cdetails\u003e\n\n\u003csummary\u003eMore motivation (for research)\u003c/summary\u003e\n\n[SWE-agent](https://swe-agent.com/latest/) 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.\nHowever, one year later, as LMs have become more capable, a lot of this is not needed at all to build a useful agent!\nIn fact, the `mini` agent\n\n- **Does not have any tools other than bash** — it doesn't even need to use the tool-calling interface of the LMs.\n  This means that you can run it with literally any model. When running in sandboxed environments you also don't need to take care\n  of installing a single package — all it needs is bash.\n- **Has a completely linear history** — every step of the agent just appends to the messages and that's it.\n  So there's no difference between the trajectory and the messages that you pass on to the LM.\n  Great for debugging \u0026 fine-tuning.\n- **Executes actions with `subprocess.run`** — every action is completely independent (as opposed to keeping a stateful shell session running).\n  This makes it trivial to execute the actions in sandboxes (literally just switch out `subprocess.run` with `docker exec`) and to\n  scale up effortlessly. Seriously, this is [a big deal](https://mini-swe-agent.com/latest/faq/#why-no-shell-session), trust me.\n\nThis makes it perfect as a baseline system and for a system that puts the language model (rather than\nthe agent scaffold) in the middle of our attention.\nYou can see the result on the [SWE-bench (bash only)](https://www.swebench.com/) leaderboard, that evaluates the performance of different LMs with `mini`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMore motivation (as a tool)\u003c/summary\u003e\n\nSome agents are overfitted research artifacts. Others are UI-heavy frontend monsters.\n\nThe `mini` agent wants to be a hackable tool, not a black box.\n\n- **Simple** enough to understand at a glance\n- **Convenient** enough to use in daily workflows\n- **Flexible** to extend\n\nUnlike other agents (including our own [swe-agent](https://swe-agent.com/latest/)), it is radically simpler, because it:\n\n- **Does not have any tools other than bash** — it doesn't even need to use the tool-calling interface of the LMs.\n  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.\n  Want it to do something specific like opening a PR?\n  Just tell the LM to figure it out rather than spending time to implement it in the agent.\n- **Executes actions with `subprocess.run`** — every action is completely independent (as opposed to keeping a stateful shell session running).\n  This is [a big deal](https://mini-swe-agent.com/latest/faq/#why-no-shell-session) for the stability of the agent, trust me.\n- **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.\n  This is great for debugging and understanding what the LM is prompted with.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eShould I use SWE-agent or mini-SWE-agent?\u003c/summary\u003e\n\nYou should use `mini-swe-agent` if\n\n- You want a quick command line tool that works locally\n- You want an agent with a very simple control flow\n- You want even faster, simpler \u0026 more stable sandboxing \u0026 benchmark evaluations\n- You are doing FT or RL and don't want to overfit to a specific agent scaffold\n\nYou should use `swe-agent` if\n\n- You need specific tools or want to experiment with different tools\n- You want to experiment with different history processors\n- You want very powerful yaml configuration without touching code\n\nWhat you get with both\n\n- Excellent performance on SWE-Bench\n- A trajectory browser\n\n\u003c/details\u003e\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\u003ca href=\"https://mini-swe-agent.com/latest/usage/mini/\"\u003e\u003cstrong\u003eCLI\u003c/strong\u003e\u003c/a\u003e (\u003ccode\u003emini\u003c/code\u003e)\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://mini-swe-agent.com/latest/usage/swebench/\"\u003e\u003cstrong\u003eBatch inference\u003c/strong\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n![mini](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/mini.gif?raw=true)\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n![swebench](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/swebench.gif?raw=true)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003ca href=\"https://mini-swe-agent.com/latest/usage/inspector/\"\u003e\u003cstrong\u003eTrajectory browser\u003c/strong\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://mini-swe-agent.com/latest/advanced/cookbook/\"\u003e\u003cstrong\u003ePython bindings\u003c/strong\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n![inspector](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/inspector.gif?raw=true)\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```python\nagent = DefaultAgent(\n    LitellmModel(model_name=...),\n    LocalEnvironment(),\n)\nagent.run(\"Write a sudoku game\")\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Let's get started!\n\n**Option 1:** If you just want to try out the CLI (package installed in anonymous virtual environment)\n\n```bash\npip install uv \u0026\u0026 uvx mini-swe-agent\n# or\npip install pipx \u0026\u0026 pipx ensurepath \u0026\u0026 pipx run mini-swe-agent\n```\n\n**Option 2:** Install CLI \u0026 python bindings in current environment\n\n```bash\npip install mini-swe-agent\nmini  # run the CLI\n```\n\n**Option 3:** Install from source (developer setup)\n\n```bash\ngit clone https://github.com/SWE-agent/mini-swe-agent.git\ncd mini-swe-agent \u0026\u0026 pip install -e .\nmini  # run the CLI\n```\n\nRead more in our [documentation](https://mini-swe-agent.com/latest/):\n\n* [Quick start guide](https://mini-swe-agent.com/latest/quickstart/)\n* [Using the `mini` CLI](https://mini-swe-agent.com/latest/usage/mini/)\n* [Global configuration](https://mini-swe-agent.com/latest/advanced/global_configuration/)\n* [Yaml configuration files](https://mini-swe-agent.com/latest/advanced/yaml_configuration/)\n* [Power up with the cookbook](https://mini-swe-agent.com/latest/advanced/cookbook/)\n* [FAQ](https://mini-swe-agent.com/latest/faq/)\n* [Contribute!](https://mini-swe-agent.com/latest/contributing/)\n\n## Attribution\n\nIf you found this work helpful, please consider citing the [SWE-agent paper](https://arxiv.org/abs/2405.15793) in your work:\n\n```bibtex\n@inproceedings{yang2024sweagent,\n  title={{SWE}-agent: Agent-Computer Interfaces Enable Automated Software Engineering},\n  author={John Yang and Carlos E Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik R Narasimhan and Ofir Press},\n  booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},\n  year={2024},\n  url={https://arxiv.org/abs/2405.15793}\n}\n```\n\nOur other projects:\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/SWE-agent/SWE-agent\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/sweagent_logo_text_below.svg\" alt=\"SWE-agent\" height=\"120px\"\u003e\u003c/a\u003e\n   \u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://github.com/SWE-agent/SWE-ReX\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swerex_logo_text_below.svg\" alt=\"SWE-ReX\" height=\"120px\"\u003e\u003c/a\u003e\n   \u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://github.com/SWE-bench/SWE-bench\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swebench_logo_text_below.svg\" alt=\"SWE-bench\" height=\"120px\"\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://github.com/SWE-bench/SWE-smith\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swesmith_logo_text_below.svg\" alt=\"SWE-smith\" height=\"120px\"\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://github.com/codeclash-ai/codeclash\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/codeclash_logo_text_below.svg\" alt=\"CodeClash\" height=\"120px\"\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://github.com/SWE-bench/sb-cli\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/sbcli_logo_text_below.svg\" alt=\"sb-cli\" height=\"120px\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswe-agent%2Fmini-swe-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswe-agent%2Fmini-swe-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswe-agent%2Fmini-swe-agent/lists"}