mini-swe-agent 1.1.0__py3-none-any.whl → 1.1.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mini-swe-agent
3
- Version: 1.1.0
3
+ Version: 1.1.2
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
@@ -32,9 +32,9 @@ Classifier: Development Status :: 3 - Alpha
32
32
  Classifier: Operating System :: OS Independent
33
33
  Classifier: Intended Audience :: Developers
34
34
  Classifier: License :: OSI Approved :: MIT License
35
- Classifier: Programming Language :: Python :: 3.11
35
+ Classifier: Programming Language :: Python :: 3.10
36
36
  Classifier: Programming Language :: Python :: 3 :: Only
37
- Requires-Python: >=3.11
37
+ Requires-Python: >=3.10
38
38
  Description-Content-Type: text/markdown
39
39
  License-File: LICENSE.md
40
40
  Requires-Dist: pyyaml
@@ -67,36 +67,34 @@ Requires-Dist: mkdocs-glightbox; extra == "dev"
67
67
  Dynamic: license-file
68
68
 
69
69
  <div align="center">
70
-
71
70
  <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>
71
+ </div>
72
72
 
73
73
  <h1>The 100 line AI agent that solves GitHub issues & more</h1>
74
74
 
75
75
  [![Docs](https://img.shields.io/badge/Docs-green?style=for-the-badge&logo=materialformkdocs&logoColor=white)](https://mini-swe-agent.com/latest/)
76
76
  [![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)
77
- ![PyPI - Version](https://img.shields.io/pypi/v/mini-swe-agent?style=for-the-badge&logo=python&logoColor=white&labelColor=black&color=deeppink)
77
+ [![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/)
78
78
 
79
- </div>
80
-
81
- In 2024, [SWE-bench](https://swebench.com) & [SWE-agent](https://swe-agent.com) helped kickstart the agentic AI for software revolution.
79
+ In 2024, [SWE-bench](https://github.com/swe-bench/SWE-bench) & [SWE-agent](https://github.com/swe-agent/swe-agent) helped kickstart the agentic AI for software revolution.
82
80
 
83
81
  We now ask: **What if SWE-agent was 100x smaller, and still worked nearly as well?**
84
82
 
85
83
  `mini` is for
86
84
 
87
- - 🧪 **Researchers** who want to **benchmark, fine-tune or RL** without assumptions, bloat, or surprises
88
- - 🧑‍💻 **Hackers & power users** who like their tools like their scripts: **short, sharp, and readable**
89
- - 🐳 **Engineers** who want something **trivial to sandbox & to deploy anywhere**
85
+ - **Researchers** who want to **benchmark, fine-tune or RL** without assumptions, bloat, or surprises
86
+ - **Hackers & power users** who like their tools like their scripts: **short, sharp, and readable**
87
+ - **Engineers** who want something **trivial to sandbox & to deploy anywhere**
90
88
 
91
89
  Here's some details:
92
90
 
93
- - **🐜 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),
91
+ - **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),
94
92
  [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!
95
- - **💪 Powerful:** Resolves 65% of GitHub issues in the [SWE-bench verified benchmark](https://www.swebench.com/).
96
- - **🤗 Friendly:** Comes with **two convenient UIs** that will turn this into your daily dev swiss army knife!
97
- - **🍀 Environments:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
98
- - **🧪 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)
99
- - **🎓 Cutting edge:** Built by the Princeton & Stanford team behind [SWE-bench](https://swebench.com) and [SWE-agent](https://swe-agent.com).
93
+ - **Powerful:** Resolves 65% of GitHub issues in the [SWE-bench verified benchmark](https://www.swebench.com/) (with Claude Sonnet 4).
94
+ - **Friendly:** Comes with **two convenient UIs** that will turn this into your daily dev swiss army knife!
95
+ - **Environments:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
96
+ - **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)
97
+ - **Cutting edge:** Built by the Princeton & Stanford team behind [SWE-bench](https://swebench.com) and [SWE-agent](https://swe-agent.com).
100
98
 
101
99
  <details>
102
100
 
@@ -240,11 +238,13 @@ agent.run("Write a sudoku game")
240
238
  </tr>
241
239
  </table>
242
240
 
243
- ## 🔥 Let's get started!
241
+ ## Let's get started!
244
242
 
245
243
  Install + run in virtual environment
246
244
 
247
245
  ```bash
246
+ pip install uv && uvx mini-swe-agent [-v]
247
+ # or
248
248
  pip install pipx && pipx ensurepath && pipx run mini-swe-agent [-v]
249
249
  ```
250
250
 
@@ -272,7 +272,25 @@ Read more in our [documentation](https://mini-swe-agent.com/latest/):
272
272
  * [FAQ](https://mini-swe-agent.com/latest/faq/)
273
273
  * [Contribute!](https://mini-swe-agent.com/latest/contributing/)
274
274
 
275
- ## 👀 More agentic AI
275
+ ## Bottom line
276
+
277
+ If you found this work helpful, please consider citing
278
+
279
+ <details>
280
+ <summary> SWE-agent citation</summary>
281
+
282
+ ```bibtex
283
+ @inproceedings{yang2024sweagent,
284
+ title={{SWE}-agent: Agent-Computer Interfaces Enable Automated Software Engineering},
285
+ author={John Yang and Carlos E Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik R Narasimhan and Ofir Press},
286
+ booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
287
+ year={2024},
288
+ url={https://arxiv.org/abs/2405.15793}
289
+ }
290
+ ```
291
+ </details>
292
+
293
+ More agentic AI:
276
294
 
277
295
  <div align="center">
278
296
  <a href="https://github.com/SWE-agent/SWE-agent"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/sweagent_logo_text_below.svg" alt="SWE-agent" height="120px"></a>
@@ -1,18 +1,17 @@
1
- mini_swe_agent-1.1.0.dist-info/licenses/LICENSE.md,sha256=D3luWPkdHAe7LBsdD4vzqDAXw6Xewb3G-uczss0uh1s,1094
2
- minisweagent/__init__.py,sha256=mpxbbp2xmjcHrIPVQ2UgDdE4Pepb-nPGwSJgLkK1ZOw,1805
1
+ mini_swe_agent-1.1.2.dist-info/licenses/LICENSE.md,sha256=D3luWPkdHAe7LBsdD4vzqDAXw6Xewb3G-uczss0uh1s,1094
2
+ minisweagent/__init__.py,sha256=rxOCCkB39AUvm4SyDbBnhD4AtNHokjPx7dsujEiSJUM,1787
3
3
  minisweagent/__main__.py,sha256=FIyAOiw--c3FQ2g240FOM1FdL0lk_PxSpixu0pQ7WFo,194
4
4
  minisweagent/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  minisweagent/agents/__init__.py,sha256=cpjJLzg1IGxLM-tZpoMJV9S33ye13XtdBO0x7DU_Lrk,48
6
6
  minisweagent/agents/default.py,sha256=6TZUfKch6e_7m05BXmjqUjV-k068s6ldg7T6zJBbQW8,5438
7
7
  minisweagent/agents/interactive.py,sha256=w2lCVUItq7EMCAnPJu0q7RqzU-ScQCz1HNulGGDG8pE,7146
8
- minisweagent/agents/interactive_textual.py,sha256=iNDUpHA4fQN5z-SGjHY0VU7ZjpNfoa69Mvu5EPv5IPY,12683
9
- minisweagent/config/README.md,sha256=qc3_XCmXcwRkSPBdSX5bFCwFYd8XWCD12L8lX370hjQ,355
8
+ minisweagent/agents/interactive_textual.py,sha256=zzNsq1OkEmrBFVK3t1dxnrE7W7xU7Vc-WN47bxZcDIk,12657
9
+ minisweagent/config/README.md,sha256=tPruhnQDhZ8ugc1FNPKk9tVMRltmmIjdYgvHCmN-3Hs,354
10
10
  minisweagent/config/__init__.py,sha256=UfORdQID1Ek_dduZlybUsIKJjihImkSqNU5tIjpw0hk,694
11
11
  minisweagent/config/default.yaml,sha256=AGhcIq6X6n5Fs71ufO3B6CtZ4PS877tCxkPkrWR5Ylg,4497
12
12
  minisweagent/config/github_issue.yaml,sha256=evvu3AJ52tXYSdami9_B8zfazOAE2r2XXkzVmScBoKc,4539
13
- minisweagent/config/local.yaml,sha256=zmju4EUcybXlHOSzj-ZL2Se1803nXsZPk6jgrB9KxYw,4815
14
- minisweagent/config/local2.tcss,sha256=ThSOtS6JpXxqEYGX69TLy6gPZzuijngsNLI6SjnEJLY,1821
15
- minisweagent/config/__pycache__/__init__.cpython-313.pyc,sha256=4coMrJJcRL1VCQ7WJW2C2QFD6GnuqvHXkgCpDqxIP9E,1143
13
+ minisweagent/config/mini.tcss,sha256=ThSOtS6JpXxqEYGX69TLy6gPZzuijngsNLI6SjnEJLY,1821
14
+ minisweagent/config/mini.yaml,sha256=zmju4EUcybXlHOSzj-ZL2Se1803nXsZPk6jgrB9KxYw,4815
16
15
  minisweagent/config/extra/__init__.py,sha256=e1MoAlDn_wc9HnXNoncf1P-B4DQ-iRf6n7Q_txjZGRI,52
17
16
  minisweagent/config/extra/swebench.yaml,sha256=LNpTahpul6HL0HozgAAz-C6kpX3wZA7Tg8uE-ZmgrF4,7577
18
17
  minisweagent/environments/__init__.py,sha256=g5mKac1YgVOZVKvmiAiuyPSevRYpI69V4vYrbCH3gsI,54
@@ -21,7 +20,7 @@ minisweagent/environments/local.py,sha256=-2EV3RqZSB8WEjJE7BHLhRjocPMLpoJ3HbM8QB
21
20
  minisweagent/environments/singularity.py,sha256=j7ptRVF8GwDLd-5IjhT5j7fNxEJz9amuLTmVxotaMlI,1796
22
21
  minisweagent/environments/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
22
  minisweagent/environments/extra/swerex_docker.py,sha256=MOhhFdX1sAk_U0g-GOxohfjrldzO4YfrUnHq8qJff7c,1502
24
- minisweagent/models/__init__.py,sha256=-sLha7IXMReJNF1S0aTS3kvqXLlK9sVUw2DukikXh9k,2899
23
+ minisweagent/models/__init__.py,sha256=J4bnvfMByTVG0cL_6p51sm8gdargXhARfbG5c0UZ8Z4,2890
25
24
  minisweagent/models/anthropic.py,sha256=D8nHvvbgzPjla0He8p0O9kaXASPWg1Sai0pHsAj_Yn8,855
26
25
  minisweagent/models/litellm_model.py,sha256=5Nzln0Iq85Syluz-wGRbv5J_E6T7Mym_0M28tS8lteU,2039
27
26
  minisweagent/models/test_models.py,sha256=oB3jmZUire5TkVT8ebUCD3jLuLhPIbcTiTqdIix85Yw,1174
@@ -30,18 +29,18 @@ minisweagent/models/utils/key_per_thread.py,sha256=Vlxt--rapNNYCgIHrMCu1WVAkuiVI
30
29
  minisweagent/run/__init__.py,sha256=WIoYgHVl7iZF2YncrfV3IttupG6P5KogroKHKECka3A,38
31
30
  minisweagent/run/github_issue.py,sha256=GWOkGM09jOYV93p6xIM_kKWmC1yP_d5lprafWlqoBN0,2748
32
31
  minisweagent/run/hello_world.py,sha256=erLnEwNmPFLxq3-8zyv66Vy1kIqMqQf97vISX7LrQXg,959
33
- minisweagent/run/inspector.py,sha256=yk4c-QM0IJ_vd5zXVeyzYLvsA5fhP4L9qL1Lv0zSXcA,7129
34
- minisweagent/run/mini.py,sha256=LYVxswq0ucieCEALB4U46wOHm4ci33ypkMtN4B8wT90,4267
32
+ minisweagent/run/inspector.py,sha256=QnY3oYzm-yq3w9Jzs112Lco2Rg84vSocAWrQRVz_1lc,7127
33
+ minisweagent/run/mini.py,sha256=l_odLLCwYyRN0JO4NhV0POH1XgswrN4ssK1ZJva3wao,4087
35
34
  minisweagent/run/mini_extra.py,sha256=ecA1PnTWElpO60G9RktvVLtUOf3bZ_ESmnSttS6izhQ,1465
36
35
  minisweagent/run/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- minisweagent/run/extra/config.py,sha256=Xf-JKpD4S_yEhiqh7AZWPEGYVu5LrBnpf9teiAoz-wI,3117
36
+ minisweagent/run/extra/config.py,sha256=paMHfplhKsqNmzhCmozxhXWHvBzBCUlwUWD8N7ytCPc,3277
38
37
  minisweagent/run/extra/swebench.py,sha256=x50nFj4tdXkdoad6TkK7tP8CSgf-WkrY0IdSMe8_oX0,9564
39
38
  minisweagent/run/extra/swebench_single.py,sha256=L3Kk4G65o3MCPLMEwGNIs77-AFf6Lfc8o1oxrbN-ZWM,1991
40
39
  minisweagent/run/extra/utils/batch_progress.py,sha256=u__khJ-fipZLxTJu43LamGAtPUCqEZYEi8J7SfH7X6A,6211
41
40
  minisweagent/run/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
41
  minisweagent/run/utils/save.py,sha256=3_kuutw-uAGIhEoDawA3_FPeSz1vWuCWpJl80j5u7_s,893
43
- mini_swe_agent-1.1.0.dist-info/METADATA,sha256=UNHcWp5e3LqVY1hiMiUn7M6KvZDeH0YOEfgI1yTrdQU,12202
44
- mini_swe_agent-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
45
- mini_swe_agent-1.1.0.dist-info/entry_points.txt,sha256=d1_yRbTaGjs1UXHa6JQK0sKDGBIVGm8oeW0k2kfbJgQ,182
46
- mini_swe_agent-1.1.0.dist-info/top_level.txt,sha256=zKF4t8bFpV87fdVABZt2Da-vnb4Vkh_CxkwQx5YT4Ew,13
47
- mini_swe_agent-1.1.0.dist-info/RECORD,,
42
+ mini_swe_agent-1.1.2.dist-info/METADATA,sha256=tFKestkDgQK2fhTaZrJQMGkqlkmZMRiokD5IFuQdb8U,12841
43
+ mini_swe_agent-1.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
+ mini_swe_agent-1.1.2.dist-info/entry_points.txt,sha256=d1_yRbTaGjs1UXHa6JQK0sKDGBIVGm8oeW0k2kfbJgQ,182
45
+ mini_swe_agent-1.1.2.dist-info/top_level.txt,sha256=zKF4t8bFpV87fdVABZt2Da-vnb4Vkh_CxkwQx5YT4Ew,13
46
+ mini_swe_agent-1.1.2.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__ = "1.1.0"
11
+ __version__ = "1.1.2"
12
12
 
13
13
  import os
14
14
  from pathlib import Path
@@ -20,11 +20,11 @@ from rich.console import Console
20
20
 
21
21
  package_dir = Path(__file__).resolve().parent
22
22
 
23
- global_config_dir = Path(os.getenv("MINI_SWE_AGENT_GLOBAL_CONFIG_DIR") or user_config_dir("mini-swe-agent"))
23
+ global_config_dir = Path(os.getenv("MSWEA_GLOBAL_CONFIG_DIR") or user_config_dir("mini-swe-agent"))
24
24
  global_config_dir.mkdir(parents=True, exist_ok=True)
25
25
  global_config_file = Path(global_config_dir) / ".env"
26
26
 
27
- if not os.getenv("MINI_SWE_AGENT_SILENT_STARTUP"):
27
+ if not os.getenv("MSWEA_SILENT_STARTUP"):
28
28
  Console().print(
29
29
  f"👋 This is [bold green]mini-swe-agent[/bold green] version [bold green]{__version__}[/bold green].\n"
30
30
  f"Your config is stored in [bold green]'{global_config_file}'[/bold green]"
@@ -174,9 +174,7 @@ class AgentApp(App):
174
174
  ]
175
175
 
176
176
  def __init__(self, model, env, task: str, **kwargs):
177
- css_path = os.environ.get(
178
- "MSWEA_LOCAL2_STYLE_PATH", str(Path(__file__).parent.parent / "config" / "local2.tcss")
179
- )
177
+ css_path = os.environ.get("MSWEA_MINI_STYLE_PATH", str(Path(__file__).parent.parent / "config" / "mini.tcss"))
180
178
  self.__class__.CSS = Path(css_path).read_text()
181
179
  super().__init__()
182
180
  self.agent_state = "UNINITIALIZED"
@@ -1,6 +1,6 @@
1
1
  # Configs
2
2
 
3
- * `local.yaml` - Default config for `mini`/`agents/interactive.py` or `mini -v`/`agents/interactive_textual.py` agent.
3
+ * `mini.yaml` - Default config for `mini`/`agents/interactive.py` or `mini -v`/`agents/interactive_textual.py` agent.
4
4
  * `default.yaml` - Default config for the `default.py` agent.
5
5
  * `github_issue.yaml` - Config for the `run/github_issue.py` entry point.
6
6
 
@@ -18,7 +18,7 @@ class GlobalModelStats:
18
18
  self._lock = threading.Lock()
19
19
  self.cost_limit = float(os.getenv("MSWEA_GLOBAL_COST_LIMIT", "0"))
20
20
  self.call_limit = int(os.getenv("MSWEA_GLOBAL_CALL_LIMIT", "0"))
21
- if (self.cost_limit > 0 or self.call_limit > 0) and not os.getenv("MINI_SWE_AGENT_SILENT_STARTUP"):
21
+ if (self.cost_limit > 0 or self.call_limit > 0) and not os.getenv("MSWEA_SILENT_STARTUP"):
22
22
  print(f"Global cost/call limit: ${self.cost_limit:.4f} / {self.call_limit}")
23
23
 
24
24
  def add(self, cost: float) -> None:
@@ -58,6 +58,9 @@ def setup():
58
58
  ).strip()
59
59
  if default_model:
60
60
  set_key(global_config_file, "MSWEA_MODEL_NAME", default_model)
61
+ console.print(
62
+ "[bold yellow]If you already have your API keys set as environment variables, you can ignore the next question.[/bold yellow]"
63
+ )
61
64
  key_name = prompt("Enter your API key name (e.g., ANTHROPIC_API_KEY): ").strip()
62
65
  key_value = None
63
66
  if key_name:
@@ -38,7 +38,7 @@ class TrajectoryInspector(App):
38
38
 
39
39
  def __init__(self, trajectory_files: list[Path]):
40
40
  css_path = os.environ.get(
41
- "MSWEA_INSPECTOR_STYLE_PATH", str(Path(__file__).parent.parent / "config" / "local2.tcss")
41
+ "MSWEA_INSPECTOR_STYLE_PATH", str(Path(__file__).parent.parent / "config" / "mini.tcss")
42
42
  )
43
43
  self.__class__.CSS = Path(css_path).read_text()
44
44
 
minisweagent/run/mini.py CHANGED
@@ -32,7 +32,7 @@ from minisweagent.models import get_model
32
32
  from minisweagent.run.extra.config import configure_if_first_time
33
33
  from minisweagent.run.utils.save import save_traj
34
34
 
35
- DEFAULT_CONFIG = Path(os.getenv("MSWEA_LOCAL_CONFIG_PATH", builtin_config_dir / "local.yaml"))
35
+ DEFAULT_CONFIG = Path(os.getenv("MSWEA_MINI_CONFIG_PATH", builtin_config_dir / "mini.yaml"))
36
36
  console = Console(highlight=False)
37
37
  app = typer.Typer(rich_markup_mode="rich")
38
38
  prompt_session = PromptSession(history=FileHistory(global_config_dir / "mini_task_history.txt"))
@@ -48,8 +48,6 @@ def run_interactive(model: Model, env: Environment, agent_config: dict, task: st
48
48
  exit_status, result = None, None
49
49
  try:
50
50
  exit_status, result = agent.run(task)
51
- except KeyboardInterrupt:
52
- console.print("\n[bold red]KeyboardInterrupt -- goodbye[/bold red]")
53
51
  finally:
54
52
  if output:
55
53
  save_traj(agent, output, exit_status=exit_status, result=result)
@@ -65,10 +63,9 @@ def run_textual(model: Model, env: Environment, agent_config: dict, task: str, o
65
63
  )
66
64
  try:
67
65
  agent_app.run()
68
- except KeyboardInterrupt:
69
- typer.echo("\nKeyboardInterrupt -- goodbye")
70
66
  finally:
71
- save_traj(agent_app.agent, Path("traj.json"), exit_status=agent_app.exit_status, result=agent_app.result)
67
+ if output:
68
+ save_traj(agent_app.agent, output, exit_status=agent_app.exit_status, result=agent_app.result)
72
69
 
73
70
 
74
71
  @app.command(help=__doc__)
File without changes
File without changes