Skip to content

Commit 3f38343

Browse files
author
root
committed
docs: expand SKILL.md with comprehensive agent guidance
- Add MAX subscription warning - Add full setup instructions - Add routing modes table - Add supported providers - Add architecture diagram - Add REST endpoints - Add configuration examples - Add troubleshooting section
1 parent 8a20dd3 commit 3f38343

1 file changed

Lines changed: 114 additions & 36 deletions

File tree

skill/SKILL.md

Lines changed: 114 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
---
22
name: relayplane
3-
description: RelayPlane proxy control - stats, status, and routing mode management
3+
description: RelayPlane proxy - intelligent LLM routing that cuts costs 50-80%. Stats, status, and routing mode management.
44
user-invocable: true
5-
homepage: https://relayplane.com
6-
version: 1.2.0
7-
author: Continuum
5+
homepage: https://relayplane.com/integrations/openclaw
6+
version: 1.0.0
7+
author: RelayPlane
88
license: MIT
99
metadata: { "openclaw": { "emoji": "🚀", "category": "ai-tools", "requires": { "bins": ["node", "curl"] } } }
1010
---
1111

12-
# RelayPlane
12+
# RelayPlane Proxy
1313

1414
**100% Local. Zero Cloud. Full Control.**
1515

16-
Intelligent LLM gateway that routes requests to optimal models.
16+
Intelligent AI model routing that cuts costs by 50-80% while maintaining quality.
1717

