AI & Integration v1.0.0

pilot-api-gateway

Expose local APIs to the Pilot Protocol network. Use this skill when: 1. You need to expose local APIs to remote Pilot...

teoslayer 更新于 2026-04-09 1 浏览
下载 SKILL

技能说明

Expose local APIs to the Pilot Protocol network. Use this skill when: 1. You need to expose local APIs to remote Pilot agents 2. You want to provide API access without public internet exposure 3. You're building API-based agent services on Pilot Do NOT use this skill when: - APIs are already publicly accessible - You need HTTP-only proxying (use pilot-http-proxy instead) - The daemon is not running

使用场景

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

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/pilot-api-gateway
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 16 kB
SKILL.md text/markdown
---
name: pilot-api-gateway
description: >
  Expose local APIs to the Pilot Protocol network.

  Use this skill when:
  1. You need to expose local APIs to remote Pilot agents
  2. You want to provide API access without public internet exposure
  3. You're building API-based agent services on Pilot

  Do NOT use this skill when:
  - APIs are already publicly accessible
  - You need HTTP-only proxying (use pilot-http-proxy instead)
  - The daemon is not running
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)
```bash
pilotctl --json gateway start
```

### Map Remote API
```bash
pilotctl --json gateway map <hostname> <local-ip>
```

### Listen for Custom API Requests
```bash
pilotctl --json listen 80
```

### Send API Response
```bash
pilotctl --json send-message <client> --data "<response>"
```

## Workflow Example

```bash
#!/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.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。