mini-swe-agent
Mini SWE Agent - A simple AI software engineering agent
What it is and what it does
mini-swe-agent is a stripped-down AI coding agent that uses language models to solve software engineering tasks by executing bash commands in isolated environments. Unlike more complex agent frameworks, it has no custom tools beyond bash and maintains a linear message history, making it transparent for debugging and fine-tuning. It supports multiple deployment modes (local, Docker, Singularity, bubblewrap) and works with any model accessible through litellm, openrouter, or portkey.
The package is designed for developers who want a hackable baseline rather than a black-box system. It includes a CLI tool for interactive use, batch inference capabilities, and Python bindings for programmatic control. With 14 runtime dependencies (pyyaml, requests, jinja2, pydantic, litellm, tenacity, rich, python-dotenv, typer, platformdirs, textual, prompt_toolkit, datasets, openai), it provides a complete but minimal agent stack.
Use it for:
- Automated code generation and bug fixing in software repositories using language model reasoning.
- Benchmarking language model coding capabilities on SWE-bench or similar evaluation frameworks.
- Building custom AI agents for software tasks by extending the simple agent scaffold with domain-specific prompts.
- Running AI-driven code analysis and refactoring workflows in isolated sandbox environments.
- Fine-tuning language models on agent trajectories without overfitting to complex agent infrastructure.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An AI agent that solves software engineering tasks by running bash commands in sandboxed environments, controlled by language models via litellm.
Yes, if you need an AI agent for code tasks and want transparency and simplicity over feature richness. The low install friction, active maintenance, permissive MIT license, and zero known vulnerabilities make it a safe choice. The alpha status and reliance on external LLM APIs (not included) are minor caveats. Best suited for developers, researchers, and teams already comfortable with language model APIs.
Install
mini-swe-agent on PyPI
pip
pip install mini-swe-agentuv
uv add mini-swe-agentpoetry
poetry add mini-swe-agentInstalling mini-swe-agent
Before you install
Active maintenance with recent release (22 days old). Low install friction: pure Python wheel with 14 runtime dependencies including well-established packages like pydantic, requests, and litellm. No compiled dependencies required.
License in practice
MIT License permits unrestricted use, modification, and distribution. No restrictions on commercial or proprietary use.
Quickstart
pip install mini-swe-agent
from mini_swe_agent import DefaultAgent, LitellmModel, LocalEnvironment
agent = DefaultAgent(
LitellmModel(model_name="gpt-4"),
LocalEnvironment(),
)
agent.run("Write a sudoku game")
Requires Python 3.10 or later. Requires a configured language model API (via litellm, openrouter, portkey, or similar).
Verify before relying
- Whether all 14 runtime dependencies are truly required for basic usage or if some are optional for specific features.
- Specific performance metrics on SWE-bench verified benchmark (description mentions >74% but exact version/conditions unclear).
- Stability and maturity level given 'Development Status :: 3 - Alpha' classifier despite adoption claims.
Package facts
| License | MIT License Copyright (c) 2025 Kilian A. Lieret and Carlos E. Jimenez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 14 — pyyaml, requests, jinja2, pydantic, litellm, tenacity, rich, python-dotenv, typer, platformdirs, textual, prompt_toolkit, datasets, openai |
| Maintenance | actively maintained — 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 15,501,428/month — #1,184 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mini_swe_agent-2.4.6-py3-none-any.whl
Keywords: nlp, agents, code
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
swe-rexSWE-ReX provides a runtime interface for AI…
permissive · top 5,000 on PyPI
swesmithSWE-smith generates large-scale software…
permissive · top 5,000 on PyPI
swebenchSWE-bench is a benchmark framework for…
permissive · top 1,000 on PyPI
google-agents-cliA CLI toolchain that equips coding agents…
permissive · top 15,000 on PyPI
tom-sweAdds Theory of Mind capabilities to software…
permissive · top 5,000 on PyPI
deepagents-codeA terminal-based AI coding agent that works…
permissive · top 15,000 on PyPI
qwen-agentQwen-Agent is a framework for building LLM…
unclear · top 15,000 on PyPI
agent_governance_toolkitUnified installer that bundles policy…
permissive · top 15,000 on PyPI
terminal-benchTerminal-Bench provides a benchmark suite and…
unclear · top 15,000 on PyPI
code-puppyCode Puppy is an AI-powered code generation…
permissive · top 15,000 on PyPI