🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Pilot Multi Region Content Sync Setup

by @teoslayer

Deploy a multi-region content distribution system with 4 agents. Use this skill when: 1. User wants to sync content across geographic regions 2. User is conf...

Versionv1.0.0
Downloads311
TERMINAL
clawhub install pilot-multi-region-content-sync-setup

πŸ“– About This Skill


name: pilot-multi-region-content-sync-setup description: > Deploy a multi-region content distribution system with 4 agents.

Use this skill when: 1. User wants to sync content across geographic regions 2. User is configuring an origin or edge node for content distribution 3. User asks about CDN-like content replication between agents

Do NOT use this skill when: - User wants to sync a single file (use pilot-sync instead) - User wants a one-shot file transfer (use pilot-share instead) tags: - pilot-protocol - setup - content-sync - multi-region license: AGPL-3.0 metadata: author: vulture-labs version: "1.0" openclaw: requires: bins: - pilotctl - clawhub homepage: https://pilotprotocol.network allowed-tools: - Bash


Multi-Region Content Sync Setup

Deploy 4 agents: 1 origin + 3 regional edge nodes for content distribution.

Roles

| Role | Hostname | Skills | Purpose | |------|----------|--------|---------| | origin | -origin | pilot-sync, pilot-share, pilot-broadcast, pilot-heartbeat-monitor | Source of truth, broadcasts updates | | edge-us | -edge-us | pilot-sync, pilot-share, pilot-health, pilot-heartbeat-monitor | US regional edge | | edge-eu | -edge-eu | pilot-sync, pilot-share, pilot-health, pilot-heartbeat-monitor | EU regional edge | | edge-asia | -edge-asia | pilot-sync, pilot-share, pilot-health, pilot-heartbeat-monitor | Asia regional edge |

Setup Procedure

Step 1: Ask the user which role this agent should play and what prefix to use.

Step 2: Install the skills for the chosen role:

# For origin:
clawhub install pilot-sync pilot-share pilot-broadcast pilot-heartbeat-monitor

For any edge node:

clawhub install pilot-sync pilot-share pilot-health pilot-heartbeat-monitor

Step 3: Set the hostname:

pilotctl --json set-hostname -

Step 4: Write the role-specific JSON manifest to ~/.pilot/setups/multi-region-content-sync.json.

Step 5: Tell the user to initiate handshakes.

Manifest Templates Per Role

origin

{
  "setup": "multi-region-content-sync", "role": "origin", "role_name": "Content Origin",
  "hostname": "-origin",
  "description": "Source of truth for all content. Broadcasts updates to all edge nodes.",
  "skills": {
    "pilot-sync": "Push content changes to all edge nodes.",
    "pilot-share": "Transfer new content files to edges.",
    "pilot-broadcast": "Broadcast content-update events to all edges simultaneously.",
    "pilot-heartbeat-monitor": "Track heartbeats from all edges, alert when a region goes dark."
  },
  "peers": [
    { "role": "edge-us", "hostname": "-edge-us", "description": "US regional edge node" },
    { "role": "edge-eu", "hostname": "-edge-eu", "description": "EU regional edge node" },
    { "role": "edge-asia", "hostname": "-edge-asia", "description": "Asia regional edge node" }
  ],
  "data_flows": [
    { "direction": "send", "peer": "-edge-us", "port": 1001, "topic": "content-update", "description": "Content updates" },
    { "direction": "send", "peer": "-edge-eu", "port": 1001, "topic": "content-update", "description": "Content updates" },
    { "direction": "send", "peer": "-edge-asia", "port": 1001, "topic": "content-update", "description": "Content updates" },
    { "direction": "receive", "peer": "-edge-us", "port": 1002, "topic": "heartbeat", "description": "Health heartbeats" },
    { "direction": "receive", "peer": "-edge-eu", "port": 1002, "topic": "heartbeat", "description": "Health heartbeats" },
    { "direction": "receive", "peer": "-edge-asia", "port": 1002, "topic": "heartbeat", "description": "Health heartbeats" }
  ],
  "handshakes_needed": ["-edge-us", "-edge-eu", "-edge-asia"]
}

edge-us / edge-eu / edge-asia

{
  "setup": "multi-region-content-sync", "role": "edge-", "role_name": " Edge Node",
  "hostname": "-edge-",
  "description": "Serves content for the  region. Syncs from origin and reports health.",
  "skills": {
    "pilot-sync": "Pull content updates from origin.",
    "pilot-share": "Receive content files from origin.",
    "pilot-health": "Monitor local health and sync status.",
    "pilot-heartbeat-monitor": "Send periodic heartbeats to origin."
  },
  "peers": [{ "role": "origin", "hostname": "-origin", "description": "Content source β€” receives updates from here" }],
  "data_flows": [
    { "direction": "receive", "peer": "-origin", "port": 1001, "topic": "content-update", "description": "Content updates" },
    { "direction": "send", "peer": "-origin", "port": 1002, "topic": "heartbeat", "description": "Health heartbeats" }
  ],
  "handshakes_needed": ["-origin"]
}

Data Flows

  • origin β†’ edge-* : content updates (port 1001)
  • edge-* β†’ origin : heartbeat and sync confirmation (port 1002)
  • Workflow Example

    # On origin β€” broadcast content:
    pilotctl --json send-file -edge-us ./content/index.html
    pilotctl --json publish -edge-us content-update '{"file":"index.html","version":42}'
    

    On edge β€” confirm and heartbeat:

    pilotctl --json publish -origin sync-complete '{"region":"us","version":42}' pilotctl --json publish -origin heartbeat '{"region":"us","status":"healthy"}'

    Dependencies

    Requires pilot-protocol skill, pilotctl binary, clawhub binary, and a running daemon.