Mini SWE-Agent

Active
GitHub Python MIT

Description

Mini SWE-Agent is a minimalist AI agent in just 100 lines of code that solves GitHub issues or assists developers in the command line, demonstrating core coding agent capabilities with minimal implementation.

Key Features

  • Minimal ~100-line Python agent class achieving >74% on SWE-bench verified
  • Bash-only tool interface requiring no special LLM tool-calling capabilities
  • Completely linear message history for easy debugging and fine-tuning
  • Subprocess-based execution enabling trivial sandboxing with Docker/Podman
  • Broad model compatibility via litellm, OpenRouter, and Portkey
  • Supports local environments, Docker, Singularity/Apptainer, Bubblewrap sandboxes

Use Cases

💡 Solving GitHub issues autonomously from the command line
💡 Benchmarking and evaluating LLM coding capabilities
💡 Fine-tuning and reinforcement learning research baselines
💡 Rapid prototyping of coding agent workflows
💡 Educational demonstrations of minimal agent architecture

Quick Start

Install: pip install mini-swe-agent. Run: mini solve <github_issue_url> --model_name <model>. For Python API: from minisweagent.agents.default import DefaultAgent; agent = DefaultAgent(model, env); agent.run("Fix the bug"). Supports Docker with: --environment docker.

Related Projects