--- id: mini-swe-agent version: "2.4.6" 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) license_treatment: permissive maintenance: active --- # mini-swe-agent — Mini SWE Agent - A simple AI software engineering agent License: permissive · Maintenance: active · Downloads: 15.5M/mo ## 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 above — 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 pip install mini-swe-agent uv add mini-swe-agent poetry add mini-swe-agent ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 15.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ai coding agent, automated software engineering, llm bash executor, code generation agent, swe-bench benchmark agent, minimal ai agent framework, language model code automation, ai-agent, code-generation, llm-automation [View on SkillFed](https://skillfed.io/packages/mini-swe-agent) · [View on PyPI](https://pypi.org/project/mini-swe-agent/)