# Repository Briefing: joelhooks/swarm-tools
> Source: https://repoforai.com/repo/joelhooks/swarm-tools (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/joelhooks/swarm-tools
- **Official Docs / Website**: https://swarmtools.ai
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: See repository
- **Engineering Health**: C (44/100 · Maintenance 12/35 · Adoption 15/25 · Releases 11/20 · License 6/20)
- **Latest Release**: claude-code-swarm-plugin@0.63.3 (2026-02-06) — https://github.com/joelhooks/swarm-tools/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Self-Hosted, Local AI, MCP, CLI
- **Momentum**: 756 ★ total (+0 24h / +5 7d) · 69 forks
- **Topics**: `ai-agents`, `machine-learning`, `multi-agent`, `opencode`, `swarm`
- **When to Use**: Best for: OpenCode or Claude Code teams that regularly split work across distinct paths and need task state, worker handoffs, and searchable lessons across sessions. Skip if: You mostly do short, sequential edits, need hard isolation between workers, or require centrally replicated coordination state out of the box.

## Overview
```text
### Architecture & Core Mechanics
Swarm is a TypeScript monorepo with Bun and Turbo tooling. The coordinator looks up prior sessions, selects a strategy, breaks work into task cells, and dispatches parallel workers. It reviews completions before approval and records outcomes. OpenCode and Claude Code are the integration hosts; in Claude Code, the marketplace plugin starts the MCP server automatically.

Hive stores task cells under Git-backed `.hive/`, while embedded libSQL (SQLite) stores the append-only coordination log. Swarm Mail exposes `DurableMailbox`, `DurableLock`, and `DurableDeferred` primitives for coordination, with events such as `message_sent`, `file_reserved`, `checkpoint`, and `outcome`. Hivemind handles retrieval of past lessons. Git sync for Hive tasks should not be read as replication of the local coordination log.

### Key Capabilities & Differentiators
The `/swarm` workflow combines task decomposition, worker dispatch, path reservations, checkpoints, and coordinator review. `/hive`, `/inbox`, `/status`, and `/handoff` expose task inspection, messaging, progress checks, and session handoff. Completion records capture duration, errors, files touched, and success. Patterns progress from candidate to established to proven; a failure rate above 60% generates an anti-pattern, and confidence decays over 90 days without revalidation.

Hivemind uses Ollama embeddings and falls back to full-text search (FTS). `OLLAMA_MODEL` defaults to `mxbai-embed-large` (1,024 dimensions); other listed choices are `nomic-embed-text` (768), `all-minilm` (384), and `snowflake-arctic-embed` (1,024). These dimensions describe the stored vectors, not retrieval quality or runtime cost.

### Trade-offs & Limitations
Host-native subagents are simpler for one-off parallel work. A task tracker plus Git worktrees is a better fit when the primary requirement is explicit task ownership and isolated working directories. Swarm adds durable task state, agent messaging, and a reusable record of outcomes, but its path reservations are a coordination mechanism, not an isolation boundary. Work that repeatedly overlaps on the same files is a poor fit for straightforward parallel decomposition.

Embedded storage avoids operating a separate database, but Git-backed tasks and local coordination events have different sharing and retention needs. FTS avoids running Ollama at the cost of relying on text matches rather than embedding similarity. Commercial adopters should resolve the license discrepancy before rollout: an MIT notice is present, but the repository license field is unspecified.

### Hardware & Deployment Guide
Bun is required; Ollama is optional. Install the CLI with `npm install -g opencode-swarm-plugin`. For OpenCode, run `swarm setup`; for Claude Code, keep the global CLI installed, add the `joelhooks/swarm-tools` marketplace, then install `swarm`. Use `swarm doctor` to check dependencies and `swarm init` to initialize Hive in a project. For local embeddings, `OLLAMA_HOST` defaults to `http://localhost:11434`. The coordination stack needs no external database server, but offline inference depends on the coding host’s model configuration.

For source development, use `bun install`, `bun turbo build`, and `bun turbo test`. On February 6, 2026, `opencode-swarm-plugin@0.63.2` addressed unresolved `workspace:*` dependencies in published packages by switching CI to Bun 1.3.8 and adding a resolution safeguard. `claude-code-swarm-plugin@0.63.3` then linked the plugin version lines. Check that global CLI and plugin installation both work before rolling out to a team.
```

## Key Capabilities
```text
- Host integration: OpenCode uses `swarm setup`; the Claude Code marketplace plugin starts MCP automatically and requires the global CLI.
- Task persistence: Hive stores task cells in Git-backed `.hive/` so they can be shared through Git and recovered in later sessions.
- Worker coordination: Swarm Mail supplies durable messaging, exclusive path reservations, and checkpoints backed by libSQL events.
- Retrieval: Hivemind supports Ollama embeddings from 384 to 1,024 dimensions across the listed models, with full-text search as a fallback.
- Learning: Completion records capture duration, errors, files touched, and success; anti-patterns are generated above a 60% failure rate.
- Packaging: The OpenCode 0.63.2 fix moved CI to Bun 1.3.8 and added a safeguard against unresolved `workspace:*` dependencies.
```

## Quick Start / Clone
```bash
npm install -g opencode-swarm-plugin
swarm setup
```
