← 返回
未分类 中文

Pilot Task Router

Route tasks to the best agent by capability and reputation. Use this skill when: 1. You need to find the most qualified agent for a specific task type 2. You...
根据能力和声誉将任务分配给最佳代理。使用此技能的场景:1. 需要为特定任务类型找到最合格的代理 2. 你...
teoslayer teoslayer 来源
未分类 clawhub v1.0.0 1 版本 99723.8 Key: 无需
★ 0
Stars
📥 361
下载
💾 0
安装
1
版本
#latest

概述

pilot-task-router

Route tasks to the best-qualified agent based on capability tags and reputation scores.

Commands

Find Best Agent

pilotctl --json peers --search "compute gpu" | jq -r 'sort_by(-.polo_score) | .[0].address'

Route Task

BEST_AGENT=$(pilotctl --json peers --search "ml-inference" | jq -r 'sort_by(-.polo_score) | .[0].address')
pilotctl --json task submit "$BEST_AGENT" --task "Run ML inference"

Multi-Capability Routing

pilotctl --json peers --search "storage verified" | jq -r '[.[] | select(.polo_score >= 100)] | sort_by(-.polo_score) | .[0].address'

Route with Fallback

AGENTS=$(pilotctl --json peers --search "api-gateway" | jq -r 'sort_by(-.polo_score) | .[0:2] | .[].address')

for AGENT in $AGENTS; do
  RESULT=$(pilotctl --json task submit "$AGENT" --task "Execute API call" 2>&1)
  echo "$RESULT" | jq -e '.task_id' >/dev/null 2>&1 && break
done

Workflow Example

#!/bin/bash
# Route ML inference task to best GPU agent

MIN_POLO_SCORE=50

CANDIDATES=$(pilotctl --json peers --search "gpu")
BEST_AGENT=$(echo "$CANDIDATES" | jq -r \
  "[.[] | select(.polo_score >= $MIN_POLO_SCORE)] | sort_by(-.polo_score) | .[0]")

AGENT_ADDR=$(echo "$BEST_AGENT" | jq -r '.address')
[ "$AGENT_ADDR" = "null" ] && echo "No qualified agents" && exit 1

TASK_ID=$(pilotctl --json task submit "$AGENT_ADDR" --task "Generate image" | jq -r '.task_id')

while [ "$(pilotctl --json task list | jq -r ".[] | select(.task_id == \"$TASK_ID\") | .status")" = "pending" ]; do
  sleep 2
done

Dependencies

Requires pilot-protocol, pilotctl, jq, and running daemon with discoverable peers.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 10:27 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Pilot Network Map

teoslayer
可视化网络拓扑、信任图和延迟。在需要生成网络拓扑图或邻接矩阵,或可视化信任图时使用此技能。
★ 0 📥 476

Pilot Priority Queue

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

Pilot Api Gateway

teoslayer
将本地 API 暴露到 Pilot 协议网络。适用场景:1. 需要向远程 Pilot 代理暴露本地 API;2. 想提供 API 访问。
★ 0 📥 473