mini-swe-agent 1.17.5__tar.gz → 2.0.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. {mini_swe_agent-1.17.5/src/mini_swe_agent.egg-info → mini_swe_agent-2.0.0a1}/PKG-INFO +36 -52
  2. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/README.md +28 -50
  3. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/pyproject.toml +19 -3
  4. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1/src/mini_swe_agent.egg-info}/PKG-INFO +36 -52
  5. mini_swe_agent-2.0.0a1/src/mini_swe_agent.egg-info/SOURCES.txt +74 -0
  6. mini_swe_agent-2.0.0a1/src/mini_swe_agent.egg-info/entry_points.txt +5 -0
  7. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/mini_swe_agent.egg-info/requires.txt +8 -1
  8. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/__init__.py +19 -26
  9. mini_swe_agent-2.0.0a1/src/minisweagent/agents/default.py +155 -0
  10. mini_swe_agent-2.0.0a1/src/minisweagent/agents/interactive.py +214 -0
  11. mini_swe_agent-2.0.0a1/src/minisweagent/config/README.md +8 -0
  12. mini_swe_agent-2.0.0a1/src/minisweagent/config/__init__.py +62 -0
  13. mini_swe_agent-2.0.0a1/src/minisweagent/config/benchmarks/swebench.yaml +156 -0
  14. mini_swe_agent-1.17.5/src/minisweagent/config/extra/swebench.yaml → mini_swe_agent-2.0.0a1/src/minisweagent/config/benchmarks/swebench_backticks.yaml +69 -64
  15. mini_swe_agent-2.0.0a1/src/minisweagent/config/benchmarks/swebench_modal.yaml +47 -0
  16. {mini_swe_agent-1.17.5/src/minisweagent/config/extra → mini_swe_agent-2.0.0a1/src/minisweagent/config/benchmarks}/swebench_xml.yaml +73 -70
  17. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/config/default.yaml +24 -21
  18. mini_swe_agent-2.0.0a1/src/minisweagent/config/inspector.tcss +42 -0
  19. mini_swe_agent-2.0.0a1/src/minisweagent/config/mini.yaml +139 -0
  20. mini_swe_agent-1.17.5/src/minisweagent/config/mini.yaml → mini_swe_agent-2.0.0a1/src/minisweagent/config/mini_textbased.yaml +28 -26
  21. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/environments/__init__.py +1 -0
  22. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/environments/docker.py +67 -20
  23. mini_swe_agent-2.0.0a1/src/minisweagent/environments/extra/bubblewrap.py +151 -0
  24. mini_swe_agent-2.0.0a1/src/minisweagent/environments/extra/swerex_docker.py +80 -0
  25. mini_swe_agent-2.0.0a1/src/minisweagent/environments/extra/swerex_modal.py +90 -0
  26. mini_swe_agent-2.0.0a1/src/minisweagent/environments/local.py +79 -0
  27. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/environments/singularity.py +59 -18
  28. mini_swe_agent-2.0.0a1/src/minisweagent/exceptions.py +22 -0
  29. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/models/__init__.py +6 -7
  30. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/models/extra/roulette.py +20 -17
  31. mini_swe_agent-2.0.0a1/src/minisweagent/models/litellm_model.py +147 -0
  32. mini_swe_agent-2.0.0a1/src/minisweagent/models/litellm_response_model.py +80 -0
  33. mini_swe_agent-2.0.0a1/src/minisweagent/models/litellm_textbased_model.py +45 -0
  34. mini_swe_agent-2.0.0a1/src/minisweagent/models/openrouter_model.py +168 -0
  35. mini_swe_agent-2.0.0a1/src/minisweagent/models/openrouter_response_model.py +123 -0
  36. mini_swe_agent-2.0.0a1/src/minisweagent/models/openrouter_textbased_model.py +76 -0
  37. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/models/portkey_model.py +84 -42
  38. mini_swe_agent-2.0.0a1/src/minisweagent/models/portkey_response_model.py +163 -0
  39. mini_swe_agent-2.0.0a1/src/minisweagent/models/requesty_model.py +170 -0
  40. mini_swe_agent-2.0.0a1/src/minisweagent/models/test_models.py +269 -0
  41. mini_swe_agent-2.0.0a1/src/minisweagent/models/utils/actions_text.py +60 -0
  42. mini_swe_agent-2.0.0a1/src/minisweagent/models/utils/actions_toolcall.py +102 -0
  43. mini_swe_agent-2.0.0a1/src/minisweagent/models/utils/actions_toolcall_response.py +110 -0
  44. mini_swe_agent-2.0.0a1/src/minisweagent/models/utils/anthropic_utils.py +28 -0
  45. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/models/utils/cache_control.py +15 -2
  46. mini_swe_agent-2.0.0a1/src/minisweagent/models/utils/content_string.py +74 -0
  47. mini_swe_agent-2.0.0a1/src/minisweagent/models/utils/openai_multimodal.py +50 -0
  48. mini_swe_agent-2.0.0a1/src/minisweagent/models/utils/retry.py +25 -0
  49. mini_swe_agent-2.0.0a1/src/minisweagent/run/benchmarks/__init__.py +1 -0
  50. {mini_swe_agent-1.17.5/src/minisweagent/run/extra → mini_swe_agent-2.0.0a1/src/minisweagent/run/benchmarks}/swebench.py +56 -35
  51. {mini_swe_agent-1.17.5/src/minisweagent/run/extra → mini_swe_agent-2.0.0a1/src/minisweagent/run/benchmarks}/swebench_single.py +36 -26
  52. {mini_swe_agent-1.17.5/src/minisweagent/run/extra → mini_swe_agent-2.0.0a1/src/minisweagent/run/benchmarks}/utils/batch_progress.py +1 -1
  53. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/run/hello_world.py +6 -0
  54. mini_swe_agent-2.0.0a1/src/minisweagent/run/mini.py +99 -0
  55. mini_swe_agent-2.0.0a1/src/minisweagent/run/utilities/__init__.py +1 -0
  56. {mini_swe_agent-1.17.5/src/minisweagent/run/extra → mini_swe_agent-2.0.0a1/src/minisweagent/run/utilities}/config.py +2 -0
  57. {mini_swe_agent-1.17.5/src/minisweagent/run → mini_swe_agent-2.0.0a1/src/minisweagent/run/utilities}/inspector.py +90 -11
  58. {mini_swe_agent-1.17.5/src/minisweagent/run → mini_swe_agent-2.0.0a1/src/minisweagent/run/utilities}/mini_extra.py +9 -5
  59. mini_swe_agent-2.0.0a1/src/minisweagent/utils/serialize.py +26 -0
  60. mini_swe_agent-2.0.0a1/tests/test_fire.py +159 -0
  61. mini_swe_agent-1.17.5/src/mini_swe_agent.egg-info/SOURCES.txt +0 -64
  62. mini_swe_agent-1.17.5/src/mini_swe_agent.egg-info/entry_points.txt +0 -5
  63. mini_swe_agent-1.17.5/src/minisweagent/agents/default.py +0 -140
  64. mini_swe_agent-1.17.5/src/minisweagent/agents/interactive.py +0 -153
  65. mini_swe_agent-1.17.5/src/minisweagent/agents/interactive_textual.py +0 -450
  66. mini_swe_agent-1.17.5/src/minisweagent/config/README.md +0 -9
  67. mini_swe_agent-1.17.5/src/minisweagent/config/__init__.py +0 -27
  68. mini_swe_agent-1.17.5/src/minisweagent/config/extra/swebench_roulette.yaml +0 -233
  69. mini_swe_agent-1.17.5/src/minisweagent/config/github_issue.yaml +0 -145
  70. mini_swe_agent-1.17.5/src/minisweagent/config/mini.tcss +0 -86
  71. mini_swe_agent-1.17.5/src/minisweagent/environments/extra/bubblewrap.py +0 -112
  72. mini_swe_agent-1.17.5/src/minisweagent/environments/extra/swerex_docker.py +0 -47
  73. mini_swe_agent-1.17.5/src/minisweagent/environments/local.py +0 -38
  74. mini_swe_agent-1.17.5/src/minisweagent/models/anthropic.py +0 -35
  75. mini_swe_agent-1.17.5/src/minisweagent/models/litellm_model.py +0 -101
  76. mini_swe_agent-1.17.5/src/minisweagent/models/litellm_response_api_model.py +0 -82
  77. mini_swe_agent-1.17.5/src/minisweagent/models/openrouter_model.py +0 -126
  78. mini_swe_agent-1.17.5/src/minisweagent/models/portkey_response_api_model.py +0 -75
  79. mini_swe_agent-1.17.5/src/minisweagent/models/requesty_model.py +0 -120
  80. mini_swe_agent-1.17.5/src/minisweagent/models/test_models.py +0 -42
  81. mini_swe_agent-1.17.5/src/minisweagent/models/utils/key_per_thread.py +0 -20
  82. mini_swe_agent-1.17.5/src/minisweagent/models/utils/openai_utils.py +0 -41
  83. mini_swe_agent-1.17.5/src/minisweagent/run/github_issue.py +0 -87
  84. mini_swe_agent-1.17.5/src/minisweagent/run/mini.py +0 -108
  85. mini_swe_agent-1.17.5/src/minisweagent/run/utils/save.py +0 -78
  86. mini_swe_agent-1.17.5/src/minisweagent/utils/__init__.py +0 -0
  87. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/LICENSE.md +0 -0
  88. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/setup.cfg +0 -0
  89. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/mini_swe_agent.egg-info/dependency_links.txt +0 -0
  90. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/mini_swe_agent.egg-info/top_level.txt +0 -0
  91. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/__main__.py +0 -0
  92. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/agents/__init__.py +0 -0
  93. {mini_swe_agent-1.17.5/src/minisweagent/config/extra → mini_swe_agent-2.0.0a1/src/minisweagent/config/benchmarks}/__init__.py +0 -0
  94. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/environments/extra/__init__.py +0 -0
  95. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/models/extra/__init__.py +0 -0
  96. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/models/utils/__init__.py +0 -0
  97. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/py.typed +0 -0
  98. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/run/__init__.py +0 -0
  99. {mini_swe_agent-1.17.5/src/minisweagent/run/extra → mini_swe_agent-2.0.0a1/src/minisweagent/run/benchmarks/utils}/__init__.py +0 -0
  100. {mini_swe_agent-1.17.5/src/minisweagent/run/extra/utils → mini_swe_agent-2.0.0a1/src/minisweagent/run/extra}/__init__.py +0 -0
  101. {mini_swe_agent-1.17.5/src/minisweagent/run → mini_swe_agent-2.0.0a1/src/minisweagent}/utils/__init__.py +0 -0
  102. {mini_swe_agent-1.17.5 → mini_swe_agent-2.0.0a1}/src/minisweagent/utils/log.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mini-swe-agent
