mini-swe-agent 1.17.5__py3-none-any.whl → 2.0.0a1__py3-none-any.whl
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.
- {mini_swe_agent-1.17.5.dist-info → mini_swe_agent-2.0.0a1.dist-info}/METADATA +36 -52
- mini_swe_agent-2.0.0a1.dist-info/RECORD +70 -0
- mini_swe_agent-2.0.0a1.dist-info/entry_points.txt +5 -0
- minisweagent/__init__.py +19 -26
- minisweagent/agents/default.py +128 -113
- minisweagent/agents/interactive.py +119 -58
- minisweagent/config/README.md +3 -4
- minisweagent/config/__init__.py +36 -1
- minisweagent/config/benchmarks/swebench.yaml +156 -0
- minisweagent/config/{extra/swebench.yaml → benchmarks/swebench_backticks.yaml} +69 -64
- minisweagent/config/benchmarks/swebench_modal.yaml +47 -0
- minisweagent/config/{extra → benchmarks}/swebench_xml.yaml +73 -70
- minisweagent/config/default.yaml +24 -21
- minisweagent/config/inspector.tcss +42 -0
- minisweagent/config/mini.yaml +53 -71
- minisweagent/config/{github_issue.yaml → mini_textbased.yaml} +43 -29
- minisweagent/environments/__init__.py +1 -0
- minisweagent/environments/docker.py +67 -20
- minisweagent/environments/extra/bubblewrap.py +86 -47
- minisweagent/environments/extra/swerex_docker.py +53 -20
- minisweagent/environments/extra/swerex_modal.py +90 -0
- minisweagent/environments/local.py +62 -21
- minisweagent/environments/singularity.py +59 -18
- minisweagent/exceptions.py +22 -0
- minisweagent/models/__init__.py +6 -7
- minisweagent/models/extra/roulette.py +20 -17
- minisweagent/models/litellm_model.py +90 -44
- minisweagent/models/litellm_response_model.py +80 -0
- minisweagent/models/litellm_textbased_model.py +45 -0
- minisweagent/models/openrouter_model.py +87 -45
- minisweagent/models/openrouter_response_model.py +123 -0
- minisweagent/models/openrouter_textbased_model.py +76 -0
- minisweagent/models/portkey_model.py +84 -42
- minisweagent/models/portkey_response_model.py +163 -0
- minisweagent/models/requesty_model.py +91 -41
- minisweagent/models/test_models.py +246 -19
- minisweagent/models/utils/actions_text.py +60 -0
- minisweagent/models/utils/actions_toolcall.py +102 -0
- minisweagent/models/utils/actions_toolcall_response.py +110 -0
- minisweagent/models/utils/anthropic_utils.py +28 -0
- minisweagent/models/utils/cache_control.py +15 -2
- minisweagent/models/utils/content_string.py +74 -0
- minisweagent/models/utils/openai_multimodal.py +50 -0
- minisweagent/models/utils/retry.py +25 -0
- minisweagent/run/benchmarks/__init__.py +1 -0
- minisweagent/run/{extra → benchmarks}/swebench.py +56 -35
- minisweagent/run/{extra → benchmarks}/swebench_single.py +36 -26
- minisweagent/run/{extra → benchmarks}/utils/batch_progress.py +1 -1
- minisweagent/run/hello_world.py +6 -0
- minisweagent/run/mini.py +54 -63
- minisweagent/run/utilities/__init__.py +1 -0
- minisweagent/run/{extra → utilities}/config.py +2 -0
- minisweagent/run/{inspector.py → utilities/inspector.py} +90 -11
- minisweagent/run/{mini_extra.py → utilities/mini_extra.py} +9 -5
- minisweagent/utils/serialize.py +26 -0
- mini_swe_agent-1.17.5.dist-info/RECORD +0 -61
- mini_swe_agent-1.17.5.dist-info/entry_points.txt +0 -5
- minisweagent/agents/interactive_textual.py +0 -450
- minisweagent/config/extra/swebench_roulette.yaml +0 -233
- minisweagent/config/mini.tcss +0 -86
- minisweagent/models/anthropic.py +0 -35
- minisweagent/models/litellm_response_api_model.py +0 -82
- minisweagent/models/portkey_response_api_model.py +0 -75
- minisweagent/models/utils/key_per_thread.py +0 -20
- minisweagent/models/utils/openai_utils.py +0 -41
- minisweagent/run/github_issue.py +0 -87
- minisweagent/run/utils/__init__.py +0 -0
- minisweagent/run/utils/save.py +0 -78
- {mini_swe_agent-1.17.5.dist-info → mini_swe_agent-2.0.0a1.dist-info}/WHEEL +0 -0
- {mini_swe_agent-1.17.5.dist-info → mini_swe_agent-2.0.0a1.dist-info}/licenses/LICENSE.md +0 -0
- {mini_swe_agent-1.17.5.dist-info → mini_swe_agent-2.0.0a1.dist-info}/top_level.txt +0 -0
- /minisweagent/config/{extra → benchmarks}/__init__.py +0 -0
- /minisweagent/run/{extra → benchmarks}/utils/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mini-swe-agent
|
|
3
|
-
Version:
|
|
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
|
|
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
|
[](https://join.slack.com/t/swe-bench/shared_invite/zt-36pj9bu5s-o3_yXPZbaH2wVnxnss1EkQ)
|
|
83
90
|
[](https://pypi.org/project/mini-swe-agent/)
|
|
84
91
|
|
|
85
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
-
|
|
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:** [](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>
|
|
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/
|
|
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
|
-
|
|
198
|
+

|
|
189
199
|
|
|
190
200
|
</td>
|
|
191
201
|
<td>
|
|
192
202
|
|
|
193
|
-
|
|
203
|
+

|
|
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
|
-

|
|
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
|
-

|
|
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
|
+

|
|
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
|
|
240
|
+
pip install uv && uvx mini-swe-agent
|
|
257
241
|
# or
|
|
258
|
-
pip install pipx && pipx ensurepath && pipx run mini-swe-agent
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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/)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
mini_swe_agent-2.0.0a1.dist-info/licenses/LICENSE.md,sha256=D3luWPkdHAe7LBsdD4vzqDAXw6Xewb3G-uczss0uh1s,1094
|
|
2
|
+
minisweagent/__init__.py,sha256=zlvjrkG3KEpusrSrfjcbgi9YK6hDVnTBcqpttTBub2U,2263
|
|
3
|
+
minisweagent/__main__.py,sha256=FIyAOiw--c3FQ2g240FOM1FdL0lk_PxSpixu0pQ7WFo,194
|
|
4
|
+
minisweagent/exceptions.py,sha256=ETVDXEet3ykSMBVmqH4egdG3gcz4_yPN5JRgjqcNeow,619
|
|
5
|
+
minisweagent/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
minisweagent/agents/__init__.py,sha256=cpjJLzg1IGxLM-tZpoMJV9S33ye13XtdBO0x7DU_Lrk,48
|
|
7
|
+
minisweagent/agents/default.py,sha256=W7LvWCqs22U8nVEEhTCDxa8ok0fHNofOZiVYfVmuHRo,6361
|
|
8
|
+
minisweagent/agents/interactive.py,sha256=_ZRyhb61rmuNWJQKMFNChicrXpzCk7iu-zrizy29G04,10129
|
|
9
|
+
minisweagent/config/README.md,sha256=FDC6xu91wny_g4ps5BMMunTliCZRgZTfncU0krPxrHo,250
|
|
10
|
+
minisweagent/config/__init__.py,sha256=czwg5fZboB84Y96zFyyrBA9SNiwoAfxIzDiZnOHvwG8,1868
|
|
11
|
+
minisweagent/config/default.yaml,sha256=Chn6Jo6vcjc8mx6TgQJvk3sq02oIH3j7IjITa6BqCZA,5318
|
|
12
|
+
minisweagent/config/inspector.tcss,sha256=8fXckGLTWmO1vP3aU4DuathviZjbakF7tkCX9HswyLA,494
|
|
13
|
+
minisweagent/config/mini.yaml,sha256=ToT8BEZOrEl3R1-zVIXVQswBiW4lQfhuu6BzSF25rko,4700
|
|
14
|
+
minisweagent/config/mini_textbased.yaml,sha256=0lgaAIMf0HDG0g679ENORXX6oOGlHbDz0IN7yt-5yds,5185
|
|
15
|
+
minisweagent/config/benchmarks/__init__.py,sha256=e1MoAlDn_wc9HnXNoncf1P-B4DQ-iRf6n7Q_txjZGRI,52
|
|
16
|
+
minisweagent/config/benchmarks/swebench.yaml,sha256=tN7WgvDk-HmPSrqFBZruvHRXKwua0HUfnPqFBuZH0KY,6210
|
|
17
|
+
minisweagent/config/benchmarks/swebench_backticks.yaml,sha256=t2CaRixM7tY_B_LWGPxawDAapOMMbscAGjwB8eB8lFs,8592
|
|
18
|
+
minisweagent/config/benchmarks/swebench_modal.yaml,sha256=ogb0euCQSJ1ksfPHkSzezZRr2JAD1uRVAFl6HrBKqiE,1406
|
|
19
|
+
minisweagent/config/benchmarks/swebench_xml.yaml,sha256=S2k5IuKnPFrqGo-gsWHelKke6802WM1Vm6eezZ61Ui8,8738
|
|
20
|
+
minisweagent/environments/__init__.py,sha256=PI6o8gWW8q6eghkQKKchtjudSZ7nPJBiyt5IATz8aNU,1357
|
|
21
|
+
minisweagent/environments/docker.py,sha256=IdOJEisAjnt0PR5kAgf9oLCNkBDPYyPd0C8HQrM7lqY,6427
|
|
22
|
+
minisweagent/environments/local.py,sha256=kzhuEsGiTYwwoS8X3VmkiNNPIY6WmeaLhOdbq-kBn70,3018
|
|
23
|
+
minisweagent/environments/singularity.py,sha256=BTtnr-kHj0k21YeBNsHILrb0GNXig_-qRUjdo8Ieh6k,5362
|
|
24
|
+
minisweagent/environments/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
+
minisweagent/environments/extra/bubblewrap.py,sha256=h3Lu-8SxBspdj59B20kOWPlBMkTX4QPYb_zcYh1vhNM,5220
|
|
26
|
+
minisweagent/environments/extra/swerex_docker.py,sha256=LyAEVCR6rymdhR1tsChp_uiOElTAtPHnnywqiZtln9g,3198
|
|
27
|
+
minisweagent/environments/extra/swerex_modal.py,sha256=LTLbWRUI1wI0jvhBheElG-qM3T_ASAryP3DcAGAcM1s,3464
|
|
28
|
+
minisweagent/models/__init__.py,sha256=6xQerjRtUa9Ae0-vhorX6Gn6T_8nVBU4H6jvhFYW81E,4466
|
|
29
|
+
minisweagent/models/litellm_model.py,sha256=f7ZiOD_7ZxevX3XdwfkHMdxvmcD_8S3eG4_70YXFigM,6868
|
|
30
|
+
minisweagent/models/litellm_response_model.py,sha256=VyYdPRlW0Oq22wb-ir1Fx_jzWigbJxn6Z_AVNacvtp4,3190
|
|
31
|
+
minisweagent/models/litellm_textbased_model.py,sha256=OeQm--3QltRm0HulkxkNS__Or3LE7ra8_MTEmWagChE,2007
|
|
32
|
+
minisweagent/models/openrouter_model.py,sha256=5E0sGX69KM0QOSyKFObLnbuJtX7_6bEd896FiBYGpBA,7321
|
|
33
|
+
minisweagent/models/openrouter_response_model.py,sha256=ngAiM4lpyz0DA9Yy3QAB5M1grcss-789kYIj1PfFc-Q,4897
|
|
34
|
+
minisweagent/models/openrouter_textbased_model.py,sha256=AO80uN8owW0nwmoO3GIbWpxYOHm6KU7RZepFeHHq0W4,3101
|
|
35
|
+
minisweagent/models/portkey_model.py,sha256=4uEeuJGLcOAG2UiLmlqywgtxOp0QG6YN8R_kfJSzfdk,9535
|
|
36
|
+
minisweagent/models/portkey_response_model.py,sha256=tP1wJN4CU-9BsMM3qm5SyoT1iFzVu6Mk5UoJgt84TD4,6607
|
|
37
|
+
minisweagent/models/requesty_model.py,sha256=Ir5kudErHDOI0XVRxAuGz7jnpqwg9rx3G5F4Jixjnq8,6727
|
|
38
|
+
minisweagent/models/test_models.py,sha256=RDMGhXOfR-VUuQ-nPM8Bm8LiuA5MKHwCX2PqT1Jjsj4,10728
|
|
39
|
+
minisweagent/models/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
+
minisweagent/models/extra/roulette.py,sha256=dKqMG0OJCXAxlEOCt0YUV4dZAuuYyKp2EGCgfY-y4J8,2147
|
|
41
|
+
minisweagent/models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
|
+
minisweagent/models/utils/actions_text.py,sha256=7Lka_-heukp6_ovEJh1mmFm9JDuDPFRvTCVXTH0HlXk,2166
|
|
43
|
+
minisweagent/models/utils/actions_toolcall.py,sha256=oqEHq6-NX-BFoFxvsdqaXqBeViK5ufKBvqNiqCTy2k8,3637
|
|
44
|
+
minisweagent/models/utils/actions_toolcall_response.py,sha256=dD_IDUmfe-sqw3VxtDHuFwPV2P8U-9RMGbTN05ja0VM,4234
|
|
45
|
+
minisweagent/models/utils/anthropic_utils.py,sha256=E1XFRtfSF1AvSutbqHUT9Vcg-NTSwSR7j8XXkweNFw4,1189
|
|
46
|
+
minisweagent/models/utils/cache_control.py,sha256=7buJUhldHZ2-9F7XytkQpQsc3sCBdd502__JQU89pbo,2365
|
|
47
|
+
minisweagent/models/utils/content_string.py,sha256=thJAlIMF-MiJufmoKoP1Bx-zojYLg2DM-Fv0fRhcEp0,2941
|
|
48
|
+
minisweagent/models/utils/openai_multimodal.py,sha256=xJjsLpfAv0XCEqEN6fXRstJNTeRqBf0Orql1wavj-B8,1865
|
|
49
|
+
minisweagent/models/utils/retry.py,sha256=-53Z2coCU6KyrIaQf-pMNP51xVr21EN4HhqwIimhrBg,860
|
|
50
|
+
minisweagent/run/__init__.py,sha256=WIoYgHVl7iZF2YncrfV3IttupG6P5KogroKHKECka3A,38
|
|
51
|
+
minisweagent/run/hello_world.py,sha256=4dKyWeVxYWfjBmzkBtkeUdZ7Qy3UnUc0LhMG0l9c8vY,1157
|
|
52
|
+
minisweagent/run/mini.py,sha256=CAirxzjssE4oGI_llmquuahF4Y09yeKiodsRCgmmv5w,4094
|
|
53
|
+
minisweagent/run/benchmarks/__init__.py,sha256=x7CKf8dhQnID87rP3_1KfuDRnmLI2GnNq3F0SWLvkKw,66
|
|
54
|
+
minisweagent/run/benchmarks/swebench.py,sha256=XLGoXG4LkQH4Lhh5hE2Q6PEVDMS0tKmv2yR97bm_bMk,12663
|
|
55
|
+
minisweagent/run/benchmarks/swebench_single.py,sha256=ec8jdgLf-QoBmQEoYIH49tFSOTmb34AFCXcETN1ST5o,4005
|
|
56
|
+
minisweagent/run/benchmarks/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
|
+
minisweagent/run/benchmarks/utils/batch_progress.py,sha256=PgCHttoXcg6UyNmTzYDVdMS59Bp4oJbWJIk5E8PaF9k,6808
|
|
58
|
+
minisweagent/run/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
|
+
minisweagent/run/utilities/__init__.py,sha256=T7dF84NeQoKgJwPURNy3F4CCrxici-7AwGiyV0ZsDlo,79
|
|
60
|
+
minisweagent/run/utilities/config.py,sha256=JF2BYoUm4bpRJmkn5mV95I8FaHJUYfMXPheQ9RnQwP8,3916
|
|
61
|
+
minisweagent/run/utilities/inspector.py,sha256=fa19C-u_qnhwFbByFgx338FSaPbBR6aACRBCVCoG1Rs,10174
|
|
62
|
+
minisweagent/run/utilities/mini_extra.py,sha256=VmIifsg6whXZ7h88tP5zzkKITFOSMAztpxr8FMCmyBg,1596
|
|
63
|
+
minisweagent/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
|
+
minisweagent/utils/log.py,sha256=ruDMNKMrVC9NPvCeHwO3QYz5jsVNUGQB2dRAEAPAWp8,996
|
|
65
|
+
minisweagent/utils/serialize.py,sha256=ZWE2TgAkJdF6H42r0zIMjKtYrwCLBgRoLpG4TZuocPs,761
|
|
66
|
+
mini_swe_agent-2.0.0a1.dist-info/METADATA,sha256=zAzJ5rogTph7-11VIXaZv6JxAprubfcRJmWMAu0qKLE,14474
|
|
67
|
+
mini_swe_agent-2.0.0a1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
68
|
+
mini_swe_agent-2.0.0a1.dist-info/entry_points.txt,sha256=h9itmW6xlkZJd9rqSmvsLAEHHG2f6DWoGCGXoHwBErE,202
|
|
69
|
+
mini_swe_agent-2.0.0a1.dist-info/top_level.txt,sha256=zKF4t8bFpV87fdVABZt2Da-vnb4Vkh_CxkwQx5YT4Ew,13
|
|
70
|
+
mini_swe_agent-2.0.0a1.dist-info/RECORD,,
|
minisweagent/__init__.py
CHANGED
|
@@ -8,7 +8,7 @@ This file provides:
|
|
|
8
8
|
unless you want the static type checking.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
__version__ = "
|
|
11
|
+
__version__ = "2.0.0a1"
|
|
12
12
|
|
|
13
13
|
import os
|
|
14
14
|
from pathlib import Path
|
|
@@ -17,32 +17,18 @@ from typing import Any, Protocol
|
|
|
17
17
|
import dotenv
|
|
18
18
|
from platformdirs import user_config_dir
|
|
19
19
|
from rich.console import Console
|
|
20
|
-
from rich.panel import Panel
|
|
21
20
|
|
|
22
21
|
from minisweagent.utils.log import logger
|
|
23
22
|
|
|
24
23
|
package_dir = Path(__file__).resolve().parent
|
|
25
24
|
|
|
25
|
+
|
|
26
26
|
global_config_dir = Path(os.getenv("MSWEA_GLOBAL_CONFIG_DIR") or user_config_dir("mini-swe-agent"))
|
|
27
27
|
global_config_dir.mkdir(parents=True, exist_ok=True)
|
|
28
28
|
global_config_file = Path(global_config_dir) / ".env"
|
|
29
29
|
|
|
30
30
|
if not os.getenv("MSWEA_SILENT_STARTUP"):
|
|
31
|
-
|
|
32
|
-
console.print(
|
|
33
|
-
Panel(
|
|
34
|
-
"[bold]mini-swe-agent v2.0 is coming soon.[/bold]\n\n"
|
|
35
|
-
"It will be even more flexible, extensible and performant. "
|
|
36
|
-
"However, [bold]breaking changes[/bold] were necessary.\n\n"
|
|
37
|
-
"To stay with the current major version for now, you can pin your dependency: "
|
|
38
|
-
"[bold white]mini-swe-agent~=1.0[/bold white]",
|
|
39
|
-
border_style="bold red",
|
|
40
|
-
title="BREAKING CHANGES AHEAD",
|
|
41
|
-
title_align="left",
|
|
42
|
-
expand=False,
|
|
43
|
-
)
|
|
44
|
-
)
|
|
45
|
-
console.print(
|
|
31
|
+
Console().print(
|
|
46
32
|
f"👋 This is [bold green]mini-swe-agent[/bold green] version [bold green]{__version__}[/bold green].\n"
|
|
47
33
|
f"Loading global config from [bold green]'{global_config_file}'[/bold green]"
|
|
48
34
|
)
|
|
@@ -57,12 +43,18 @@ class Model(Protocol):
|
|
|
57
43
|
"""Protocol for language models."""
|
|
58
44
|
|
|
59
45
|
config: Any
|
|
60
|
-
cost: float
|
|
61
|
-
n_calls: int
|
|
62
46
|
|
|
63
47
|
def query(self, messages: list[dict[str, str]], **kwargs) -> dict: ...
|
|
64
48
|
|
|
65
|
-
def
|
|
49
|
+
def format_message(self, **kwargs) -> dict: ...
|
|
50
|
+
|
|
51
|
+
def format_observation_messages(
|
|
52
|
+
self, message: dict, outputs: list[dict], template_vars: dict | None = None
|
|
53
|
+
) -> list[dict]: ...
|
|
54
|
+
|
|
55
|
+
def get_template_vars(self, **kwargs) -> dict[str, Any]: ...
|
|
56
|
+
|
|
57
|
+
def serialize(self) -> dict: ...
|
|
66
58
|
|
|
67
59
|
|
|
68
60
|
class Environment(Protocol):
|
|
@@ -70,20 +62,21 @@ class Environment(Protocol):
|
|
|
70
62
|
|
|
71
63
|
config: Any
|
|
72
64
|
|
|
73
|
-
def execute(self,
|
|
65
|
+
def execute(self, action: dict, cwd: str = "") -> dict[str, Any]: ...
|
|
66
|
+
|
|
67
|
+
def get_template_vars(self, **kwargs) -> dict[str, Any]: ...
|
|
74
68
|
|
|
75
|
-
def
|
|
69
|
+
def serialize(self) -> dict: ...
|
|
76
70
|
|
|
77
71
|
|
|
78
72
|
class Agent(Protocol):
|
|
79
73
|
"""Protocol for agents."""
|
|
80
74
|
|
|
81
|
-
model: Model
|
|
82
|
-
env: Environment
|
|
83
|
-
messages: list[dict[str, str]]
|
|
84
75
|
config: Any
|
|
85
76
|
|
|
86
|
-
def run(self, task: str, **kwargs) ->
|
|
77
|
+
def run(self, task: str, **kwargs) -> dict: ...
|
|
78
|
+
|
|
79
|
+
def save(self, path: Path | None, *extra_dicts) -> dict: ...
|
|
87
80
|
|
|
88
81
|
|
|
89
82
|
__all__ = [
|