{"id":31228767,"url":"https://github.com/SWE-agent/mini-swe-agent","last_synced_at":"2025-09-22T07:03:16.645Z","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-09-16T15:53:57.000Z","size":7929,"stargazers_count":1647,"open_issues_count":33,"forks_count":159,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-16T16:39:14.165Z","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-28T20:18:15.000Z","updated_at":"2025-09-16T16:08:11.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":25,"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":276361150,"owners_count":25628853,"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-09-22T02:00:08.972Z","response_time":79,"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-09-22T07:01:54.380Z","updated_at":"2025-09-22T07:03:16.633Z","avatar_url":"https://github.com/SWE-agent.png","language":"Python","funding_links":[],"categories":["Python","A01_文本生成_文本对话","4. Agentic AI \u0026 Multi-Agent Systems","Personal Assistants \u0026 Conversational Agents","Evaluation","Projects \u0026 Tools","Agent Coding and Software Engineering","Catalog"],"sub_categories":["大语言对话模型及数据","Chatbots","Agentic Coding Frameworks (Scaffolding)","Frameworks \u0026 Tooling","Reference Harness Implementations"],"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 100 line AI agent that solves GitHub issues \u0026 more\n\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\nIn 2024, [SWE-bench](https://github.com/swe-bench/SWE-bench) \u0026 [SWE-agent](https://github.com/swe-agent/swe-agent) helped kickstart the coding agent revolution.\n\nWe now ask: **What if SWE-agent was 100x smaller, and still worked nearly as well?**\n\n`mini` 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 their tools like their scripts: **short, sharp, and readable**\n- **Engineers** who want something **trivial to sandbox \u0026 to deploy anywhere**\n\nHere's some details:\n\n- **Minimal**: Just [100 lines of python](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/agents/default.py) (+100 total for [env](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), [script](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/run/hello_world.py)) — no fancy dependencies!\n- **Powerful:** Resolves 68% of GitHub issues in the [SWE-bench verified benchmark](https://www.swebench.com/) ([leaderboard](https://swe-bench.com/)).\n- **Convenient:** Comes with UIs that turn this into your daily dev swiss army knife!\n- **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more\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- **Cutting edge:** Built by the Princeton \u0026 Stanford team behind [SWE-bench](https://swebench.com) and [SWE-agent](https://swe-agent.com).\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, mini-SWE-agent\n\n- **Does not have any tools other than bash** — it doesn't even 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\n`mini` 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 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\u003eSimple UI\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/mini_v/\"\u003e\u003cstrong\u003eVisual UI\u003c/strong\u003e\u003c/a\u003e (\u003ccode\u003emini -v\u003c/code\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  ![miniv](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/mini2.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/swebench/\"\u003e\u003cstrong\u003eBatch inference\u003c/strong\u003e\u003c/a\u003e\n  \u003c/td\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\u003ctr\u003e\n\u003ctr\u003e\n\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\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\n\u003c/tr\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\u003ctd\u003e\n\u003ca href=\"https://mini-swe-agent.com\"\u003e\u003cstrong\u003eMore in the docs\u003c/strong\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```python\nagent = DefaultAgent(\n    LitellmModel(model_name=...),\n    LocalEnvironment(),\n)\nagent.run(\"Write a sudoku game\")\n```\n\u003c/td\u003e\n\u003ctd\u003e\n\n* [Quick start](https://mini-swe-agent.com/latest/quickstart/)\n* [`mini`](https://mini-swe-agent.com/latest/usage/mini/)\n* [FAQ](https://mini-swe-agent.com/latest/faq/)\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](https://mini-swe-agent.com/latest/advanced/cookbook/)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Let's get started!\n\nOption 1: Install + run in virtual environment\n\n```bash\npip install uv \u0026\u0026 uvx mini-swe-agent [-v]\n# or\npip install pipx \u0026\u0026 pipx ensurepath \u0026\u0026 pipx run mini-swe-agent [-v]\n```\n\nOption 2: Install in current environment\n\n```bash\npip install mini-swe-agent \u0026\u0026 mini [-v]\n```\n\nOption 3: Install from source\n\n```bash\ngit clone https://github.com/SWE-agent/mini-swe-agent.git\ncd mini-swe-agent\npip install -e .\nmini [-v]\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* More on [`mini`](https://mini-swe-agent.com/latest/usage/mini/) and [`mini -v`](https://mini-swe-agent.com/latest/usage/mini_v/)\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://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/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://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/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://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/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://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swesmith_logo_text_below.svg\" alt=\"SWE-smith\" height=\"120px\"\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://github.com/SWE-bench/sb-cli\"\u003e\u003cimg src=\"https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/sbcli_logo_text_below.svg\" alt=\"sb-cli\" height=\"120px\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\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"}