JSPM

@realblxckcodex/opencode-swarm

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q52689F
  • License SEE LICENSE IN LICENSE

Multi-Agent Orchestration System with true subagent support for OpenCode AI

Package Exports

  • @realblxckcodex/opencode-swarm

Readme

🐝 OpenCode Swarm Plugin

Native OpenCode plugin for multi-agent swarm orchestration using OpenCode's built-in providers.

npm version Status License Buy Me A Coffee

No external setup required β€” runs entirely inside OpenCode using your existing providers.


πŸ€” Why Swarm?

Standard AI assistants handle one task at a time. Swarm brings true multi-agent orchestration to OpenCode:

  • Parallel agents work on different aspects of your task simultaneously
  • Hierarchical workflows break complex problems into manageable subtasks
  • Consensus mechanisms ensure quality through automated review
  • Native integration β€” no external servers, no API keys, no local models

πŸ‡©πŸ‡ͺ Deutsch | German

🎯 Was ist OpenCode Swarm?

OpenCode Swarm ist ein nativer OpenCode-Plugin fΓΌr Multi-Agent-Orchestrierung. Es erweitert OpenCode um echte Subagent-FunktionalitΓ€t β€” komplexe Aufgaben werden automatisch in Teilaufgaben zerlegt und von spezialisierten Agenten parallel bearbeitet.

Das Plugin lΓ€uft vollstΓ€ndig innerhalb von OpenCode und nutzt dabei die integrierte Provider-Infrastruktur. Keine externen Server, keine zusΓ€tzlichen API-Keys, kein lokales Modell-Setup erforderlich.

✨ Hauptfunktionen

  • 🎭 14 Spezialisierte Agents - Von strategischen Planern bis zu Code-Reviewern
  • πŸ”„ Echte Subagent-Orchestrierung - Jeder Worker als separater Subtask sichtbar
  • πŸ—οΈ Hierarchische & Mesh-Workflows - Flexible AusfΓΌhrungsmuster
  • πŸ—³οΈ Konsens-Mechanismen - Byzantinisch, Abstimmung und gewichteter Konsens
  • 🧠 Intelligente Modellauswahl - Automatische Model-Tier-Zuweisung
  • πŸ“Š Kosten-Tracking - API-Nutzung pro Run ΓΌberwachen
  • πŸ”’ Security Guard - Eingabe-Sanitisierung und Validierung
  • πŸ“ˆ Umfassendes Logging - Debuggen mit detaillierten AusfΓΌhrungs-Logs

πŸš€ Schnellstart

Installation als OpenCode Plugin

FΓΌge das Plugin zu deiner OpenCode Konfiguration hinzu:

{
  "plugins": ["@realblxckcodex/opencode-swarm@latest"]
}

Oder installiere es lokal fΓΌr Entwicklung:

npm install @realblxckcodex/opencode-swarm

Entwicklung aus dem Repository

git clone https://github.com/RealBlxckCodex/OpenSwarm.git
cd OpenSwarm
npm install
npm run build

Konfiguration

Erstelle .env mit deinen bevorzugten Modellen:

# Model Tiers
THINKING=kimi-k2-thinking
CODING=kimi-k2-5
STRONG=gpt-5-codex
REVIEWER=gpt-5-codex

Nutzung

# Swarm-Run starten
/swarm_run task="Benutzer-Authentifizierungssystem implementieren"

# AusfΓΌhrungs-Logs prΓΌfen
/swarm_logs

# Mit spezifischem Modus ausfΓΌhren
/swarm_run task="Datenbank-Layer refactoren" mode=hierarchical

πŸ—οΈ Architektur

Drei-Ebenen-Agent-System

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Benutzer-OberflΓ€chen-Ebene      β”‚
β”‚         (swarm-master)                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Strategische Ebene              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚strategicβ”‚ β”‚tactical β”‚ β”‚adaptive β”‚   β”‚
β”‚  β”‚ -queen  β”‚ β”‚ -queen  β”‚ β”‚ -queen  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚          β”‚          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         AusfΓΌhrungs-Ebene             β”‚
β”‚  researcher β”‚ coder β”‚ tester β”‚        β”‚
β”‚  architect  β”‚reviewerβ”‚optimizerβ”‚       β”‚
β”‚  analyst    β”‚documenter              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ‡¬πŸ‡§ English | Englisch

