ClawSwarm: From One-on-One Chat to "Group Chat as a System"
> Subject: ClawSwarm — open-source multi-Agent orchestration for OpenClaw > Repo: https://github.com/1Panel-dev/ClawSwarm > License: GPL-3.0 > Author: 1Panel team (Chinese open-source org, formerly Fit2Cloud) > Analysis date: 2026-04-28
Key points
- Motivation: Mainstream AI frameworks (OpenAI Assistants API, Claude Code, AutoGPT, MetaGPT) are essentially serial pipelines. Many real tasks — architecture reviews, literature surveys, product discussions — need multiple roles debating simultaneously. ClawSwarm upgrades AI interaction to "group chat as a system": Agents share a workspace, converse, and argue, while humans observe, interject, or halt.
- Three-layer Hub-and-Spoke architecture: 1. Scheduler-Server: Python 3.10 / FastAPI / SQLAlchemy / SQLite backend. Handles message routing, session management (direct / group / agent_dialogue), task assignment with nested subtasks, and auth. 2. Web-Client: Vue 3 + TypeScript + Element Plus. Views for conversations, group chat, task kanban, and Agent-dialogue monitoring. 3. Channel Plugin: TypeScript OpenClaw plugin bridging a local OpenClaw Gateway to the central server within a restricted plugin runtime.
- @mention protocol as core routing innovation:
- Three modes:
DIRECT,GROUP_MENTION(only mentioned Agents receive),GROUP_BROADCAST(broadcast with a cap viamaxBroadcastAgents). - Routing chain: signature verification → JSON + Zod schema validation →
resolveRoute()→ mention extraction (explicit mentions preferred over regex) → aliasMap token-to-agent mapping → dedupe + truncation → async ACK, background dispatch. - Mention regex:
@([a-zA-Z0-9_-]{1,64})— far simpler and more flexible than a DAG workflow engine. - Group dispatch: per-Agent session keys for context isolation; per-Agent queues (serial within, parallel across) executed via
Promise.all; state machineDISPATCHED → RUNNING → COMPLETED/FAILEDlets the UI show which Agent is "thinking". - Agent Dialogue: exactly two Agents converse automatically under scheduler custody. Smart constraints — soft/hard message limits, time windows, and human observe/interrupt/pause/resume/stop — prevent the classic runaway loop where two LLMs endlessly agree with each other.
- Task system: modeled like GitHub Issues, not workflow steps. Tasks support priority, status, tags,
parent_task_idsubtask trees, timestamps, and an event timeline. Agents can proactively create subtasks, request clarification, or flag blockers. - Security: HMAC-SHA256 signature verification between server and plugin, nonce-based idempotency store, full message state tracking, and an explicit plugin allowlist (
plugins.allowmust listclawswarm; wildcard"*"unsupported). - Pragmatic stack: SQLite chosen for phase one (orchestration, not mass storage) with SQLAlchemy ORM allowing later PostgreSQL migration; Docker Compose one-command startup.
- Is multi-Agent orchestration cargo cult? Partly — many "multi-Agent systems" are the same LLM with different prompts called serially. ClawSwarm avoids this: each Agent binds to a distinct OpenClaw instance (different models/configs/skills), Agents communicate via message passing (real distributed-system semantics), and humans see full conversation history.
- Hub-and-Spoke limits: the scheduler is a single point of failure. Acceptable for phase one; future directions include scheduler clustering (Raft), P2P Agent links, and message buses (Redis/RabbitMQ).
- @mention protocol: sufficient for now; extendable with priority (
@dev:urgent), conditional triggers, voting, and exclusion syntax, all backward compatible. - Two-Agent limit in dialogue: a wise phase-one constraint (interaction complexity grows combinatorially; context windows are finite). Possible evolutions: layered pairwise consensus, rotating chairperson Agents, or topic sharding.
- Repo: https://github.com/1Panel-dev/ClawSwarm
- License: GPL-3.0
- Docker:
docker run -d --name=clawswarm -p 18080:18080 -v ~/.claw-team:/opt/clawswarm 1panel/clawswarm:latest - Default login: admin / admin123456
- Plugin install:
openclaw plugins install @1panel-dev/clawswarm - Backend: Python 3.10+, FastAPI, SQLAlchemy, SQLite, Uvicorn
- Frontend: Vue 3, Vite, TypeScript, Element Plus, Pinia
- Plugin: TypeScript, tsup, Zod, Undici
- Routing: DIRECT / GROUP_MENTION / GROUP_BROADCAST
Critical assessment (Feynman-style)
Significance for the OpenClaw ecosystem
OpenClaw is inherently one-to-one — a user and their AI assistant. ClawSwarm fills the ecosystem's biggest gap: a multi-Agent collaboration layer where users manage a team of assistants that discuss, debate, and divide work, with humans retaining control. It is an upgrade of interaction paradigm — from dialogue to collaboration, from Q&A to a system. The reviewer's verdict: solid code, clear architecture, sensible constraints — arguably the most viable path for OpenClaw evolving from "personal AI assistant" to "team AI collaborator."