Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwarmWeaver_

Autonomous multi-mode coding agent powered by the Claude Agent SDK.

SwarmWeaver landing page: New Project setup with project folder input, description textarea, Greenfield mode selector, and LAUNCH button

The SwarmWeaver command center — describe what you want to build and launch.

Python 3.11+ Node 20+ License MIT CI Docker

Point it at a spec, a codebase, or a bug report — it works autonomously across unlimited sessions until the job is done. Built for long-running autonomous sessions with audit trails, approval gates, and cost controls.

Key Features

  • Six operation modes — greenfield, feature, refactor, fix, evolve, security
  • Web UI + CLI — Omnibar command center, multi-session tabs, real-time terminal
  • Multi-agent swarm — Static N workers or AI-orchestrated Smart Swarm with inter-agent mail
  • Git worktree isolation — Run in isolated branches; merge or discard on completion
  • Session persistence — SQLite-backed session database recording every session, agent turn, cost, and file change with cross-project indexing
  • Shadow git snapshots — Commit-based capture before/after each agent turn with SQLite index, named bookmarks, preview-before-restore, per-file diff and surgical revert
  • MELS expertise system — Cross-project learning with real-time intra-session lesson synthesis
  • Native LSP code intelligence — 22 language servers with impact analysis and cross-worker diagnostics
  • Approval gates & verification — Human-in-the-loop review, self-healing test loops
  • Enhanced watchdog — 9-state health monitoring, AI triage, circuit breaker
  • MCP server integration — User-configurable Model Context Protocol servers
  • Docker ready — Single docker-compose up for the full stack

How It Works

SwarmWeaver is a Python harness that runs Claude as a long-running autonomous coding agent. Unlike one-shot code generation, it works across many sessions with fresh context windows, persisting progress through a task list, git commits, and handoff notes.

Choose your goal — each maps to a mode:

Your goal Mode Example
Build from spec greenfield "Build me a SaaS dashboard from this spec"
Add new features feature "Add OAuth2 login with Google and GitHub"
Migrate or restructure refactor "Migrate from JavaScript to TypeScript"
Diagnose and fix bugs fix "Login fails when email has a plus sign"
Improve an existing app evolve "Add unit tests for 80% coverage"
Security vulnerability scan security "Full security audit of the API layer"

Each mode follows a phase-based execution pattern with looping phases that repeat until all tasks are complete. See docs/overview.md for detailed phase sequences and cross-cutting capabilities, or jump to the full system architecture diagram for a visual overview of every subsystem and how they connect.

Prerequisites

Quick Start

Option 1: Web UI (Recommended)

# 1. Clone and install
git clone https://github.com/HeshamFS/swarmweaver.git
cd swarmweaver
./setup.sh                   # creates venv + installs Python deps (Unix/macOS)
# On Windows: use "uv sync" and "npm install" instead
npm install                  # installs root dev tooling

# 2. Configure authentication
cp .env.example .env
# Edit .env and set one of:
#   CLAUDE_CODE_OAUTH_TOKEN=your-token   (Claude Code Max — run 'claude setup-token')
#   ANTHROPIC_API_KEY=your-key           (API key from console.anthropic.com)

# 3. Start the full stack
npm run dev

Open http://localhost:3000. Use the Omnibar to pick a mode, point it at a directory, and launch.

Option 2: CLI

# Install (globally available)
pip install -e .

# Run any mode
swarmweaver --help
swarmweaver greenfield --project-dir ./my_app --spec ./my_spec.txt
swarmweaver feature   --project-dir ./my_app --description "Add OAuth2 login"
swarmweaver fix       --project-dir ./my_app --issue "Login fails with plus in email"

See docs/cli-reference.md for the full command reference, flags, and examples.

Option 3: Docker

cp .env.example .env   # set ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN
docker-compose up
# Web UI → http://localhost:3000   |   API → http://localhost:8000

Authentication

Set one of these in your .env file:

Variable Purpose
CLAUDE_CODE_OAUTH_TOKEN Claude Code Max subscription — run claude setup-token to generate
ANTHROPIC_API_KEY API key from console.anthropic.com

Both options work for Web UI, CLI, and Docker. See docs/configuration.md for all environment variables and config options.

Development

# Full setup
git clone https://github.com/HeshamFS/swarmweaver.git && cd swarmweaver
./setup.sh && npm install

# Dev stack
npm run dev             # FastAPI on :8000 + Next.js on :3000

# Tests
pytest tests -q

Documentation

Getting Started:

  • Overview — Modes, phases, cross-cutting capabilities
  • Getting Started — Installation, authentication, first run
  • CLI Reference — Commands, flags, examples
  • Web UI — Dashboard capabilities and layout
  • Configuration — Environment variables, config files, project artifacts

Core Systems:

Infrastructure:

Project:

  • CLAUDE.md — Detailed architecture reference for AI coding assistants
  • AGENTS.md — Concise agent context for AI tools
  • CONTRIBUTING.md — Setup, code style, commit conventions, PR checklist
  • CHANGELOG.md — Release history and notable changes

Getting Help

Contributing

See CONTRIBUTING.md for setup instructions, code style, commit conventions, and the PR checklist.

License

MIT — Copyright (c) 2026 SwarmWeaver Contributors

About

Autonomous coding agent with swarm orchestration—multiple agents in parallel worktrees. Six modes: greenfield, feature, refactor, fix, evolve, security. CLI + Web UI, approval gates.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages