crewswarm-openclaw-plugin
v1.0.0
Published
OpenClaw plugin — dispatch tasks to a local CrewSwarm multi-agent crew
Maintainers
Readme
CrewSwarm Plugin for OpenClaw
Connects your OpenClaw agents to a local CrewSwarm multi-agent crew.
Your OpenClaw agents gain three new tools — crewswarm_dispatch, crewswarm_status, and crewswarm_agents — plus a /crewswarm slash command and Gateway RPC methods. No LLM credentials are shared — only a single auth token.
What it does
| Surface | Description |
|---|---|
| crewswarm_dispatch | Agent tool — dispatch a task to any crew agent and block until done |
| crewswarm_status | Agent tool — poll status of a task by taskId |
| crewswarm_agents | Agent tool — list available agents |
| /crewswarm <agent> <task> | Slash command from any channel |
| crewswarm.dispatch | Gateway RPC |
| crewswarm.status | Gateway RPC |
| crewswarm.agents | Gateway RPC |
Requirements
- CrewSwarm running locally (
npm run restart-all) crew-leadreachable athttp://127.0.0.1:5010(default)- Your RT auth token from
~/.crewswarm/config.json → rt.authToken
Install
# From the CrewSwarm repo root:
openclaw plugins install ./contrib/openclaw-pluginOr link for development (no copy, reflects edits immediately):
openclaw plugins install -l ./contrib/openclaw-pluginThen restart the OpenClaw Gateway:
openclaw restartConfigure
Add to your openclaw.json:
{
"plugins": {
"entries": {
"crewswarm": {
"enabled": true,
"config": {
"url": "http://127.0.0.1:5010",
"token": "<your RT auth token>"
}
}
}
}
}Find your token:
cat ~/.crewswarm/config.json | python3 -c "import json,sys; print(json.load(sys.stdin)['rt']['authToken'])"Optional config:
| Key | Default | Description |
|---|---|---|
| url | http://127.0.0.1:5010 | crew-lead base URL |
| token | (required) | RT auth token |
| pollIntervalMs | 4000 | Status poll frequency |
| pollTimeoutMs | 300000 | Max wait time (5 min) |
Usage
From an OpenClaw agent conversation
Your OpenClaw agent will automatically call crewswarm_dispatch when it makes sense:
"Use crew-coder to write a login endpoint with JWT auth"
Or explicitly:
"Call crewswarm_dispatch with agent=crew-qa to audit my last change"
Slash command (any channel — Telegram, WhatsApp, etc.)
/crewswarm crew-coder write /tmp/hello.js — a 10-line express hello world
/crewswarm crew-qa audit the last PR changes
/crewswarm crew-pm create a roadmap for the auth feature
/crewswarm ← lists available agentsGateway RPC (from scripts or other tools)
# Dispatch
openclaw rpc crewswarm.dispatch '{"agent":"crew-copywriter","task":"Write a tagline for CrewSwarm"}'
# Poll status
openclaw rpc crewswarm.status '{"taskId":"<uuid>"}'
# List agents
openclaw rpc crewswarm.agentsDirect HTTP (no OpenClaw needed)
TOKEN="<your RT token>"
# List agents
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:5010/api/agents
# Dispatch
curl -X POST http://127.0.0.1:5010/api/dispatch \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent":"crew-coder","task":"write hello.js"}'
# Poll
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:5010/api/status/<taskId>Available agents (default crew)
| Agent | Role |
|---|---|
| crew-coder | Full-stack coding |
| crew-coder-front | Frontend specialist |
| crew-coder-back | Backend specialist |
| crew-frontend | UI/CSS polish |
| crew-qa | Testing & audit |
| crew-fixer | Bug fixing |
| crew-pm | Planning & roadmaps |
| crew-security | Security review |
| crew-copywriter | Writing & docs |
| crew-github | Git & PRs |
| crew-main | General purpose |
| crew-mega | Heavy reasoning tasks |
| crew-researcher | Web research |
| crew-architect | System design |
| crew-ml | ML/data tasks |
| crew-orchestrator | Wave orchestration |
| crew-seo | SEO optimization |
| crew-loco | Web search/fetch |
| crew-judge | Task evaluation |
| crew-telegram | Telegram integration |
| crew-whatsapp | WhatsApp integration |
How it works
OpenClaw agent
→ crewswarm_dispatch tool call
→ POST /api/dispatch (crew-lead HTTP, Bearer token)
→ RT WebSocket bus (port 18889)
→ target agent bridge (gateway-bridge.mjs)
→ LLM call (Mistral / Cerebras / DeepSeek / etc.)
→ tool execution (@@WRITE_FILE, @@RUN_CMD, etc.)
→ task.done event back on RT bus
→ crew-lead stores result
→ GET /api/status/:taskId (polled every 4s)
← result returned to OpenClaw agentNo LLM keys cross the boundary — CrewSwarm uses its own provider config. The only shared secret is the RT auth token.
Troubleshooting
"crew-lead unreachable" — run npm run restart-all in the CrewSwarm repo.
401 Unauthorized — token mismatch. Re-copy from ~/.crewswarm/config.json → rt.authToken.
Task never completes — check /tmp/crew-lead.log and the bridge log in /tmp/.
Agent not found — call crewswarm_agents to see the live agent list.
