alphabetc1/clawverse

โ˜… 0Forks 0TypeScriptGitHub โ†—Compare

README

ClawVerse

๐Ÿฆž Multi-Instance OpenClaw Orchestration Platform
Manage, route, and sync your distributed AI assistants

็ฎ€ไฝ“ไธญๆ–‡ | English

platform language runtime license


๐Ÿ—๏ธ Architecture

ClawVerse enables hierarchical OpenClaw clusters where one OpenClaw can manage multiple OpenClaws, forming scalable tree structures:

                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚   ClawVerse     โ”‚
                              โ”‚      Hub        โ”‚
                              โ”‚  (Control Plane)โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                       โ”‚
           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
           โ”‚                           โ”‚                           โ”‚
           โ–ผ                           โ–ผ                           โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  OpenClaw   โ”‚             โ”‚  OpenClaw   โ”‚             โ”‚  OpenClaw   โ”‚
    โ”‚   Master    โ”‚             โ”‚   Master    โ”‚             โ”‚   Master    โ”‚
    โ”‚  (Region A) โ”‚             โ”‚  (Region B) โ”‚             โ”‚  (Region C) โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚                           โ”‚
     โ”Œโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”               โ”Œโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”
     โ”‚           โ”‚               โ”‚           โ”‚
     โ–ผ           โ–ผ               โ–ผ           โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚OpenClaw โ”‚ โ”‚OpenClaw โ”‚    โ”‚OpenClaw โ”‚ โ”‚OpenClaw โ”‚
โ”‚ Worker  โ”‚ โ”‚ Worker  โ”‚    โ”‚ Worker  โ”‚ โ”‚ Worker  โ”‚
โ”‚  A-1    โ”‚ โ”‚  A-2    โ”‚    โ”‚  B-1    โ”‚ โ”‚  B-2    โ”‚
โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜
     โ”‚                                      โ”‚
     โ–ผ                                      โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚OpenClaw โ”‚  โ† Multi-level nesting     โ”‚OpenClaw โ”‚
โ”‚  A-1-1  โ”‚                            โ”‚  B-2-1  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Key Features

Feature Description
๐ŸŒณ Topology Management Define flat or tree relationships between OpenClaw instances
๐Ÿ”€ Smart Routing Route messages based on channel, labels, or custom rules
๐Ÿ”„ Data Synchronization Sync memory, sessions, and skills across all nodes
โฌ†๏ธ Task Escalation Auto-escalate unhandled tasks to parent nodes
โฌ‡๏ธ Task Delegation Delegate sub-tasks from parent to child nodes
๐ŸŒ Node Registry Register, monitor, and health-check multiple instances
๐Ÿ“ฑ Full Channel Support All OpenClaw native channels + DingTalk, Feishu, WeCom

๐Ÿš€ Quick Start

Prerequisites

1. Install ClawVerse

git clone https://github.com/nicepkg/clawverse.git
cd clawverse
pnpm install && pnpm build

2. Start OpenClaw Gateways

On each machine running OpenClaw:

# Configure channels (same as standalone OpenClaw)
openclaw channels add imessage   # or discord, telegram, etc.

# Start gateway for ClawVerse to connect
openclaw gateway start --port 18789

3. Configure ClawVerse

mkdir -p ~/.clawverse
cp clawverse.example.json ~/.clawverse/clawverse.json

Edit ~/.clawverse/clawverse.json:

{
  "nodes": {
    "main": { "url": "ws://192.168.1.10:18789", "token": "xxx" },
    "worker": { "url": "ws://192.168.1.20:18789", "token": "xxx" }
  },
  "topology": {
    "type": "tree",
    "root": "main",
    "children": { "main": ["worker"] }
  },
  "routing": { "default": "main" },
  "sync": { "enabled": true }
}

4. Start Hub

pnpm dev    # Development mode
pnpm start  # Production mode

5. Verify

pnpm clawverse status  # Check hub status
pnpm clawverse nodes   # List all nodes

๐Ÿ”Œ Channel Support

ClawVerse orchestrates OpenClaw instances, not re-implements channels.

Native Channels (via OpenClaw)

Configure on OpenClaw nodes using standard openclaw commands:

openclaw channels add imessage
openclaw channels add whatsapp
openclaw channels add discord
openclaw channels add telegram
# ... etc

Extended Channels (via Bridge)

For channels not natively supported by OpenClaw, use bridges that connect to the Hub's HTTP API:

Channel Bridge Port Hub Endpoint
๐Ÿ”ท DingTalk bridges/dingtalk 3001 POST /api/agent
๐Ÿ”ถ Feishu bridges/feishu 3002 POST /api/agent
๐ŸŸข WeCom bridges/wecom 3003 POST /api/agent
cd bridges/dingtalk
export DINGTALK_OUTGOING_TOKEN=xxx
export CLAWVERSE_HUB_URL=http://localhost:18801  # HTTP API port
pnpm standalone

HTTP API Endpoints:

POST /api/agent         # Receive channel messages, route to OpenClaw
GET  /api/health        # Health check
GET  /api/status        # Hub status with all nodes
GET  /api/nodes         # List registered nodes
POST /api/routing/test  # Test routing rules

๐Ÿ“– Usage Examples

Multi-Device Sync (Flat Topology)

{
  "nodes": {
    "desktop": { "url": "ws://192.168.1.10:18789" },
    "laptop": { "url": "ws://192.168.1.20:18789" },
    "server": { "url": "ws://192.168.1.30:18789" }
  },
  "topology": { "type": "flat" },
  "sync": { "enabled": true, "scope": { "memory": true, "sessions": true } }
}

Task Distribution (Tree Topology)

{
  "nodes": {
    "main": { "url": "ws://main:18789", "labels": ["primary"] },
    "dingtalk-worker": { "url": "ws://worker1:18789", "labels": ["dingtalk"] }
  },
  "topology": {
    "type": "tree",
    "root": "main",
    "children": { "main": ["dingtalk-worker"] }
  },
  "routing": {
    "default": "main",
    "rules": [{ "match": { "channel": "dingtalk" }, "target": "dingtalk-worker" }],
    "escalation": { "enabled": true }
  }
}

๐Ÿ–ฅ๏ธ CLI Reference

Command Description
clawverse status Show hub status
clawverse nodes List all nodes
clawverse nodes get <id> Get node details
clawverse config Show configuration
clawverse send -n <node> -m <msg> Send message to node

๐Ÿ“ Project Structure

clawverse/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ hub/          # Central control plane
โ”‚   โ””โ”€โ”€ cli/          # Command-line interface
โ”œโ”€โ”€ bridges/
โ”‚   โ”œโ”€โ”€ common/       # Shared utilities
โ”‚   โ”œโ”€โ”€ dingtalk/     # DingTalk bridge
โ”‚   โ”œโ”€โ”€ feishu/       # Feishu bridge
โ”‚   โ””โ”€โ”€ wecom/        # WeCom bridge
โ””โ”€โ”€ docs/

๐Ÿ“„ License

Apache License 2.0

Copyright ยฉ ClawVerse Contributors

Contributors

alphabetc1

Issues