Files
aitbc/.windsurf/workflows/openclaw-cross-node-communication.md
aitbc 084dcdef31
Some checks failed
Security Scanning / security-scan (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
docs: update refactoring summary and mastery plan to reflect completion of all 11 atomic skills
- Mark Phase 2 as completed with all 11/11 atomic skills created
- Update skill counts: AITBC skills (6/6), OpenClaw skills (5/5)
- Move aitbc-node-coordinator and aitbc-analytics-analyzer from remaining to completed
- Update Phase 3 status from PLANNED to IN PROGRESS
- Add Gitea-based node synchronization documentation (replaces SCP)
- Clarify two-node architecture with same port (8006) on different I
2026-04-10 12:46:09 +02:00

4.5 KiB

description, title, version
description title version
OpenClaw specialized training workflow for agent-to-agent cross-node communication via AITBC blockchain OpenClaw Cross-Node Communication Training 1.0

OpenClaw Cross-Node Communication Training

Purpose

This specialized training module teaches OpenClaw agents how to establish, verify, and utilize cross-node communication channels over the AITBC blockchain network (between genesis node aitbc and follower node aitbc1).

Learning Objectives

  1. Agent Registration: Register OpenClaw agents on multiple distinct blockchain nodes.
  2. Peer Discovery: Discover agent endpoints and IDs across the blockchain state.
  3. Cross-Node Messaging: Send and receive secure messages via blockchain transactions.
  4. Task Coordination: Delegate AI tasks from a genesis-based agent to a follower-based agent.
  5. Event Monitoring: Subscribe to and parse blockchain events for incoming messages.

Prerequisites

  • Completed Stage 2 of the Mastery Plan
  • Both nodes synchronized and communicating on port 8006
  • Funded wallets on both nodes (openclaw-trainee and follower-ops)

Training Modules

Module 1: Cross-Node Agent Registration

Agents must be registered on the blockchain to receive messages.

# Genesis Node (aitbc: 10.1.223.40)
NODE_URL=http://10.1.223.40:8006 ./aitbc-cli agent create \
  --name "openclaw-genesis-commander" \
  --description "Primary coordinator agent on genesis node" \
  --verification full \
  --verbose

# Follower Node (aitbc1: <aitbc1-ip>)
NODE_URL=http://<aitbc1-ip>:8006 ./aitbc-cli agent create \
  --name "openclaw-follower-worker" \
  --description "Worker agent on follower node" \
  --verification full \
  --debug

Module 2: Cross-Node Messaging Protocol

Learn to format and transmit messages between the registered agents.

# Get follower agent ID
FOLLOWER_AGENT_ID=$(NODE_URL=http://<aitbc1-ip>:8006 ./aitbc-cli agent list --output json | jq -r '.[] | select(.name=="openclaw-follower-worker") | .id')

# Send instruction from genesis to follower
NODE_URL=http://10.1.223.40:8006 ./aitbc-cli agent message \
  --to $FOLLOWER_AGENT_ID \
  --content "{\"cmd\":\"STATUS_REPORT\",\"priority\":\"high\"}" \
  --verbose

Module 3: Message Retrieval and Parsing

The follower agent must listen for and decode messages.

# Retrieve messages on follower node
NODE_URL=http://<aitbc1-ip>:8006 ./aitbc-cli agent messages \
  --from openclaw-genesis-commander \
  --output json

# Acknowledge receipt (Follower -> Genesis)
GENESIS_AGENT_ID=$(NODE_URL=http://10.1.223.40:8006 ./aitbc-cli agent list --output json | jq -r '.[] | select(.name=="openclaw-genesis-commander") | .id')

NODE_URL=http://<aitbc1-ip>:8006 ./aitbc-cli agent message \
  --to $GENESIS_AGENT_ID \
  --content "{\"cmd\":\"ACK\",\"status\":\"READY\"}" \
  --debug

Module 4: Distributed Task Execution

Combine AI job submission with cross-node agent coordination.

# Genesis instructs Follower to execute AI Job
NODE_URL=http://10.1.223.40:8006 ./aitbc-cli agent message \
  --to $FOLLOWER_AGENT_ID \
  --content "{\"cmd\":\"EXECUTE_AI_JOB\",\"type\":\"inference\",\"prompt\":\"Analyze load\"}"

# Follower receives, executes locally, and returns result to Genesis
NODE_URL=http://<aitbc1-ip>:8006 ./aitbc-cli ai job submit \
  --type inference \
  --prompt "Analyze load" \
  --yes

NODE_URL=http://<aitbc1-ip>:8006 ./aitbc-cli agent message \
  --to $GENESIS_AGENT_ID \
  --content "{\"cmd\":\"JOB_COMPLETE\",\"result_id\":\"job_123\"}"

Automated Training Script

Execute the specialized training script to practice these operations autonomously.

Script Path: /opt/aitbc/scripts/training/openclaw_cross_node_comm.sh

# Run the interactive training
cd /opt/aitbc/scripts/training
./openclaw_cross_node_comm.sh

# Run in automated evaluation mode
./openclaw_cross_node_comm.sh --auto-eval

Success Validation

An OpenClaw agent has mastered cross-node communication when it can:

  1. Parse the local state to find remote agent IDs.
  2. Construct and broadcast a valid JSON payload in an agent message transaction.
  3. Automatically poll or listen for response messages on the remote node.
  4. Handle network latency or temporary sync delays gracefully using retry logic.
  5. Successfully complete a round-trip (Genesis -> Follower -> Genesis) message exchange within 60 seconds.