🎯 What is OpenCode Swarm?

OpenCode Swarm is a native OpenCode plugin for multi-agent orchestration. It extends OpenCode with true subagent capabilities β€” complex tasks are automatically decomposed into subtasks and processed in parallel by specialized agents.

The plugin runs entirely inside OpenCode using the integrated provider infrastructure. No external servers, no additional API keys, no local model setup required.

✨ Key Features

  • 🎭 14 Specialized Agents - From strategic planners to code reviewers
  • πŸ”„ True Subagent Orchestration - Each worker visible as separate subtask
  • πŸ—οΈ Hierarchical & Mesh Workflows - Flexible execution patterns
  • πŸ—³οΈ Consensus Mechanisms - Byzantine, voting, and weighted consensus
  • 🧠 Smart Model Selection - Automatic model tier assignment
  • πŸ“Š Cost Tracking - Monitor API usage per run
  • πŸ”’ Security Guard - Input sanitization and validation
  • πŸ“ˆ Comprehensive Logging - Debug with detailed execution logs

πŸš€ Quick Start

Installation

npm install @realblxckcodex/opencode-swarm

Configuration

Create .env with your preferred models:

# Model Tiers
THINKING=kimi-k2-thinking
CODING=kimi-k2-5
STRONG=gpt-5-codex
REVIEWER=gpt-5-codex

Usage

# Start a swarm run
/swarm_run task="Implement user authentication system"

# Check execution logs
/swarm_logs

# Run with specific mode
/swarm_run task="Refactor database layer" mode=hierarchical

πŸ—οΈ Architecture

Three-Tier Agent System

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         User Interface Layer            β”‚
β”‚         (swarm-master)                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Strategic Layer                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚strategicβ”‚ β”‚tactical β”‚ β”‚adaptive β”‚   β”‚
β”‚  β”‚ -queen  β”‚ β”‚ -queen  β”‚ β”‚ -queen  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚          β”‚          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Execution Layer               β”‚
β”‚  researcher β”‚ coder β”‚ tester β”‚        β”‚
β”‚  architect  β”‚reviewerβ”‚optimizerβ”‚       β”‚
β”‚  analyst    β”‚documenter              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ‡©πŸ‡ͺ Workflow-Modi | Workflow Modes

Hierarchischer Modus:

strategic-queen β†’ planner β†’ workers β†’ consensus β†’ reviewer

Mesh-Modus:

Alle Worker fΓΌhren parallel mit Peer-Konsens aus
πŸ‡¬πŸ‡§ Workflow Modes | Workflow-Modi

Hierarchical Mode:

strategic-queen β†’ planner β†’ workers β†’ consensus β†’ reviewer

Mesh Mode:

All workers execute in parallel with peer consensus

πŸ‡©πŸ‡ͺ VerfΓΌgbare Agents | Available Agents

Queens (Strategische Ebene)

  • strategic-queen - Hochrangige Planung & Dekomposition
  • tactical-queen - AusfΓΌhrungs-fokussierte Planung
  • adaptive-queen - Selbst-optimierend mit Feedback-Loops

Worker (AusfΓΌhrungs-Ebene)

  • researcher - Codebase-Analyse & Dokumentation
  • coder - Implementierungs-Spezialist
  • tester - Test-Generierung & Validierung
  • architect - System-Design & Patterns
  • reviewer - Code-Review & QualitΓ€tssicherung
  • analyst - Anforderungsanalyse
  • optimizer - Performance-Optimierung
  • documenter - Dokumentations-Generierung

Swarm-Spezialisten

  • swarm-planner - Swarm-spezifische Planung
  • swarm-implementer - Multi-Agent-AusfΓΌhrung
  • swarm-reviewer - Swarm-Output-Review
  • swarm-master - BenutzeroberflΓ€che & Delegation
