← 返回
未分类 中文

Pilot Task Chain

Chain tasks into sequential pipelines across agents. Use this skill when: 1. You need multi-step workflows where each step depends on previous results 2. You...
将任务链接成跨代理的顺序管道。使用此技能的场景:1. 需要多步骤工作流,且每个步骤依赖前一步结果时 2. 需要...
teoslayer
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 338
下载
💾 0
安装
1
版本
#latest

概述

pilot-task-chain

Chain tasks into sequential pipelines where each step's output becomes the next step's input.

Commands

Submit first task

pilotctl --json task submit "$AGENT_1" --task "Fetch data from https://api.example.com/data"

Wait for completion

TASK_ID="abc123"
while true; do
  STATUS=$(pilotctl --json task list --type submitted | jq -r ".[] | select(.task_id == \"$TASK_ID\") | .status")
  [ "$STATUS" == "completed" ] && break
  sleep 2
done

Extract result and submit next task

RESULT=$(pilotctl --json task list --type submitted | jq -r ".[] | select(.task_id == \"$TASK_ID\") | .result")

pilotctl --json task submit "$AGENT_2" --task "Transform data: $RESULT"

Workflow Example

Three-step pipeline (Fetch -> Transform -> Store):

#!/bin/bash
# Step 1: Fetch
FETCH_TASK=$(pilotctl --json task submit "$FETCH_AGENT" \
  --task "Fetch data from API endpoint")
FETCH_TASK_ID=$(echo "$FETCH_TASK" | jq -r '.task_id')

while [ "$(pilotctl --json task list --type submitted | jq -r ".[] | select(.task_id == \"$FETCH_TASK_ID\") | .status")" != "completed" ]; do
  sleep 2
done

FETCH_RESULT=$(pilotctl --json task list --type submitted | jq -r ".[] | select(.task_id == \"$FETCH_TASK_ID\") | .result")

# Step 2: Transform
TRANSFORM_TASK=$(pilotctl --json task submit "$TRANSFORM_AGENT" \
  --task "Transform data: $FETCH_RESULT")
TRANSFORM_TASK_ID=$(echo "$TRANSFORM_TASK" | jq -r '.task_id')

while [ "$(pilotctl --json task list --type submitted | jq -r ".[] | select(.task_id == \"$TRANSFORM_TASK_ID\") | .status")" != "completed" ]; do
  sleep 2
done

TRANSFORM_RESULT=$(pilotctl --json task list --type submitted | jq -r ".[] | select(.task_id == \"$TRANSFORM_TASK_ID\") | .result")

# Step 3: Store
STORE_TASK=$(pilotctl --json task submit "$STORE_AGENT" \
  --task "Store data: $TRANSFORM_RESULT")

echo "Pipeline completed: $(echo "$STORE_TASK" | jq -r '.task_id')"

Dependencies

Requires pilot-protocol skill, jq, and multiple agents with complementary capabilities.

版本历史

共 1 个版本

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

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Pilot Priority Queue

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

Pilot Network Map

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

Pilot Api Gateway

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