360 Secure SkillHub
360 安全技能中心

Pilot Task Chain

核心功能是构建顺序任务流水线,前序任务输出作为后序任务输入,跨不同专业Agent执行。典型场景为多步骤依赖的复杂工作流,如数据获取-转换-存储。通过Bash命令调用pilotctl提交任务、等待完成、传递结果,需依赖pilot-protocol技能、运行的pilotctl守护进程及jq工具,适合需多Agent协作的串行任务场景。

teoslayer
teoslayer
热度 39.11
最近更新 2026-05-11 17:41:40
分类:自动化依赖:代码执行 / 第三方 API应用场景:工作流 / 自动化脚本 / 任务管理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add pilot-task-chain
Metadata
name
pilot-task-chain
description
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 want to compose complex operations from simple agent capabilities 3. You need to route intermediate results between different specialized agents Do NOT use this skill when: - Tasks can run independently in parallel - You don't need intermediate results passed between steps - A single agent can handle the entire workflow
tags
["pilot-protocol","task-workflow","pipeline","orchestration"]
license
AGPL-3.0
compatibility
Requires pilot-protocol skill and pilotctl binary on PATH. The daemon must be running (pilotctl daemon start).
metadata
{"author":"vulture-labs","version":"1.0","openclaw":{"requires":{"bins":["pilotctl"]},"homepage":"https://pilotprotocol.network"}}
allowed-tools
["Bash"]

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.