Install
openclaw skills install multi-agent-architectureArchitecture guide for running multiple specialized AI agents on a single OpenClaw server. Covers workspace isolation, agent roles, shared memory, Telegram r...
openclaw skills install multi-agent-architecture┌─────────────────────────────────────────────────┐
│ OpenClaw Gateway │
│ (single process, multiple agents) │
├──────────┬──────────┬──────────┬────────────────┤
│ Agent 1 │ Agent 2 │ Agent 3 │ Agent N │
│ (main) │ (ops) │ (trade) │ (custom) │
├──────────┼──────────┼──────────┼────────────────┤
│workspace │workspace │workspace │ workspace │
│ │ -ops │ -trade │ -custom │
├──────────┴──────────┴──────────┴────────────────┤
│ Shared Infrastructure │
│ (Docker, monitoring, LightRAG, backups) │
└─────────────────────────────────────────────────┘
| Agent | Role | Bot | Workspace |
|---|---|---|---|
| Main | Coordination | @main_bot | workspace |
| Ops | Monitoring | @ops_bot | workspace-ops |
| Security | Audits | @sec_bot | workspace-security |
mkdir -p ~/.openclaw/workspace-ops/{skills,memory,scripts,state}
mkdir -p ~/.openclaw/workspace-security/{skills,memory,scripts,state}
{
"agents": {
"main": {
"name": "Main",
"model": "anthropic/claude-sonnet-4-6",
"workspace": "workspace",
"channels": { "telegram": { "botToken": "TOKEN_1" } }
},
"ops": {
"name": "Ops",
"model": "anthropic/claude-sonnet-4-6",
"workspace": "workspace-ops",
"channels": { "telegram": { "botToken": "TOKEN_2" } }
}
}
}
Keep each AGENTS.md under 5KB. Every byte loads into context every message. Smaller = cheaper.
ln -s ~/.openclaw/workspace/skills/self-improving \
~/.openclaw/workspace-ops/skills/self-improving
Share utilities. Don't share specialized skills.
Split agents across 2+ Claude subscriptions:
{
"auth-profiles": {
"primary": { "token": "TOKEN_A" },
"secondary": { "token": "TOKEN_B" }
}
}
Option A: Separate bots (recommended) — one bot per agent, cleanest.
Option B: Forum topics — one supergroup, each topic routes to a different agent.
Option C: Commands — /ops check disk → ops agent, everything else → main.
Each agent has a HEARTBEAT.md — minimal checks, alert only on problems.
#!/bin/bash
if ! openclaw gateway status | grep -q "running"; then
openclaw gateway restart
fi
for svc in langfuse n8n lightrag; do
if docker compose -f ~/docker/$svc/docker-compose.yml ps | grep -q "Exit"; then
docker compose -f ~/docker/$svc/docker-compose.yml restart
fi
done
Track last response time per agent. Silent > 15 min → alert.
Three-tier architecture:
See lightrag-knowledge-base skill for deep memory setup.
Back up daily: openclaw.json, auth-profiles, all MEMORY.md, all memory/ dirs. Back up weekly: skills/, scripts/, docker configs. Keep 7 days. Automate via cron.