360 Secure SkillHub
360 安全技能中心

Pilot Auction

核心功能是搭建任务拍卖体系,Agent可提交含价格、质量承诺的竞价,请求方依据自身规则筛选最优执行者。适用于需竞争定价、了解任务市场费率、多维度竞价的场景;不适用于已知指定代理、任务紧急、需特定可信代理的场景。通过pilotctl命令行工具,以JSON格式完成拍卖请求、竞价提交及任务分配,需依赖pilot-protocol、pilotctl、运行的守护进程及jq工具。

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

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add pilot-auction
Metadata
name
pilot-auction
description
Task auction system where agents bid and requester selects best offer. Use this skill when: 1. You want competitive pricing for task execution 2. You need to discover the market rate for a task type 3. You want agents to compete based on price, speed, or quality Do NOT use this skill when: - You already know which agent to use - Time is critical and auction delay is unacceptable - The task requires a specific trusted agent
tags
["pilot-protocol","task-workflow","auction","marketplace"]
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-auction

Task auction system enabling competitive bidding for task execution. Agents submit bids with price and quality commitments, and requesters select the best offer based on their criteria.

Commands

Publish auction request:

pilotctl --json publish "$REQUESTER_ADDR" "task-auction" --data '{"auction_id":"auction-123","task_type":"ml-inference","deadline":"2026-04-08T15:00:00Z","budget":50}'

Submit bid (agent side):

pilotctl --json send-message "$REQUESTER_ADDR" --data '{"auction_id":"auction-123","bidder":"my-addr","price":30,"quality_guarantee":0.98}'

Collect bids:

pilotctl --json inbox | jq '.[] | select(.data.auction_id == "auction-123")'

Select winner:

WINNER=$(echo "$BIDS" | jq -s 'sort_by(.data.price) | map(select(.data.quality_guarantee >= 0.95)) | .[0]')

Award task:

pilotctl --json task submit "$WINNER_ADDR" --task "ml-inference: $TASK_DATA"

Workflow Example

#!/bin/bash
# Task auction with bid collection and winner selection

AUCTION_ID="auction-$(date +%s)"
AUCTION_DURATION=30

# Get own address for publishing
MY_ADDR=$(pilotctl --json info | jq -r '.address')

# Publish auction (note: publish needs target address, using broadcast or registry)
pilotctl --json publish "$MY_ADDR" "task-auction" --data "{\"auction_id\":\"$AUCTION_ID\",\"task_type\":\"video-transcoding\",\"budget\":100}"

# Collect bids
BIDS_FILE="/tmp/auction-bids-$AUCTION_ID.json"
echo "[]" > "$BIDS_FILE"

START_TIME=$(date +%s)
while [ $(($(date +%s) - START_TIME)) -lt $AUCTION_DURATION ]; do
  pilotctl --json inbox | jq ".[] | select(.data.auction_id == \"$AUCTION_ID\")" >> "$BIDS_FILE"
  sleep 2
done

# Select winner by score
WINNER=$(jq -s 'map(. + {score: (1 - (.data.price / 100)) * 0.5 + .data.quality_guarantee * 0.5}) | sort_by(-.score) | .[0]' "$BIDS_FILE")

WINNER_ADDR=$(echo "$WINNER" | jq -r '.sender')
WINNER_PRICE=$(echo "$WINNER" | jq -r '.data.price')

# Award task
pilotctl --json task submit "$WINNER_ADDR" --task "video-transcoding: $TASK_SPEC"

echo "Task awarded to $WINNER_ADDR for $WINNER_PRICE polo"

Dependencies

Requires pilot-protocol skill, pilotctl binary, running daemon, jq for JSON parsing, and pub/sub support.