claude-swarm  by affaan-m

Multi-agent code orchestration for complex task decomposition and execution

Created 4 months ago
263 stars

Top 96.6% on SourcePulse

GitHubView on GitHub
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> Claude Swarm orchestrates complex coding tasks by decomposing them into parallel subtasks, coordinating AI agents, and providing real-time visualization. It targets developers and power users seeking to automate multi-step code generation, refactoring, or analysis workflows, offering efficient, monitored, and cost-controlled execution.

How It Works

The system employs a multi-phase approach leveraging Claude models. Phase 1 uses Claude Opus 4.6 to analyze a task and codebase, generating a dependency graph of subtasks. Phase 2 executes these subtasks in parallel via the Swarm Orchestrator, utilizing Claude Haiku agents for cost-efficiency. Key features include dependency-aware scheduling, pessimistic file locking to prevent conflicts, and hard budget enforcement. Phase 2.5 involves an Opus 4.6 Quality Gate reviewing combined agent outputs for correctness. Phase 3 presents a summary of results, costs, and a session replay ID. This architecture mirrors a senior architect planning, junior engineers executing, and senior reviewing workflow.

Quick Start & Requirements

Install via pip: pip install claude-swarm. For development, clone the repo and run pip install -e .. Real usage requires setting the ANTHROPIC_API_KEY environment variable. A demo mode (claude-swarm --demo) visualizes the TUI without an API key. Requires Python 3.11+ and claude-agent-sdk (v0.1.35+).

Highlighted Details

  • Dependency-aware scheduling ensures tasks execute only after their prerequisites are met.
  • Pessimistic file locking prevents concurrent agent edits on the same file.
  • Hard budget enforcement cancels remaining tasks when the specified USD limit is exceeded.
  • Real-time cost tracking monitors per-agent and total expenses.
  • Opus 4.6 Quality Gate reviews combined agent outputs for correctness and consistency.
  • Strategic model selection uses Opus for planning/review and Haiku for cheaper worker agents.
  • Session recording (JSONL) and replay functionality allow reviewing past executions.
  • A Rich-based htop-style terminal UI visualizes agent progress, tool usage, and conflicts.

Maintenance & Community

Built for the Claude Code Hackathon (Feb 10-16, 2026). No explicit details on ongoing maintenance, core contributors, or community channels are provided in the README.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: The permissive MIT license generally allows commercial use and integration with closed-source projects.

Limitations & Caveats

As a hackathon project, it may be experimental and lack extensive production hardening. Its effectiveness is contingent on Anthropic's Claude model performance and requires API access, incurring associated costs.

Health Check
Last Commit

4 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
64 stars in the last 30 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Kevin Hou Kevin Hou(Head of Product Engineering at Windsurf), and
9 more.

vibe-kanban by BloopAI

0.3%
27k
Kanban board for AI coding agents
Created 1 year ago
Updated 2 months ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Gabriel Almeida Gabriel Almeida(Cofounder of Langflow), and
1 more.

agents by wshobson

0.7%
37k
Collection of specialized AI subagents for Claude Code
Created 11 months ago
Updated 6 days ago
Feedback? Help us improve.