πŸ‡¬πŸ‡§ Available Agents | VerfΓΌgbare Agents

Queens (Strategic Layer)

  • strategic-queen - High-level planning & decomposition
  • tactical-queen - Execution-focused planning
  • adaptive-queen - Self-optimizing with feedback loops

Workers (Execution Layer)

  • researcher - Codebase analysis & documentation
  • coder - Implementation specialist
  • tester - Test generation & validation
  • architect - System design & patterns
  • reviewer - Code review & quality assurance
  • analyst - Requirements analysis
  • optimizer - Performance optimization
  • documenter - Documentation generation

Swarm Specialists

  • swarm-planner - Swarm-specific planning
  • swarm-implementer - Multi-agent execution
  • swarm-reviewer - Swarm output review
  • swarm-master - User interface & delegation

πŸ‡©πŸ‡ͺ Befehle | Commands
Befehl Beschreibung
/swarm_run Task mit dem Swarm ausfΓΌhren
/swarm_logs AusfΓΌhrungs-Logs abrufen
/swarm_debug Diagnose ausfΓΌhren

Befehls-Optionen

/swarm_run 
  task="Deine Task-Beschreibung"    # Erforderlich
  mode=hierarchical|mesh            # Workflow-Modus
  consensus=byzantine|voting        # Konsens-Typ
  depth=3                           # Planungs-Tiefe
  verbose=true                      # Detaillierte Ausgabe
πŸ‡¬πŸ‡§ Commands | Befehle
Command Description
/swarm_run Execute a task with the swarm
/swarm_logs Retrieve execution logs
/swarm_debug Run diagnostics

Command Options

/swarm_run 
  task="Your task description"    # Required
  mode=hierarchical|mesh          # Workflow mode
  consensus=byzantine|voting      # Consensus type
  depth=3                         # Planning depth
  verbose=true                    # Detailed output

πŸ‡©πŸ‡ͺ Projektstruktur | Project Structure
OpenCode-Swarm/
β”œβ”€β”€ .opencode/
β”‚   β”œβ”€β”€ agents/              # 14 Agent-Definitionen
β”‚   β”œβ”€β”€ plugins/swarm/       # Plugin-Implementierung
β”‚   β”œβ”€β”€ swarm/
β”‚   β”‚   β”œβ”€β”€ core/            # Core-Orchestrierung (~11.200 Zeilen)
β”‚   β”‚   β”œβ”€β”€ adapters/        # Plattform-Adapter
β”‚   β”‚   └── modules/         # Erweiterungssystem
β”‚   └── commands/            # Debug-Befehle
β”œβ”€β”€ .github/                 # GitHub-Templates
β”œβ”€β”€ CHANGELOG.md            # Versions-Historie
β”œβ”€β”€ ROADMAP.md              # Feature-Roadmap
└── FEATURE_BRAINSTORMING.md # ZukΓΌnftige Features
πŸ‡¬πŸ‡§ Project Structure | Projektstruktur
OpenCode-Swarm/
β”œβ”€β”€ .opencode/
β”‚   β”œβ”€β”€ agents/              # 14 agent definitions
β”‚   β”œβ”€β”€ plugins/swarm/       # Plugin implementation
β”‚   β”œβ”€β”€ swarm/
β”‚   β”‚   β”œβ”€β”€ core/            # Core orchestration (~11,200 lines)
β”‚   β”‚   β”œβ”€β”€ adapters/        # Platform adapters
β”‚   β”‚   └── modules/         # Extension system
β”‚   └── commands/            # Debug commands
β”œβ”€β”€ .github/                 # GitHub templates
β”œβ”€β”€ CHANGELOG.md            # Version history
β”œβ”€β”€ ROADMAP.md              # Feature roadmap
└── FEATURE_BRAINSTORMING.md # Future ideas