18-
> ⚠️ **Cost Monitoring Required**
18+
> **⚠️ IMPORTANT: API Key Users Only**
19+
>
20+
> This is for standard API key users (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`).
21+
> **MAX subscription users should NOT use this** — MAX already gives unlimited usage, the proxy would just add complexity.
22+
23+
> **⚠️ Cost Monitoring Required**
1924
>
2025
> RelayPlane routes requests to LLM providers using your API keys. **This incurs real costs.**
21-
> Monitor usage through your provider's dashboard and use `/relayplane stats` to track requests.
26+
> Set up billing alerts with your providers and use `/relayplane stats` to track usage.
2227
2328
## Slash Commands
2429

@@ -29,52 +34,125 @@ Intelligent LLM gateway that routes requests to optimal models.
2934
| `/relayplane switch <mode>` | Change routing mode (auto\|cost\|fast\|quality) |
3035
| `/relayplane models` | List available routing models |
3136

32-
## Usage
37+
## Quick Start (Help Users Set This Up)
3338

34-
When user invokes `/relayplane <subcommand>`, run:
39+
### 1. Set API keys
40+
```bash
41+
export ANTHROPIC_API_KEY="sk-ant-..."
42+
export OPENAI_API_KEY="sk-..." # Optional
43+
```
44+
45+
### 2. Start the proxy
46+
```bash
47+
npx @relayplane/proxy --port 3001
48+
```
3549

50+
### 3. Point tools to proxy
3651
```bash
37-
node {baseDir}/relayplane.js <subcommand>
52+
export ANTHROPIC_BASE_URL=http://localhost:3001
53+
export OPENAI_BASE_URL=http://localhost:3001
54+
openclaw # or any tool
3855
```
3956

40-
Examples:
41-
- `/relayplane stats``node {baseDir}/relayplane.js stats`
42-
- `/relayplane status``node {baseDir}/relayplane.js status`
43-
- `/relayplane switch cost``node {baseDir}/relayplane.js switch cost`
57+
## Routing Modes
58+
59+
| Mode | Model Name | Description |
60+
|------|------------|-------------|
61+
| Auto | `relayplane:auto` | Smart routing - infers task, picks optimal model |
62+
| Cost | `relayplane:cost` | Always cheapest (Haiku) - maximum savings |
63+
| Fast | `relayplane:fast` | Lowest latency models |
64+
| Quality | `relayplane:quality` | Always best model (Opus) |
65+
66+
## Supported Providers
67+
68+
- **Anthropic:** Claude 3.5 Haiku, Sonnet 4, Opus 4.5
69+
- **OpenAI:** GPT-4o, GPT-4o-mini, o1, o3
70+
- **Google:** Gemini 2.0 Flash, Gemini Pro
71+
- **xAI:** Grok models
72+
- **Moonshot:** v1 (8k, 32k, 128k)
73+
74+
## How It Works
4475

45-
## REST Endpoints (Alternative)
76+
```
77+
User's Tool (OpenClaw, Cursor, etc.)
78+
79+
80+
RelayPlane Proxy (localhost:3001)
81+
├── Infers task type (code_review, analysis, etc.)
82+
├── Routes to optimal model (Haiku for simple, Opus for complex)
83+
├── Tracks outcomes for learning
84+
└── Streams response back
85+
86+
87+
Provider API (Anthropic, OpenAI, etc.)
88+
```
4689

47-
If the script isn't available, use curl:
90+
## REST Endpoints (For Script/Curl Access)
4891

4992
```bash
50-
# Stats
51-
curl -s http://127.0.0.1:3001/control/stats
93+
# Check status
94+
curl http://localhost:3001/control/status
95+
96+
# Get stats
97+
curl http://localhost:3001/control/stats
98+
99+
# Enable/disable routing
100+
curl -X POST http://localhost:3001/control/enable
101+
curl -X POST http://localhost:3001/control/disable
52102

53-
# Status
54-
curl -s http://127.0.0.1:3001/control/status
103+
# Update config
104+
curl -X POST http://localhost:3001/control/config \
105+
-H "Content-Type: application/json" \
106+
-d '{"routing": {"mode": "cascade"}}'
55107
```
56108

57-
## Quick Start
109+
## Configuration
110+
111+
Config file: `~/.relayplane/config.json` (hot-reloads on save)
112+
113+
```json
114+
{
115+
"enabled": true,
116+
"routing": {
117+
"mode": "cascade",
118+
"cascade": {
119+
"models": ["claude-3-haiku-20240307", "claude-3-5-sonnet-20241022", "claude-3-opus-20240229"],
120+
"escalateOn": "uncertainty",
121+
"maxEscalations": 1
122+
},
123+
"complexity": {
124+
"simple": "claude-3-haiku-20240307",
125+
"moderate": "claude-3-5-sonnet-20241022",
126+
"complex": "claude-3-opus-20240229"
127+
}
128+
}
129+
}
130+
```
131+
132+
## Data Storage
133+
134+
All data local: `~/.relayplane/data.db` (SQLite)
58135

59136
```bash
60-
# Set API keys
61-
export ANTHROPIC_API_KEY="sk-ant-..."
62-
export ANTHROPIC_BASE_URL=http://localhost:3001
137+
# Query routing history
138+
sqlite3 ~/.relayplane/data.db "SELECT model, task_type, COUNT(*) FROM runs GROUP BY model, task_type"
139+
```
63140

64-
# Start proxy
65-
npx @relayplane/proxy --port 3001
141+
## Troubleshooting
142+
143+
**Proxy not running?**
144+
```bash
145+
npx @relayplane/proxy --port 3001 -v
66146
```
67147

68-
## Routing Modes
148+
**Wrong model being used?**
149+
Check `ANTHROPIC_BASE_URL` is set to `http://localhost:3001`
69150

70-
| Mode | Description |
71-
|------|-------------|
72-
| `auto` | Cascade routing - starts cheap, escalates on uncertainty |
73-
| `cost` | Always use cheapest model |
74-
| `fast` | Prioritize lowest latency |
75-
| `quality` | Always use best model |
151+
**Want to bypass proxy temporarily?**
152+
Unset the BASE_URL or use `X-RelayPlane-Bypass: true` header
76153

77-
## More Info
154+
## Links
78155

79156
- [GitHub](https://github.com/RelayPlane/proxy)
80-
- [Documentation](https://relayplane.com/docs)
157+
- [Documentation](https://relayplane.com/integrations/openclaw)
158+
- [npm](https://www.npmjs.com/package/@relayplane/proxy)

0 commit comments

Comments
 (0)