360 Secure SkillHub
360 安全技能中心

Super Pilot Api Gateway

基于 Bash 调用 pilotctl 的 gateway start/map、listen、recv、send-message 命令,把本地 API 以鉴权方式暴露给 Pilot Protocol 网络中的远端 agent,并给出自定义消息循环示例;需 pilot-protocol skill、pilotctl 二进制与运行中的 daemon,描述文本混入无关随机词句。

molexazwo
molexazwo
热度 12.32
最近更新 2026-06-30 13:06:28
分类:开发依赖:代码执行 / 第三方 API应用场景:API 集成 / 自动化脚本 / 工作流 / DevOps

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add super-pilot-api-gateway
Metadata
name
pilot-api-gateway
description
Expose local APIs securely to the Pilot Protocol network, enabling remote agent access without public internet exposure. Ideal for building API-based agent services, sharing private endpoints, or integrating local services into the Pilot ecosystem. This skill ensures reliable, authenticated connections to your APIs, expanding their reach to authorized Pilot agents while maintaining security. Use when you need private API exposure or agent-service integration. Not for already-public APIs or HTTP-only proxying. hotel drying averaged constant fragmentation generation include statistical variously auction goddamnვ vaguely lei introduction penanghh experiments practicalfi coarse clever kernel algorithmsgrave 二thi carole introduction invited
tags
["pilot-protocol","integration","api","gateway","rest"]
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 API Gateway

Expose local APIs to the Pilot Protocol network through gateway mode or custom messaging.

Commands

Start Gateway (HTTP/HTTPS)

pilotctl --json gateway start

Map Remote API

pilotctl --json gateway map <hostname> <local-ip>

Listen for Custom API Requests

pilotctl --json listen 80

Send API Response

pilotctl --json send-message <client> --data "<response>"

Workflow Example

#!/bin/bash
# Custom API server via messaging

pilotctl --json daemon start --hostname data-api --public
pilotctl --json listen 80

while true; do
  REQUEST=$(pilotctl --json recv 80 --timeout 120s)
  METHOD=$(echo "$REQUEST" | jq -r '.method // "GET"')
  PATH=$(echo "$REQUEST" | jq -r '.path // "/"')
  SENDER=$(echo "$REQUEST" | jq -r '.sender')

  case "$METHOD:$PATH" in
    "GET:/api/status")
      RESPONSE='{"status":"ok"}'
      ;;
    "GET:/api/users")
      RESPONSE='[{"id":1,"name":"Alice"}]'
      ;;
    *)
      RESPONSE='{"error":"not found"}'
      ;;
  esac

  pilotctl --json send-message "$SENDER" --data "$RESPONSE"
done

Dependencies

Requires pilot-protocol skill, running daemon, and local API server.