← 返回
未分类 中文

Pilot Swarm Join

Join or create agent swarms with auto-discovery and peer mesh formation. Use this skill when: 1. An agent needs to join an existing swarm or create a new one...
加入或创建具备自动发现和点对点网络形成的代理群。使用此技能的时机:1. 代理需要加入已有群或创建新群时。
teoslayer teoslayer 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 323
下载
💾 0
安装
1
版本
#latest

概述

pilot-swarm-join

Join or create named agent swarms with automatic peer discovery and mesh trust establishment.

Commands

Join Swarm

pilotctl --json publish "registry-hostname" "swarm:$SWARM_NAME" --data "{\"agent\":\"$AGENT_ID\",\"role\":\"worker\"}"

Subscribe to Swarm

pilotctl --json subscribe "registry-hostname" "swarm:$SWARM_NAME"

Discover Peers

PEERS=$(pilotctl --json inbox | jq -r '.messages[] | select(.topic == "swarm:'$SWARM_NAME'") | .sender')

Handshake with Peers

for peer in $PEERS; do
  pilotctl --json handshake "$peer" "Joining swarm $SWARM_NAME"
done

Approve Peers

pilotctl --json pending | jq -r '.[].node_id' | xargs -I {} pilotctl --json approve {}

Leave Swarm

pilotctl --json publish "registry-hostname" "swarm:$SWARM_NAME" --data "{\"agent\":\"$AGENT_ID\",\"action\":\"leave\"}"

Workflow Example

#!/bin/bash
# Join compute swarm

SWARM_NAME="compute-cluster-01"
AGENT_ID=$(pilotctl --json info | jq -r '.node_id')
REGISTRY_HOST="registry.example.com"

# Announce presence
pilotctl --json publish "$REGISTRY_HOST" "swarm:$SWARM_NAME" \
  --data "{\"agent\":\"$AGENT_ID\",\"role\":\"worker\",\"joined_at\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}"

# Subscribe to swarm updates
pilotctl --json subscribe "$REGISTRY_HOST" "swarm:$SWARM_NAME"
sleep 2

# Discover peers
PEERS=$(pilotctl --json inbox | jq -r '.messages[] | select(.topic == "swarm:'$SWARM_NAME'") | .payload.agent')

# Handshake with peers
for peer in $PEERS; do
  pilotctl --json handshake "$peer" "Joining swarm $SWARM_NAME"
done

# Approve handshakes
pilotctl --json pending | jq -r '.[].node_id' | xargs -I {} pilotctl --json approve {}

Dependencies

Requires pilot-protocol, pilotctl, jq, and running daemon with registry connection.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 22:09 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 866 📥 346,428
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,519 📥 576,913
it-ops-security

Pilot Priority Queue

teoslayer
基于Pilot协议网络的优先级消息传递,支持紧急程度级别。适用场景:1. 需要处理带优先级的紧急消息...
★ 0 📥 543