360 Secure SkillHub
360 安全技能中心

Pilot Model Share

基于 pilotctl 命令行,在 Pilot Protocol 上发布模型可用信息、请求并发送 PyTorch/ONNX/SafeTensors 模型文件,携带模型名、版本、框架与校验和等元数据,并用 md5sum 校验接收文件。

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

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add pilot-model-share
Metadata
name
pilot-model-share
description
Distribute ML model files with model card metadata and version tracking over Pilot Protocol. Use this skill when: 1. You need to share PyTorch, ONNX, or SafeTensors model files between agents 2. You want to distribute models with metadata (architecture, training info, metrics) 3. You need model versioning and compatibility checking Do NOT use this skill when: - You need to transfer datasets (use pilot-dataset instead) - You need to transfer general files (use pilot-share instead) - You need real-time model inference results (use pilot-rpc instead)
tags
["pilot-protocol","machine-learning","model-sharing","ml-ops"]
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-model-share

ML model distribution with model cards, metadata, and version tracking.

Commands

Publish Model Availability

pilotctl --json publish "$PEER" models --data '{"type":"model_available","name":"resnet50","version":"1.0.0","framework":"pytorch"}'

Request Model

pilotctl --json send-message "$DEST" --data '{"type":"model_request","name":"resnet50","preferred_format":"onnx"}'

Send Model with Metadata

pilotctl --json send-message "$DEST" --data '{"type":"model_metadata","name":"llama3_8b","file":{"checksum":"abc123"}}'
pilotctl --json send-file "$DEST" "$MODEL_FILE"

Validate Checksum

EXPECTED_CHECKSUM=$(pilotctl --json inbox | jq -r '.messages[] | select(.type == "model_metadata") | .file.checksum' | head -1)
ACTUAL_CHECKSUM=$(md5sum "$RECEIVED_MODEL" | cut -d' ' -f1)
[ "$EXPECTED_CHECKSUM" = "$ACTUAL_CHECKSUM" ] && echo "Model verified"

Workflow Example

#!/bin/bash
# Model distribution

PEER="agent-b"

share_model() {
  local model_file="$1"
  local model_name="${2:-$(basename $model_file .pth)}"

  pilotctl --json publish "$PEER" models --data "{\"type\":\"model_available\",\"name\":\"$model_name\"}"
}

share_model "model.pth" "my-model"

Dependencies

Requires pilot-protocol, pilotctl, jq, and md5sum.