Autonomous Software Engineering Agent powered by Xiaomi MiMo
MiMo SWE-Agent is an autonomous software engineering agent that reads GitHub issues, analyzes codebases, generates fixes, runs tests, and creates pull requests — all powered by Xiaomi MiMo V2.5 Pro.
GitHub Issue → Analyze → Plan → Code → Test → Review → Pull Request
│ │ │ │ │ │ │
└───────────┴────────┴───────┴───────┴────────┴─────────┘
All powered by MiMo
- 📥 Read Issue — Fetches issue details from GitHub API
- 🧠 Analyze — Understands the problem, identifies affected files
- 📋 Plan — Creates step-by-step execution plan
- 💻 Code — Generates precise code changes
- 🧪 Test — Runs tests to validate changes
- 🔍 Review — Self-reviews code quality (scored 1-10)
- 🔀 PR — Creates pull request with detailed description
- 🤖 MiMo-Powered — Uses Xiaomi MiMo V2.5 Pro for reasoning
- 🔄 Full Pipeline — End-to-end from issue to PR
- 🌐 Web Dashboard — Real-time visualization of agent thinking
- 🎮 Demo Mode — Works without API keys (mock responses)
- ⌨️ CLI Interface — Command-line tool for quick usage
- 📊 Metrics — Token usage, success rates, timing
- 🔌 Plugin Ready — Easy to add custom agents
git clone https://github.com/Cohhuy/mimo-swe-agent.git
cd mimo-swe-agent
pip install -r requirements.txt# Run the full demo pipeline
python -m mimo_swe demo
# Or with CLI
python -m mimo_swe demo --verbose# Set up environment
cp .env.example .env
# Edit .env with your keys
# Run on a GitHub issue
python -m mimo_swe run Cohhuy/mimo-swe-agent 1
# Check configuration
python -m mimo_swe check# Start the web UI
python -m mimo_swe web
# Open http://localhost:8000┌─────────────────────────────────────────────────────────────┐
│ MiMo SWE-Agent │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Planner │→ │ Coder │→ │ Tester │→ │ Reviewer │ │
│ │ │ │ │ │ │ │ │ │
│ │ Analyze │ │ Generate │ │ Validate │ │ Score & │ │
│ │ & Plan │ │ Code │ │ Tests │ │ Approve │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ ↑ ↑ ↑ ↑ │
│ └──────────────┴─────────────┴─────────────┘ │
│ MiMo V2.5 Pro │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ GitHub Client │ │
│ │ Issues • Files • Branches • Pull Requests │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
| Module | Purpose |
|---|---|
mimo_client.py |
MiMo API client (OpenAI-compatible) |
github_client.py |
GitHub REST API wrapper |
planner.py |
Issue analysis & execution planning |
coder.py |
Code generation from plans |
tester.py |
Test runner & validation |
reviewer.py |
Code review & scoring |
agent.py |
Main orchestrator pipeline |
demo_engine.py |
Demo mode with mock responses |
cli.py |
Command-line interface |
web/ |
FastAPI web dashboard |
The web dashboard provides real-time visualization of the agent's work:
- Dark theme with Xiaomi branding
- Live timeline showing each pipeline step
- Diff viewer with syntax highlighting
- Terminal output streaming in real-time
- Demo mode toggle for presentations
Demo mode runs the full pipeline without any API keys:
python -m mimo_swe demoIt uses a sample Flask calculator app with intentional bugs:
- Division function uses multiplication instead
- No ZeroDivisionError handling
- Modulo endpoint not implemented
- History endpoint has undefined variable
The agent "fixes" all bugs and creates a PR — perfect for demonstrations.
# Required for live mode
MIMO_API_KEY=your_mimo_api_key
GITHUB_TOKEN=your_github_token
# Optional
MIMO_MODEL=mimo-v2.5-pro # Model to use
MIMO_BASE_URL=https://token-plan-sgp.xiaomimimo.com/v1
DEMO_MODE=false # Enable demo mode# Run on specific issue
mimo-swe run owner/repo 42
# Run with custom model
mimo-swe run owner/repo 42 --model mimo-v2.5
# Demo mode
mimo-swe demo --verbose
# Check configuration
mimo-swe check
# Start web dashboard
mimo-swe web --port 8000The agent tracks detailed metrics:
- Token Usage — Total tokens consumed per step
- Success Rate — Percentage of successful PRs
- Average Duration — Mean time per issue
- Review Score — Code quality score (1-10)
📈 Execution Summary
════════════════════════════════════════════════════════
Issue: #42 - Calculator division bug
Status: ✅ PR Created
Duration: 12.4s
Tokens Used: 3,847
Review Score: 9.2/10
Tests Fixed: 4/4
🧠 Pipeline Steps
✅ Analyze 1.2s 450 tokens
✅ Plan 1.8s 680 tokens
✅ Code 3.4s 1,200 tokens
✅ Test 2.1s 320 tokens
✅ Review 1.9s 580 tokens
✅ PR 2.0s 617 tokens
- Core agent pipeline
- Demo mode
- Web dashboard
- CLI interface
- Multi-file complex changes
- GitHub Actions integration
- Slack/Discord notifications
- Agent memory & learning
- Multi-repo support
- Custom agent plugins
Contributions welcome! Please see our Contributing Guide.
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open Pull Request
MIT License - see LICENSE for details.
- Xiaomi MiMo — For the powerful AI model
- SWE-Agent / Devin — For inspiration
- Open Source Community — For tools and libraries
Built with ❤️ using Xiaomi MiMo V2.5 Pro