Agent Team Mesh for Openclaw

A decentralized, broker-free P2P WebSocket mesh enabling direct, secure communication and orchestration between OpenClaw agents across containers and pods.

songhonglei
v1.0.0
Jun 20, 2026
1
401
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install agent-team-mesh

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install agent-team-mesh using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Agent Team Mesh?

Agent Team Mesh is a lightweight, broker-free peer-to-peer communication framework designed to link autonomous agents running across separate network containers, Kubernetes pods, or host environments. Built to expand the native capability stack of Openclaw Skills, this utility eliminates the need for central broker servers, shared cloud databases, or complex external message queues, facilitating direct client-to-server WebSocket communication between teammate agents.

By leveraging localized identity resolution, per-agent secure token storage, and a shared team registry, the mesh enables highly responsive multi-agent synchronization. Developers can seamlessly send point-to-point commands, verify agent online statuses, and execute wide-area broadcasts over a secure, private network, significantly streamlining cooperative workflows inside any AI-driven team deployment.

Agent Team Mesh Use Cases

  • Decentralized Team Collaboration: Empowering isolated agents running on separate developer pods to exchange context, code snippets, or task assignments directly.
  • Status Tracking & Pinging: Running automated checks to verify which peer agents are active and ready on the private network before launching complex multi-agent routines.
  • Direct Message & Wait Commands: Instructing a helper agent to run a remote microtask and wait synchronously for the payload response via high-speed WebSockets.
  • Team-wide Broadcasting: Pushing urgent system updates, API token changes, or priority tasks to all active nodes inside the private agent mesh.
  • Failover Routing: Automatically executing fallbacks to standard corporate communication channels if an agent is determined to be offline.

How Agent Team Mesh Works

  1. Local Identity Resolution: The mesh checks local environment variables (like MESH_MY_EMAIL), localized metadata in USER.md, or active SSO configuration files to verify the local machine's identity.
  2. Registry Lookup: Using a structured registry file, the system maps target teammate names to their current private IP addresses and hostnames.
  3. Token Handshake: The CLI accesses a secure, chmod-600 protected token store to retrieve the specific target agent's gateway authentication token.
  4. Direct WebSocket Connection: A secure direct WebSocket link is negotiated directly to the recipient gateway on port 18789, bypassing the need for central brokers.
  5. Message Size Verification: Outgoing payloads are evaluated against soft (4KB) and hard (8KB) limits to prevent buffer overruns or gateway crashes.
  6. Execution & Fallback: The message is processed, and if the target agent is unreachable, the execution pipeline triggers an optional integrated instant messaging script.

Agent Team Mesh Setup

1. Configure the Team Registry

Create your team network map in references/registry.json. Ensure the emailPrefix maps exactly to your team's local identity handles:

{
  "agents": [
    { "name": "Alice", "emailPrefix": "alice", "ip": "10.0.0.10", "hostname": "agent-alice-0" },
    { "name": "Bob",   "emailPrefix": "bob",   "ip": "10.0.0.11", "hostname": "agent-bob-0" }
  ]
}

2. Configure Gateway Access Tokens

Gather security tokens from peer gateways and save them into your configurations. This file must be kept strictly local and omitted from git history:

mkdir -p ~/.config/agent-team-mesh
cat <<EOF > ~/.config/agent-team-mesh/tokens.json
{
  "tokens": {
    "alice": "YOUR_ALICE_TOKEN",
    "bob": "YOUR_BOB_TOKEN"
  }
}
EOF
chmod 600 ~/.config/agent-team-mesh/tokens.json

3. Verify Identity and Connection

Use the built-in identity solver to verify that your environment setup is configured correctly:

./scripts/agent-mesh.sh whoami

Agent Team Mesh Data Schema & Taxonomy

File System and Directory Structure

The Agent Team Mesh organizes its configurations, scripts, and runtime references in a simple layout within Openclaw Skills workspace structures:

Path Purpose Format / Permissions
~/.config/agent-team-mesh/tokens.json Local repository of peer gateway tokens JSON / chmod 600 only
references/registry.json System map of names, IPs, and hostnames JSON
scripts/agent-mesh.sh Main orchestration and query CLI Bash executable

Network and Identity Schema

+-----------------------+
|      registry.json    | <---+ Local Identity Discovery:
|  - name               |     |  1. MESH_MY_EMAIL env var
|  - emailPrefix (key)  |     |  2. USER.md (email line)
|  - ip                 |     |  3. ~/sso.json (SSO field)
|  - hostname           |     +----------------------------
+-----------------------+

Agent Team Mesh Advanced Features

  • Automated SSO & Identity Fallbacks: Resolves local machine identities dynamically using a three-tier lookup cascading from system environment variables down to active SSO session credentials.
  • Granular Message Guardrails: Enforces configurable payload safety parameters with soft warnings at 4KB and absolute execution blocks at 8KB to keep the direct mesh responsive.
  • Preview and Dry-Run Modes: Includes full preview switches for both singular sending and broadcast routines, allowing you to trace transmission target paths before emitting packets.
  • Custom Fallback Hooks: Supports integration with external IM platforms via an isolated shell hook variable (MESH_IM_FALLBACK) when physical agent terminals are offline.
  • Zero-Broker Architecture: Built explicitly for highly restricted corporate VPCs, enabling peer-to-peer routing with no cloud reliance, ideal for scaling advanced setups in Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*