codeswarm
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codeswarmStart a swarm on issue #421 and open a reviewed PR."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CodeSwarm Turn GitHub issues into tested, reviewed pull requests — autonomously. Self-hosted, multi-agent AI engineering swarm for GitHub. Provider-agnostic. Parallel. Production-ready.
Give CodeSwarm a GitHub issue. It turns it into a tested and reviewed pull request. Not AI that writes code — AI engineering team that ships production-ready PRs.
Table of Contents
Related MCP server: genswarms-fleet-mcp
Why CodeSwarm
Before | With CodeSwarm |
1 issue → hours of manual work | 1 issue → 5 AI agents → 1 ready-to-merge PR |
AI pair-programming | AI engineering team — GitHub-native, autonomous, self-hosted |
Wow effect: 1 GitHub Issue → 5 AI agents → parallel development → tests → review → CI fixes → 1 ready-to-merge PR
How it Works
flowchart TD
A[GitHub Issue<br/>ai:ready] --> B[Planner<br/>decomposes to JSON]
B --> C1[Researcher]
B --> C2[Coder]
B --> C3[Tester]
C1 --> D[Worktrees<br/>.codeswarm/task-xxx]
C2 --> D
C3 --> D
D --> E[Tester<br/>npm test / typecheck / lint]
E -->|fail| C2
E -->|pass| F[Reviewer<br/>security + correctness]
F -->|changes| C2
F -->|approved| G[GitHub PR]
G --> H{CI}
H -->|pass| I[Ready to merge]
H -->|fail| J[CI Agent<br/>parse logs → fix → push]
J --> HGitHub Issue (ai:ready)
↓ Planner → { goal, tasks: [...] }
├─ Researcher → finds files, git history, plan
├─ Coder ×N → isolated worktrees → commits
└─ Tester → npm test / lint / typecheck
↓ fail → Coder
↓ pass → Reviewer
↓ changes → Coder
↓ approved → GitHub PR → CI → CI Agent fixes on fail → ReadyFeatures
Parallel worktrees | Every agent works in isolated |
Conflict Resolver | LLM-assisted 3-way merge. Detects |
Autonomous PR loop | CI failure → parse logs → generate fix → push → re-run. Zero manual intervention. |
Provider-agnostic |
|
Cost & safety guards |
|
Full audit trail | Every |
Notifications | Telegram + Dashboard + GitHub comments. |
MCP native | Control swarm from Claude / Cursor / OpenCode via |
Quick Start
1. Install
npx codeswarm initCreates codeswarm.yml + .env. Fill .env:
DATABASE_URL=file:./data/codeswarm.db
GITHUB_TOKEN=ghp_xxx
GITHUB_OWNER=your-org
GITHUB_REPO=your-repo
OPENAI_API_KEY=sk-xxx
# or ANTHROPIC_API_KEY=sk-ant-xxx
# TELEGRAM_BOT_TOKEN=xxx
# TELEGRAM_CHAT_ID=xxx2. Run
Docker (recommended)
docker-compose up --build
# API: http://localhost:3000
# Dashboard: http://localhost:3001Local
npm install
npm run build
npm run dev
# or
node apps/api/dist/index.js &
node apps/dashboard/dist/index.js3. Trigger
Via label — add ai:ready to any open issue (webhook auto-creates task).
Via CLI — mock (no keys needed)
codeswarm issue run 421 --mock
# ✅ Local pipeline done: completed PR: https://github.com/example/repo/pull/438Via CLI — real
codeswarm issue run 421
codeswarm issue plan 421 # plan only, no codecodeswarm issue run first tries API (http://localhost:3000); if API is down, it falls back to local mock pipeline — great for demos and CI.
CLI Reference
codeswarm init # init codeswarm.yml + .env
codeswarm run --mock # start API + worker hint
codeswarm issue run <num> [--mock] [--repo owner/repo]
codeswarm issue plan <num> # planner only
codeswarm pr review <num>
codeswarm pr fix <num> # CI fix loop
codeswarm status # ASCII dashboard in terminal
codeswarm agents
codeswarm queue
codeswarm mcp # MCP server over stdioArchitecture
GitHub
│ webhook / poller
▼
Orchestrator ──► Task Queue ──► Agents (×N) ──► Git Worktrees ──► Tests / CI ──► GitHub PR
│ │ │
│ │ ├─ Planner / Researcher / Coder / Tester / Reviewer / CI Agent
│ │ └─ WorktreeManager + ConflictResolver
│ └─ InMemory (MVP) / Redis + BullMQ (prod)
└─ projects / tasks / agents / worktrees / artifacts / pull_requests / reviews / costs / agent_events
SQLite (MVP) → PostgreSQL (v0.3)Repo layout
codeswarm/
├── apps/
│ ├── api/ # HTTP API, webhook, orchestrator
│ ├── worker/ # queue worker (scale horizontally)
│ └── dashboard/ # real-time Web UI
├── packages/
│ ├── core/ # types, state-machine, cost, DB schema
│ ├── llm/ # OpenAI/Anthropic/Google/Ollama/LiteLLM/Mock
│ ├── agents/ # 6 agents + orchestrator
│ ├── github/ # Issues/PRs/Comments/Checks
│ ├── git/ # worktree manager
│ ├── queue/ # InMemory / Redis
│ ├── sandbox/ # security
│ ├── mcp/ # MCP server
│ └── telegram/ # notifier
├── tests/ # vitest (15 tests)
├── examples/ # wallet race condition
└── docker/MCP
Control the swarm from any MCP client:
{
"mcpServers": {
"codeswarm": { "command": "npx", "args": ["codeswarm", "mcp"] }
}
}Tool | Description |
| List tasks with status & progress |
| Start swarm for an issue |
| Cancel running task |
| Retry failed task |
| Spawn specific agent |
|
|
| Trigger reviewer |
Dashboard
http://localhost:3001 — live polling of http://localhost:3000/api/status
┌─────────────────────────────────────────┐
│ CODESWARM │
├─────────────────────────────────────────┤
│ ACTIVE AGENTS: 7 │
│ QUEUE: 12 │
│ PRs TODAY: 8 │
│ SUCCESS RATE: 81% │
├─────────────────────────────────────────┤
│ #421 Wallet race condition ██████ 80% │
│ #422 API timeout ████░░ 55% │
└─────────────────────────────────────────┘Terminal dashboard: codeswarm status
Configuration
codeswarm.yml (see codeswarm.yml.example):
task:
max_agents: 4
max_retries: 3
max_cost_usd: 2.00
timeout_minutes: 30
swarm:
max_total_agents: 10
max_depth: 2
llm:
provider: openai # openai | anthropic | openrouter | google | ollama | litellm
model: gpt-4o-mini
temperature: 0.2
queue:
type: memory # or redis
redisUrl: redis://localhost:6379
sandbox:
enabled: true
network: restricted
filesystem: repository_onlyCost example: gpt-4o-mini ≈ $0.15/$0.6 per 1M tokens. A full pipeline ~$0.01–0.05 with mock, ~$0.2–0.6 with real models.
Comparison
Tool | Positioning |
OpenHands | AI developer |
SWE-agent | Issue → code fix |
Aider | AI pair programming |
CodeSwarm | Orchestration of multiple AI developers — GitHub-native, multi-agent, parallel, autonomous, self-hosted, provider-agnostic |
Roadmap
Full roadmap with timeline, Gantt, metrics and exit criteria → ROADMAP.md
gantt
title CodeSwarm — Timeline
dateFormat YYYY-MM-DD
axisFormat %b %Y
section MVP
v0.1 shipped :done, v01, 2026-09-01, 2026-09-01
section Scale
v0.2 Parallel :done, v02, 2026-09-01, 2026-09-02
section Depth
v0.3 Plugins :done, v03, 2026-09-02, 2026-09-03
section GA
v1.0 Platform :done, v10, 2026-09-03, 2026-09-04Version | Status | Target | Highlights |
v0.1 | ✅ Shipped | Sep 2026 | Issues → Planner/Coder/Tester/Reviewer → PR, worktrees, OpenAI/Anthropic, Docker, SQLite, CLI |
v0.2 | ✅ Shipped | Sep 2026 | Parallel coders ×5, Redis/BullMQ, CI fix loop, Telegram, MCP, Dashboard SSE, cost guards |
v0.3 | ✅ Shipped | Sep 2026 | Conflict auto-merge, Postgres, multi-repo, vector memory, custom agents, plugin system |
v1.0 | ✅ Shipped | Sep 2026 | GitHub App, org RBAC, self-hosted models, marketplace, gVisor sandbox, analytics |
3 coders in parallel without file stomp
80% red CI auto-fixed, cost never exceeds
$2.00, p95 < 8 min visible in Dashboard
90% conflicts auto-merged, SQLite → Postgres via flag, 2 community agents contributed
Want to shape the roadmap? React with 👍 on issues labeledroadmap or open a roadmap/proposal.
Contributing
See CONTRIBUTING.md. PRs welcome!
npm install
npm run build # tsc -b
npm test # vitest — 15 testsLicense
MIT © 2026 CodeSwarm
This server cannot be deployed
Maintenance
Related MCP Connectors
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
MCP-first control plane for ProAgentStore agents and private instances.
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible clients to connect to Swarm, providing access to Space memory, work coordination, artifacts, evaluations, context packs, and agent execution tools.10 npmApache 2.0
- FlicenseNot gradedqualityBmaintenanceMCP server that connects any MCP harness (Claude Code, claude.ai, Cursor) to a fleet of GenSwarms swarms for observation, configuration, and optional operation.-
- AlicenseNot gradedqualityBmaintenanceEnables coordinating specialist agents through an event-driven backend, allowing submission of goals, retrieval of job status and results, and listing of jobs via MCP tools.MIT
- AlicenseNot gradedqualityAmaintenanceMCP server wrapping the taskswarm CLI as a single generic run tool for multi-agent task coordination.6 npmMIT