3
- Version: 1.17.5
3
+ Version: 2.0.0a1
4
4
  Summary: Nano SWE Agent - A simple AI software engineering agent
5
5
  Author-email: Kilian Lieret <kilian.lieret@posteo.de>, "Carlos E. Jimenez" <carlosej@princeton.edu>
6
6
  License: MIT License
@@ -40,6 +40,7 @@ License-File: LICENSE.md
40
40
  Requires-Dist: pyyaml
41
41
  Requires-Dist: requests
42
42
  Requires-Dist: jinja2
43
+ Requires-Dist: pydantic>=2.0
43
44
  Requires-Dist: litellm>=1.75.5
44
45
  Requires-Dist: tenacity
45
46
  Requires-Dist: rich
@@ -48,12 +49,16 @@ Requires-Dist: typer
48
49
  Requires-Dist: platformdirs
49
50
  Requires-Dist: textual
50
51
  Requires-Dist: prompt_toolkit
52
+ Requires-Dist: datasets
51
53
  Requires-Dist: openai!=1.100.0,!=1.100.1
52
54
  Provides-Extra: full
53
55
  Requires-Dist: mini-swe-agent[dev]; extra == "full"
54
56
  Requires-Dist: swe-rex>=1.4.0; extra == "full"
57
+ Requires-Dist: mini-swe-agent[modal]; extra == "full"
58
+ Provides-Extra: modal
59
+ Requires-Dist: modal; extra == "modal"
60
+ Requires-Dist: boto3; extra == "modal"
55
61
  Provides-Extra: dev