πŸ‡©πŸ‡ͺ Dokumentation | Documentation
Dokument Beschreibung
ROADMAP.md Entwicklungs-Roadmap & Meilensteine
CHANGELOG.md Versions-Historie & Γ„nderungen
FEATURE_BRAINSTORMING.md ZukΓΌnftige Feature-Ideen
SWARM_ARCHITECTURE_REPORT.md Detaillierte Architektur-Analyse
TEST_PLAN.md Test-Strategie & Validierung
πŸ‡¬πŸ‡§ Documentation | Dokumentation
Document Description
ROADMAP.md Development roadmap & milestones
CHANGELOG.md Version history & changes
FEATURE_BRAINSTORMING.md Future feature ideas
SWARM_ARCHITECTURE_REPORT.md Detailed architecture analysis
TEST_PLAN.md Testing strategy & validation

πŸ‡©πŸ‡ͺ Tests | Testing
# Einfachen Test ausfΓΌhren
/swarm_run task="Teste GrundfunktionalitΓ€t"

# Parallelen AusfΓΌhrungs-Test ausfΓΌhren
/swarm_run task="Teste parallele Worker" mode=mesh

# System-Status prΓΌfen
/swarm_debug
πŸ‡¬πŸ‡§ Testing | Tests
# Run simple test
/swarm_run task="Test basic functionality"

# Run parallel execution test
/swarm_run task="Test parallel workers" mode=mesh

# Check system health
/swarm_debug

πŸ‡©πŸ‡ͺ Performance | Performance
  • AusfΓΌhrungszeit: 4-5 Minuten fΓΌr komplexe Tasks
  • Erfolgsrate: >90%% fΓΌr gut definierte Tasks
  • Kosteneffizienz: Intelligente Model-Tier-Auswahl
  • Parallelisierung: Bis zu 8 gleichzeitige Worker
πŸ‡¬πŸ‡§ Performance | Performance
  • Execution Time: 4-5 minutes for complex tasks
  • Success Rate: >90% for well-defined tasks
  • Cost Efficiency: Smart model tier selection
  • Parallelism: Up to 8 concurrent workers

πŸ‡©πŸ‡ͺ Mitwirken | Contributing

Mitwirkungen sind willkommen! Siehe unsere GitHub Issues fΓΌr:

  • πŸ› Bug-Reports
  • πŸ’‘ Feature-Requests
  • πŸ“– Dokumentations-Verbesserungen

β˜• UnterstΓΌtzung

Wenn dir dieses Projekt hilft, kannst du mir gerne einen Kaffee spendieren!

Deine UnterstΓΌtzung hilft, dieses Projekt am Leben zu erhalten, zu pflegen und fΓΌr alle kostenlos zu halten.

πŸ“ Lizenz

Dieses Projekt ist unter der Open Swarm License 1.0 lizenziert.

Kurzfassung: Du kannst dieses Plugin kostenlos nutzen, um coole Sachen zu bauen und diese sogar verkaufen. Aber du darfst das Plugin selbst nicht verkaufen oder als Hauptprodukt nutzen.

Siehe LICENSE fΓΌr Details.

πŸ™ Danksagungen

  • Gebaut fΓΌr OpenCode AI
  • Inspiriert durch Multi-Agent-Forschung
  • Dank an das OpenCode-Team fΓΌr das type: "subtask" Pattern
πŸ‡¬πŸ‡§ Contributing | Mitwirken

Contributions are welcome! Please see our GitHub Issues for:

  • πŸ› Bug reports
  • πŸ’‘ Feature requests
  • πŸ“– Documentation improvements

β˜• Support

If you find this project helpful, consider buying me a coffee!

Your support helps keep this project alive, maintained, and free for everyone.

πŸ“ License

This project is licensed under the Open Swarm License 1.0.

TL;DR: You can use this plugin for free to build cool stuff and even sell what you build. But you cannot sell the plugin itself or use it in a way where the plugin is the main product you're selling.

See LICENSE for full details.

πŸ™ Acknowledgments

  • Built for OpenCode AI
  • Inspired by multi-agent research
  • Thanks to the OpenCode team for the type: "subtask" pattern

🐝 Swarm Intelligence for Better Code 🐝
🐝 Schwarm-Intelligenz für besseren Code 🐝

Changelog β€’ Roadmap β€’ Ideas/Ideen