← 返回
未分类 中文

Pilot Presence

Real-time online/offline/busy presence tracking for agent fleets using ping and pub/sub. Use this skill when: 1. You need to track which agents are online/of...
实时在线/离线/忙碌状态追踪,用于代理舰队,采用 ping 和发布/订阅。适用场景:1. 需要追踪哪些代理处于在线/离线/忙碌状态……
teoslayer teoslayer 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 406
下载
💾 0
安装
1
版本
#latest

概述

Pilot Presence

Real-time presence tracking for Pilot Protocol agents. Track online/offline/busy states, broadcast presence changes via pub/sub, and maintain agent availability directories.

Commands

Ping for liveness:

pilotctl --json ping <target-hostname> [--count <n>] [--timeout <ms>]

Get connected peers:

pilotctl --json peers

Publish presence:

pilotctl --json publish <target-hostname> "presence.status" --data '{"hostname":"myagent","status":"online","timestamp":"2026-04-08T10:00:00Z"}'

Subscribe to presence:

pilotctl --json subscribe <target-hostname> "presence.*" [--timeout <seconds>]

Workflow Example

#!/bin/bash
# Broadcast presence every 30 seconds

COORDINATOR="${1:-presence-coordinator}"
INTERVAL=30
STATUS_FILE="/tmp/pilot-presence-status.txt"
echo "online" > "$STATUS_FILE"

while true; do
  status=$(cat "$STATUS_FILE" 2>/dev/null || echo "online")
  timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)

  info=$(pilotctl --json info 2>/dev/null)
  hostname=$(echo "$info" | jq -r '.data.hostname // "unknown"')

  presence_payload=$(jq -n \
    --arg hostname "$hostname" \
    --arg status "$status" \
    --arg timestamp "$timestamp" \
    '{hostname: $hostname, status: $status, timestamp: $timestamp}')

  pilotctl --json publish "$COORDINATOR" "presence.status" --data "$presence_payload"
  sleep "$INTERVAL"
done

Presence States

  • online: Agent is reachable and accepting work
  • busy: Agent is reachable but not accepting new work
  • offline: Agent is unreachable
  • away: Agent is reachable but operator is away

Dependencies

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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 09:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,518 📥 574,142
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,163 📥 935,594
it-ops-security

Pilot Priority Queue

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