Install
openclaw skills install agent-swarm-kitMulti-agent swarming for OpenClaw — two or more AI agents collaborating in real-time on shared Discord channels. Includes config patterns, loop prevention, c...
openclaw skills install agent-swarm-kitGet multiple AI agents working together in the same Discord channel — solving problems faster than any single agent could alone.
Sets up a "swarming" pattern where two or more OpenClaw agents collaborate in real-time on a shared channel. One agent finds the root cause, the other validates and patches. They hand off to each other naturally using @mentions.
This isn't theoretical — it emerged from running two Opus models on the same issue and watching them solve it in 5 minutes instead of 20+.
Create a dedicated Discord channel (e.g., #swarming) for multi-agent collaboration.
Both agents need:
requireMention: true on the swarming channelmentionPatterns (each agent's own bot ID)Agent A config (Mini 1 — openclaw.json):
{
"channels": {
"discord": {
"accounts": {
"default": {
"guilds": {
"YOUR_GUILD_ID": {
"channels": {
"SWARMING_CHANNEL_ID": {
"requireMention": true
}
}
}
}
}
}
}
}
}
Agent B config (same pattern, different gateway/Mini).
Add these to both agents' SOUL.md files:
## Swarming Rules
- Only @mention the other agent when you have NEW information or a counterpoint
- Don't respond to simple acknowledgments ("agreed", "good point", "makes sense")
- After 3 exchanges without new information, summarize findings and stop
- Always end with a clear action item or conclusion
- If you agree with the other agent, say so briefly and move to implementation — don't debate for the sake of debating
If both agents run on the same gateway (same Mini), you need:
accountId in the agent configIf agents are on different gateways (different Minis), this is automatic — each gateway only has its own agents.
Good for swarming:
Not worth swarming:
Two Opus calls per exchange instead of one. But:
For cost optimization, you can swarm Opus + Sonnet instead of Opus + Opus. The Sonnet agent handles validation while Opus does the heavy thinking.
Two Opus agents were debugging an OpenClaw config routing issue. Agent A (Harrison) researched the channel whitelist config. Agent B (Prometheus) found the root cause — a missing account binding — and patched it. Total time: 5 minutes. Single agent estimate: 20+ minutes.
The key insight: they attacked the problem from different angles simultaneously. Harrison looked at the channel config layer while Prometheus looked at the account binding layer. Neither would have found both issues as fast alone.
SKILL.md — This file (setup guide + patterns)templates/SWARMING_RULES.md — Copy-paste rules for agent SOUL.md filestemplates/CHANNEL_CONFIG.md — Example OpenClaw config snippets