56
- Requires-Dist: datasets; extra == "dev"
57
62
  Requires-Dist: pytest; extra == "dev"
58
63
  Requires-Dist: pytest-cov; extra == "dev"
59
64
  Requires-Dist: pytest-asyncio; extra == "dev"
@@ -67,14 +72,16 @@ Requires-Dist: mkdocs-material; extra == "dev"
67
72
  Requires-Dist: mkdocs-glightbox; extra == "dev"
68
73
  Requires-Dist: mkdocs-redirects; extra == "dev"
69
74
  Requires-Dist: portkey-ai; extra == "dev"
75
+ Requires-Dist: swe-rex; extra == "dev"
70
76
  Dynamic: license-file
71
77
 
72
78
  <div align="center">
73
79
  <a href="https://mini-swe-agent.com/latest/"><img 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"/></a>
74
80
  </div>
75
81
 
76
- # The 100 line AI agent that solves GitHub issues & more
82
+ # The minimal AI software engineering agent
77
83
 
84
+ 📣 [New tutorial on building minimal AI agents](https://minimal-agent.com/)<br/>
78
85
  📣 [Gemini 3 Pro reaches 74% on SWE-bench verified with mini-swe-agent!](https://x.com/KLieret/status/1991164693839270372)<br/>
79
86
  📣 [New blogpost: Randomly switching between GPT-5 and Sonnet 4 boosts performance](https://www.swebench.com/SWE-bench/blog/2025/08/19/mini-roulette/)
80
87
 
@@ -82,9 +89,12 @@ Dynamic: license-file
82
89
  [![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge&logo=slack&logoColor=white)](https://join.slack.com/t/swe-bench/shared_invite/zt-36pj9bu5s-o3_yXPZbaH2wVnxnss1EkQ)
83
90
  [![PyPI - Version](https://img.shields.io/pypi/v/mini-swe-agent?style=for-the-badge&logo=python&logoColor=white&labelColor=black&color=deeppink)](https://pypi.org/project/mini-swe-agent/)
84
91
 
85
- In 2024, [SWE-bench](https://github.com/swe-bench/SWE-bench) & [SWE-agent](https://github.com/swe-agent/swe-agent) helped kickstart the coding agent revolution.
92
+ > [!WARNING]
93
+ > This is **mini-swe-agent v2**. For the previous version, check out the [v1 branch](https://github.com/SWE-agent/mini-swe-agent/tree/v1).
86
94
 
87
- We now ask: **What if SWE-agent was 100x smaller, and still worked nearly as well?**
95
+ In 2024, we built [SWE-bench](https://github.com/swe-bench/SWE-bench) & [SWE-agent](https://github.com/swe-agent/swe-agent) and helped kickstart the coding agent revolution.
96
+
97
+ We now ask: **What if our agent was 100x smaller, and still worked nearly as well?**
88
98
 
89
99
  The `mini` agent is for
90
100
 
@@ -94,11 +104,11 @@ The `mini` agent is for
94
104
 
95
105
  Here's some details:
96
106
 
97
- - **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),
98
- [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!
99
- - **Performant:** Scores >74% on the [SWE-bench verified benchmark](https://www.swebench.com/) benchmark; starts faster than Claude Code
107
+ - **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),
108
+ [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!
109
+ - **Performant:** Scores >74% on the [SWE-bench verified benchmark](https://www.swebench.com/) benchmark; starts much faster than Claude Code
100
110
  - **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
101
- - **Cutting edge:** Built by the Princeton & Stanford team behind [SWE-bench](https://swebench.com) and [SWE-agent](https://swe-agent.com).
111
+ - Built by the Princeton & Stanford team behind [SWE-bench](https://swebench.com), [SWE-agent](https://swe-agent.com), and more (see below)
102
112
  - **Widely adopted:** In use by Meta, NVIDIA, Essential AI, Anyscale, and others
103
113
  - **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)
104
114
 
@@ -110,7 +120,7 @@ Here's some details:
110
120
  However, one year later, as LMs have become more capable, a lot of this is not needed at all to build a useful agent!
111
121
  In fact, the `mini` agent
112
122
 
113
- - **Does not have any tools other than bash** — it doesn't even use the tool-calling interface of the LMs.
123
+ - **Does not have any tools other than bash** — it doesn't even need to use the tool-calling interface of the LMs.
114
124
  This means that you can run it with literally any model. When running in sandboxed environments you also don't need to take care
115
125
  of installing a single package — all it needs is bash.
116
126
  - **Has a completely linear history** — every step of the agent just appends to the messages and that's it.
@@ -139,7 +149,7 @@ The `mini` agent wants to be a hackable tool, not a black box.
139
149
 
140
150
  Unlike other agents (including our own [swe-agent](https://swe-agent.com/latest/)), it is radically simpler, because it:
141
151
 
142
- - **Does not have any tools other than bash** — it doesn't even use the tool-calling interface of the LMs.
152
+ - **Does not have any tools other than bash** — it doesn't even need to use the tool-calling interface of the LMs.
143
153
  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.
144
154
  Want it to do something specific like opening a PR?
145
155
  Just tell the LM to figure it out rather than spending time to implement it in the agent.
@@ -176,57 +186,40 @@ What you get with both
176
186
  <table>
177
187
  <tr>
178
188
  <td width="50%">
179
- <a href="https://mini-swe-agent.com/latest/usage/mini/"><strong>Simple UI</strong></a> (<code>mini</code>)
189
+ <a href="https://mini-swe-agent.com/latest/usage/mini/"><strong>CLI</strong></a> (<code>mini</code>)
180
190
  </td>
181
191
  <td>
182
- <a href="https://mini-swe-agent.com/latest/usage/mini_v/"><strong>Visual UI</strong></a> (<code>mini -v</code>)
192
+ <a href="https://mini-swe-agent.com/latest/usage/swebench/"><strong>Batch inference</strong></a>
183
193
  </td>
184
194
  </tr>
185
195
  <tr>
186
196
  <td width="50%">
187
197
 
188
- ![mini](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/mini.gif?raw=true)
198
+ ![mini](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/mini.gif?raw=true)
189
199
 
190
200
  </td>
191
201
  <td>
192
202
 
193
- ![miniv](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/mini2.gif?raw=true)
203
+ ![swebench](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/swebench.gif?raw=true)
194
204
 
195
205
  </td>
196
206
  </tr>
197
207
  <tr>
198
- <td>
199
- <a href="https://mini-swe-agent.com/latest/usage/swebench/"><strong>Batch inference</strong></a>
200
- </td>
201
- <td>
202
- <a href="https://mini-swe-agent.com/latest/usage/inspector/"><strong>Trajectory browser</strong></a>
203
- </td>
204
- <tr>
205
- <tr>
206
-
207
208
  <td>
208
-
209
- ![swebench](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/swebench.gif?raw=true)
210
-
209
+ <a href="https://mini-swe-agent.com/latest/usage/inspector/"><strong>Trajectory browser</strong></a>
211
210
  </td>
212
-
213
- <td>
214
-
215
- ![inspector](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/inspector.gif?raw=true)
216
-
217
- </td>
218
-
219
- </tr>
220
211
  <td>
221
212
  <a href="https://mini-swe-agent.com/latest/advanced/cookbook/"><strong>Python bindings</strong></a>
222
213
  </td>
223
- <td>
224
- <a href="https://mini-swe-agent.com"><strong>More in the docs</strong></a>
225
- </td>
226
214
  </tr>
227
215
  <tr>
228
216
  <td>
229
217
 
218
+ ![inspector](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/inspector.gif?raw=true)
219
+
220
+ </td>
221
+ <td>
222
+
230
223
  ```python
231
224
  agent = DefaultAgent(
232
225
  LitellmModel(model_name=...),
@@ -234,15 +227,6 @@ agent = DefaultAgent(
234
227
  )
235
228
  agent.run("Write a sudoku game")
236
229
  ```
237
- </td>
238
- <td>
239
-
240
- * [Quick start](https://mini-swe-agent.com/latest/quickstart/)
241
- * [`mini`](https://mini-swe-agent.com/latest/usage/mini/)
242
- * [FAQ](https://mini-swe-agent.com/latest/faq/)
243
- * [Global configuration](https://mini-swe-agent.com/latest/advanced/global_configuration/)
244
- * [Yaml configuration files](https://mini-swe-agent.com/latest/advanced/yaml_configuration/)
245
- * [Power up](https://mini-swe-agent.com/latest/advanced/cookbook/)
246
230
 
247
231
  </td>
248
232
  </tr>
@@ -253,16 +237,16 @@ agent.run("Write a sudoku game")
253
237
  **Option 1:** If you just want to try out the CLI (package installed in anonymous virtual environment)
254
238
 
255
239
  ```bash
256
- pip install uv && uvx mini-swe-agent [-v]
240
+ pip install uv && uvx mini-swe-agent
257
241
  # or
258
- pip install pipx && pipx ensurepath && pipx run mini-swe-agent [-v]
242
+ pip install pipx && pipx ensurepath && pipx run mini-swe-agent
259
243
  ```
260
244
 
261
245
  **Option 2:** Install CLI & python bindings in current environment
262
246
 
263
247
  ```bash
264
248
  pip install mini-swe-agent
265
- mini -v # run the CLI
249
+ mini # run the CLI
266
250
  ```
267
251
 
268
252
  **Option 3:** Install from source (developer setup)
@@ -270,13 +254,13 @@ mini -v # run the CLI
270
254
  ```bash
271
255
  git clone https://github.com/SWE-agent/mini-swe-agent.git
272
256
  cd mini-swe-agent && pip install -e .
273
- mini [-v] # run the CLI
257
+ mini # run the CLI
274
258
  ```
275
259
 
276
260
  Read more in our [documentation](https://mini-swe-agent.com/latest/):
277
261
 
278
262
  * [Quick start guide](https://mini-swe-agent.com/latest/quickstart/)
279
- * More on [`mini`](https://mini-swe-agent.com/latest/usage/mini/) and [`mini -v`](https://mini-swe-agent.com/latest/usage/mini_v/)
263
+ * [Using the `mini` CLI](https://mini-swe-agent.com/latest/usage/mini/)
280
264
  * [Global configuration](https://mini-swe-agent.com/latest/advanced/global_configuration/)
281
265
  * [Yaml configuration files](https://mini-swe-agent.com/latest/advanced/yaml_configuration/)
282
266
  * [Power up with the cookbook](https://mini-swe-agent.com/latest/advanced/cookbook/)
@@ -2,8 +2,9 @@
2
2
  <a href="https://mini-swe-agent.com/latest/"><img 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"/></a>
3
3
  </div>
4
4
 
5
- # The 100 line AI agent that solves GitHub issues & more
5
+ # The minimal AI software engineering agent
6
6
 
7
+ 📣 [New tutorial on building minimal AI agents](https://minimal-agent.com/)<br/>
7
8
  📣 [Gemini 3 Pro reaches 74% on SWE-bench verified with mini-swe-agent!](https://x.com/KLieret/status/1991164693839270372)<br/>
8
9
  📣 [New blogpost: Randomly switching between GPT-5 and Sonnet 4 boosts performance](https://www.swebench.com/SWE-bench/blog/2025/08/19/mini-roulette/)
9
10
 
@@ -11,9 +12,12 @@
11
12
  [![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge&logo=slack&logoColor=white)](https://join.slack.com/t/swe-bench/shared_invite/zt-36pj9bu5s-o3_yXPZbaH2wVnxnss1EkQ)
12
13
  [![PyPI - Version](https://img.shields.io/pypi/v/mini-swe-agent?style=for-the-badge&logo=python&logoColor=white&labelColor=black&color=deeppink)](https://pypi.org/project/mini-swe-agent/)
13
14
 
14
- In 2024, [SWE-bench](https://github.com/swe-bench/SWE-bench) & [SWE-agent](https://github.com/swe-agent/swe-agent) helped kickstart the coding agent revolution.
15
+ > [!WARNING]
16
+ > This is **mini-swe-agent v2**. For the previous version, check out the [v1 branch](https://github.com/SWE-agent/mini-swe-agent/tree/v1).
15
17
 
16
- We now ask: **What if SWE-agent was 100x smaller, and still worked nearly as well?**
18
+ In 2024, we built [SWE-bench](https://github.com/swe-bench/SWE-bench) & [SWE-agent](https://github.com/swe-agent/swe-agent) and helped kickstart the coding agent revolution.
19
+
20
+ We now ask: **What if our agent was 100x smaller, and still worked nearly as well?**
17
21
 
18
22
  The `mini` agent is for
19
23
 
@@ -23,11 +27,11 @@ The `mini` agent is for
23
27
 
24
28
  Here's some details:
25
29
 
26
- - **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),
27
- [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!
28
- - **Performant:** Scores >74% on the [SWE-bench verified benchmark](https://www.swebench.com/) benchmark; starts faster than Claude Code
30
+ - **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),
31
+ [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!
32
+ - **Performant:** Scores >74% on the [SWE-bench verified benchmark](https://www.swebench.com/) benchmark; starts much faster than Claude Code
29
33
  - **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
30
- - **Cutting edge:** Built by the Princeton & Stanford team behind [SWE-bench](https://swebench.com) and [SWE-agent](https://swe-agent.com).
34
+ - Built by the Princeton & Stanford team behind [SWE-bench](https://swebench.com), [SWE-agent](https://swe-agent.com), and more (see below)
31
35
  - **Widely adopted:** In use by Meta, NVIDIA, Essential AI, Anyscale, and others
32
36
  - **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)
33
37
 
@@ -39,7 +43,7 @@ Here's some details:
39
43
  However, one year later, as LMs have become more capable, a lot of this is not needed at all to build a useful agent!
40
44
  In fact, the `mini` agent
41
45
 
42
- - **Does not have any tools other than bash** — it doesn't even use the tool-calling interface of the LMs.
46
+ - **Does not have any tools other than bash** — it doesn't even need to use the tool-calling interface of the LMs.
43
47
  This means that you can run it with literally any model. When running in sandboxed environments you also don't need to take care
44
48
  of installing a single package — all it needs is bash.
45
49
  - **Has a completely linear history** — every step of the agent just appends to the messages and that's it.
@@ -68,7 +72,7 @@ The `mini` agent wants to be a hackable tool, not a black box.
68
72
 
69
73
  Unlike other agents (including our own [swe-agent](https://swe-agent.com/latest/)), it is radically simpler, because it:
70
74
 
71
- - **Does not have any tools other than bash** — it doesn't even use the tool-calling interface of the LMs.
75
+ - **Does not have any tools other than bash** — it doesn't even need to use the tool-calling interface of the LMs.
72
76
  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.
73
77
  Want it to do something specific like opening a PR?
74
78
  Just tell the LM to figure it out rather than spending time to implement it in the agent.
@@ -105,57 +109,40 @@ What you get with both
105
109
  <table>
106
110
  <tr>
107
111
  <td width="50%">
108
- <a href="https://mini-swe-agent.com/latest/usage/mini/"><strong>Simple UI</strong></a> (<code>mini</code>)
112
+ <a href="https://mini-swe-agent.com/latest/usage/mini/"><strong>CLI</strong></a> (<code>mini</code>)
109
113
  </td>
110
114
  <td>
111
- <a href="https://mini-swe-agent.com/latest/usage/mini_v/"><strong>Visual UI</strong></a> (<code>mini -v</code>)
115
+ <a href="https://mini-swe-agent.com/latest/usage/swebench/"><strong>Batch inference</strong></a>
112
116
  </td>
113
117
  </tr>
114
118
  <tr>
115
119
  <td width="50%">
116
120
 
117
- ![mini](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/mini.gif?raw=true)
121
+ ![mini](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/mini.gif?raw=true)
118
122
 
119
123
  </td>
120
124
  <td>
121
125
 
122
- ![miniv](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/mini2.gif?raw=true)
126
+ ![swebench](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/swebench.gif?raw=true)
123
127
 
124
128
  </td>
125
129
  </tr>
126
130
  <tr>
127
- <td>
128
- <a href="https://mini-swe-agent.com/latest/usage/swebench/"><strong>Batch inference</strong></a>
129
- </td>
130
- <td>
131
- <a href="https://mini-swe-agent.com/latest/usage/inspector/"><strong>Trajectory browser</strong></a>
132
- </td>
133
- <tr>
134
- <tr>
135
-
136
131
  <td>
137
-
138
- ![swebench](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/swebench.gif?raw=true)
139
-
132
+ <a href="https://mini-swe-agent.com/latest/usage/inspector/"><strong>Trajectory browser</strong></a>
140
133
  </td>
141
-
142
- <td>
143
-
144
- ![inspector](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/inspector.gif?raw=true)
145
-
146
- </td>
147
-
148
- </tr>
149
134
  <td>
150
135
  <a href="https://mini-swe-agent.com/latest/advanced/cookbook/"><strong>Python bindings</strong></a>
151
136
  </td>
152
- <td>
153
- <a href="https://mini-swe-agent.com"><strong>More in the docs</strong></a>
154
- </td>
155
137
  </tr>
156
138
  <tr>
157
139
  <td>
158
140
 
141
+ ![inspector](https://github.com/SWE-agent/swe-agent-media/blob/main/media/mini/gif/inspector.gif?raw=true)
142
+
143
+ </td>
144
+ <td>
145
+
159
146
  ```python
160
147
  agent = DefaultAgent(
161
148
  LitellmModel(model_name=...),
@@ -163,15 +150,6 @@ agent = DefaultAgent(
163
150
  )
164
151
  agent.run("Write a sudoku game")
165
152
  ```
166
- </td>
167
- <td>
168
-
169
- * [Quick start](https://mini-swe-agent.com/latest/quickstart/)
170
- * [`mini`](https://mini-swe-agent.com/latest/usage/mini/)
171
- * [FAQ](https://mini-swe-agent.com/latest/faq/)
172
- * [Global configuration](https://mini-swe-agent.com/latest/advanced/global_configuration/)
173
- * [Yaml configuration files](https://mini-swe-agent.com/latest/advanced/yaml_configuration/)
174
- * [Power up](https://mini-swe-agent.com/latest/advanced/cookbook/)
175
153
 
176
154
  </td>
177
155
  </tr>
@@ -182,16 +160,16 @@ agent.run("Write a sudoku game")
182
160
  **Option 1:** If you just want to try out the CLI (package installed in anonymous virtual environment)
183
161
 
184
162
  ```bash
185
- pip install uv && uvx mini-swe-agent [-v]
163
+ pip install uv && uvx mini-swe-agent
186
164
  # or
187
- pip install pipx && pipx ensurepath && pipx run mini-swe-agent [-v]
165
+ pip install pipx && pipx ensurepath && pipx run mini-swe-agent
188
166
  ```
189
167
 
190
168
  **Option 2:** Install CLI & python bindings in current environment
191
169
 
192
170
  ```bash
193
171
  pip install mini-swe-agent
194
- mini -v # run the CLI
172
+ mini # run the CLI
195
173
  ```
196
174
 
197
175
  **Option 3:** Install from source (developer setup)
@@ -199,13 +177,13 @@ mini -v # run the CLI
199
177
  ```bash
200
178
  git clone https://github.com/SWE-agent/mini-swe-agent.git
201
179
  cd mini-swe-agent && pip install -e .
202
- mini [-v] # run the CLI
180
+ mini # run the CLI
203
181
  ```
204
182
 
205
183
  Read more in our [documentation](https://mini-swe-agent.com/latest/):
206
184
 
207
185
  * [Quick start guide](https://mini-swe-agent.com/latest/quickstart/)
208
- * More on [`mini`](https://mini-swe-agent.com/latest/usage/mini/) and [`mini -v`](https://mini-swe-agent.com/latest/usage/mini_v/)
186
+ * [Using the `mini` CLI](https://mini-swe-agent.com/latest/usage/mini/)
209
187
  * [Global configuration](https://mini-swe-agent.com/latest/advanced/global_configuration/)
210
188
  * [Yaml configuration files](https://mini-swe-agent.com/latest/advanced/yaml_configuration/)
211
189
  * [Power up with the cookbook](https://mini-swe-agent.com/latest/advanced/cookbook/)
@@ -34,6 +34,7 @@ dependencies = [
34
34
  "pyyaml",
35
35
  "requests",
36
36
  "jinja2",
37
+ "pydantic >= 2.0", # v2 required for safe mutable default arguments
37
38
  "litellm >= 1.75.5", # want to have gpt-5 support
38
39
  "tenacity",
39
40
  "rich",
@@ -42,6 +43,7 @@ dependencies = [
42
43
  "platformdirs",
43
44
  "textual",
44
45
  "prompt_toolkit",
46
+ "datasets",
45
47
  "openai != 1.100.0,!=1.100.1", # https://github.com/SWE-agent/mini-swe-agent/issues/446
46
48
  ]
47
49
 
@@ -49,10 +51,15 @@ dependencies = [
49
51
  full = [
50
52
  "mini-swe-agent[dev]",
51
53
  "swe-rex>=1.4.0",
54
+ "mini-swe-agent[modal]",
55
+ ]
56
+
57
+ modal = [
58
+ "modal",
59
+ "boto3",
52
60
  ]
53
61
 
54
62
  dev = [
55
- "datasets",
56
63
  "pytest",
57
64
  "pytest-cov",
58
65
  "pytest-asyncio",
@@ -66,6 +73,7 @@ dev = [
66
73
  "mkdocs-glightbox",
67
74
  "mkdocs-redirects",
68
75
  "portkey-ai",
76
+ "swe-rex",
69
77
  ]
70
78
 
71
79
  [project.urls]
@@ -76,8 +84,8 @@ Repository = "https://github.com/SWE-agent/mini-SWE-agent"
76
84
  [project.scripts]
77
85
  mini = "minisweagent.run.mini:app"
78
86
  mini-swe-agent = "minisweagent.run.mini:app"
79
- mini-extra = "minisweagent.run.mini_extra:main"
80
- mini-e= "minisweagent.run.mini_extra:main"
87
+ mini-extra = "minisweagent.run.utilities.mini_extra:main"
88
+ mini-e= "minisweagent.run.utilities.mini_extra:main"
81
89
 
82
90
  [tool.setuptools]
83
91
  include-package-data = true
@@ -263,3 +271,11 @@ asyncio_default_fixture_loop_scope = "function"
263
271
  markers = [
264
272
  "slow: marks tests as slow (deselect with '-k \"not slow\"')",
265
273
  ]
274
+
275
+ [dependency-groups]
276
+ dev = [
277
+ "datasets>=4.5.0",
278
+ "pytest>=9.0.2",
279
+ "pytest-asyncio>=1.3.0",
280
+ "pytest-cov>=7.0.0",
281
+ ]