π Multi-agent swarm coordination for OpenCode with learning capabilities, agent issue tracking, and management
npx skills add https://github.com/joelhooks/swarm-tools --skill always-on-guidanceInstall this skill with the CLI and start using the SKILL.md workflow in your workspace.
βββββββββββ βββ ββββββ βββββββ ββββ ββββ
βββββββββββ ββββββββββββββββββββββββ βββββ
βββββββββββ ββ ββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββ ββββββ ββββββ βββ βββ
ββββββββ ββββββββ βββ ββββββ ββββββ βββ
Multi-agent coordination that survives context death.
Break big tasks into small ones. Spawn agents to work in parallel. Learn from what works.
npm install -g opencode-swarm-plugin
swarm setup
Done. Use /swarm "your task" in any OpenCode session.
Step 1: Install the CLI globally (required):
npm install -g opencode-swarm-plugin
Step 2: Add the marketplace in Claude Code:
/plugin
β Manage marketplaces
β Add marketplace
β Enter: joelhooks/swarm-tools
Step 3: Install the plugin:
/plugin
β Manage plugins
β swarm-tools
β swarm
β Install
The MCP server starts automatically. Use /swarm "your task" in any session.
/swarm "Add user authentication with OAuth"
Git-backed task tracking in .hive/. Survives sessions, syncs via git.
hive_create({ title: "Fix auth bug", type: "bug" })
hive_cells({ status: "in_progress" })
hive_close({ id: "cell-123", reason: "Fixed" })
Semantic memory with embeddings. Store learnings, search later.
hivemind_store({ information: "Auth requires idempotency keys", tags: "auth,gotcha" })
hivemind_find({ query: "auth patterns" })
Actor-model coordination between agents. File reservations, messaging, checkpoints.
swarmmail_reserve({ paths: ["src/auth/*"], exclusive: true })
swarmmail_send({ to: ["worker-b"], subject: "Need types", body: "..." })
| Command | Description |
|---|---|
/swarm <task> |
Decompose and spawn parallel workers |
/hive |
Query and manage tasks |
/inbox |
Check messages from other agents |
/status |
Swarm coordination status |
/handoff |
End session with sync and handoff notes |
swarm setup # Configure OpenCode/Claude Code integration
swarm doctor # Check dependencies (Ollama for embeddings)
swarm init # Initialize hive in current project
swarm config # Show config paths
Your Task
β
βΌ
ββββββββββββββββββ
β COORDINATOR β
β β
β 1. Query past β
β sessions β
β 2. Pick strat β
β 3. Decompose β
ββββββββββββββββββ
β
βββββββββββββββββββΌββββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββ ββββββββββββββ ββββββββββββββ
β Worker A β β Worker B β β Worker C β
β β β β β β
β π files βββββΆβ π files β β π files β
ββββββββββββββ ββββββββββββββ ββββββββββββββ
β β β
βββββββββββββββββββΌββββββββββββββββββ
βΌ
ββββββββββββββββββ
β LEARNING β
β β
β Record outcome β
β Update weights β
ββββββββββββββββββ
Everything runs locally. No external servers.
.hive/ directory for tasksAll state is an append-only event log:
agent_registered β Agent joins swarm
message_sent β Agent-to-agent communication
file_reserved β Exclusive lock acquired
file_released β Lock released
checkpoint β Progress snapshot
outcome β Completion result
Every completion records duration, errors, files touched, success.
| Required | Optional |
|---|---|
| Bun | Ollama - local embeddings |
Run swarm doctor to check status.
Configure the embedding model via environment variables:
export OLLAMA_MODEL=nomic-embed-text # Default: mxbai-embed-large
export OLLAMA_HOST=http://localhost:11434 # Default
Supported models: mxbai-embed-large (1024d), nomic-embed-text (768d), all-minilm (384d), snowflake-arctic-embed (1024d). See swarm-mail docs for details.
bun install
bun turbo build
bun turbo test
MIT