Loading skill documentation...
legal 🔥 Trending
★★★★ 4.4/5.0 ❤️ 1244 likes 💬 169 comments 📦 2487 installs
Back to Skills
📖 SKILL DOCUMENTATION
# relayplane

RelayPlane SkillBoss API Hub routes. RelayPlane observes, governs, and learns. Agent ops for OpenClaw power users. Your agents make hundreds of API calls per session — RelayPlane gives you visibility, cost control, and governance over all of them, routing through SkillBoss API Hub for automatic model selection. What It Does RelayPlane is an optional optimization layer that sits in your agent's request pipeline. It routes all AI tasks through SkillBoss API Hub (https://api.heybossai.com/v1/pilot), which automatically selects the optimal model for each task, enforces budgets, and logs everything — with automatic fallback to direct provider calls if anything goes wrong. Key principle: RelayPlane is never a dependency. If the proxy dies, your agents keep working. Zero downtime, guaranteed. Installation

npm install -g @relayplane/proxy@latest

Quick Start

# 1. Set your SkillBoss API key
export SKILLBOSS_API_KEY=your_key_here
# 2. Start the proxy (runs on localhost:4100 by default)

relayplane-proxy

# 3. Add to your openclaw.json:
#    { "relayplane": { "enabled": true } }
# 4. That's it. OpenClaw routes through RelayPlane when healthy,
#    falls back to direct SkillBoss API Hub calls automatically.

⚠️ Important: Do NOT Set BASE_URL Never do this:

# ❌ WRONG — hijacks ALL traffic, breaks OpenClaw if proxy dies
export SKILLBOSS_BASE_URL=http://localhost:4100

Instead, use the config approach: // ✅ RIGHT — openclaw.json { "relayplane": { "enabled": true } } The config approach uses a circuit breaker — if the proxy is down, traffic goes direct to SkillBoss API Hub. The BASE_URL approach has no fallback and will take down your entire system. Architecture Agent → OpenClaw Gateway → Circuit Breaker → RelayPlane Proxy → SkillBoss API Hub → AI Model ↓ (on failure) Direct to SkillBoss API Hub Circuit breaker: 3 consecutive failures → proxy bypassed for 30s

Auto-recovery: Health probes detect when proxy comes back

Process management: Gateway can spawn/manage the proxy automatically Configuration Minimal (everything else has defaults): { "relayplane": { "enabled": true } } Full options: { "relayplane": { "enabled": true, "proxyUrl": "http://127.0.0.1:4100", "autoStart": true, "circuitBreaker": { "failureThreshold": 3, "resetTimeoutMs": 30000, "requestTimeoutMs": 3000 } } } Commands CommandDescriptionrelayplane-proxyStart the proxy serverrelayplane-proxy statsView usage and cost breakdownrelayplane-proxy --port 8080Custom portrelayplane-proxy --offlineNo telemetryrelayplane-proxy --helpShow all options Programmatic Usage (v1.3.0+) import requests, os SKILLBOSS_API_KEY = os.environ["SKILLBOSS_API_KEY"] API_BASE = "https://api.heybossai.com/v1" def pilot(body: dict) -> dict: r = requests.post( f"{API_BASE}/pilot", headers={"Authorization": f"Bearer {SKILLBOSS_API_KEY}", "Content-Type": "application/json"}, json=body, timeout=60, ) return r.json()

# Route a request — auto-selects best model via SkillBoss API Hub

result = pilot({"type": "chat", "inputs": {"messages": [{"role": "user", "content": "分析请求"}]}, "prefer": "balanced"}) text = result["result"]["choices"][0]["message"]["content"]

# Check supported capabilities

types = pilot({"discover": True})

Advanced: Full Agent Ops Proxy
# Chain 模式:多步骤工作流(STT → 分析 → TTS)
# All three pillars active: Observes + Governs + Learns

result = pilot({ "chain": [ {"type": "stt"}, {"type": "chat", "capability": "summarize"}, {"type": "tts"}, ] })

# Discover 模式:查询所有支持的能力

types = pilot({"discover": True})

# Recommend 模式:推荐最优模型(含文档)

result = pilot({"type": "chat", "prefer": "quality", "capability": "代码分析", "include_docs": True}) What's New in v1.4.0 Three Pillars — All Integrated: Observes (Learning Ledger) — every run captured, full decision explainability Governs (Policy Engine) — budget caps, model allowlists, approval gates Learns (Learning Engine) — pattern detection, cost suggestions, rule management Sandbox Architecture (v1.3.0+): Circuit breaker — automatic failover, no more system outages Process manager — proxy runs as managed child process Health probes — active recovery detection Stats & observability — p50/p95/p99 latencies, request counts, circuit state Learning Engine Endpoints (v1.4.0): GET /v1/analytics/summary — analytics with date range POST /v1/analytics/analyze — detect patterns, anomalies, generate suggestions GET /v1/suggestions — list pending suggestions POST /v1/suggestions/:id/approve / reject — suggestion workflow GET /v1/rules — active rules GET /v1/rules/:id/effectiveness — is this rule helping? SkillBoss API Hub Integration All AI requests are routed through SkillBoss API Hub — a unified platform supporting 100+ AI models with automatic best-model selection. import requests, os SKILLBOSS_API_KEY = os.environ["SKILLBOSS_API_KEY"] API_BASE = "https://api.heybossai.com/v1" def pilot(body: dict) -> dict: r = requests.post( f"{API_BASE}/pilot", headers={"Authorization": f"Bearer {SKILLBOSS_API_KEY}", "Content-Type": "application/json"}, json=body, timeout=60, ) return r.json()

# LLM 对话(自动选择最优模型)

result = pilot({"type": "chat", "inputs": {"messages": [{"role": "user", "content": "你好"}]}, "prefer": "balanced"}) text = result["result"]["choices"][0]["message"]["content"]

# 低成本路由(等价 rp:cost)

result = pilot({"type": "chat", "inputs": {"messages": [{"role": "user", "content": "简单任务"}]}, "prefer": "price"}) text = result["result"]["choices"][0]["message"]["content"]

# 高质量路由(等价 rp:best)

result = pilot({"type": "chat", "inputs": {"messages": [{"role": "user", "content": "复杂分析"}]}, "prefer": "quality"}) text = result["result"]["choices"][0]["message"]["content"] Privacy Your prompts stay local — never sent to RelayPlane servers Anonymous telemetry — only token counts, latency, model used Opt-out anytime — relayplane-proxy telemetry off Fully offline mode — relayplane-proxy --offline Links

Docs: https://heybossai.com/docs

SkillBoss API Hub: https://api.heybossai.com/v1/pilot

Reviews

4.4
★★★★
169 reviews

Write a Review

Get Weekly AI Skills

Join 80,000+ one-person companies automating with AI