Quickstart
Get observability, governance, and intelligent routing for your AI agents in 5 minutes.
What is RelayPlane?
RelayPlane is an Agent Ops platform that sits between your AI agents and LLM providers. Every request is:
- Recorded in the Learning Ledger with full context
- Evaluated against your policies (budgets, allowlists, approval gates)
- Routed to the best provider based on capabilities and cost
- Explained with human-readable decision chains
1. Install the Proxy
1npm install @relayplane/proxy2. Start the Proxy
1# Set your API keys2export ANTHROPIC_API_KEY=your-key3export OPENAI_API_KEY=your-key45# Start the proxy6npx relayplane startThe proxy starts on http://localhost:3001 by default.
3. Point Your Client at the Proxy
RelayPlane is OpenAI-compatible. Just change the base URL:
1import Anthropic from '@anthropic-ai/sdk';23const client = new Anthropic({4 baseURL: 'http://localhost:3001/v1', // Point to RelayPlane5});67const response = await client.messages.create({8 model: 'claude-3-5-sonnet',9 max_tokens: 1024,10 messages: [{ role: 'user', content: 'Hello!' }],11});1213console.log(response.content);Every request is now recorded in the Learning Ledger. View your runs at
http://localhost:3001/dashboard4. Add Context Headers
Add headers to identify your agents and sessions:
1const response = await client.messages.create({2 model: 'claude-3-5-sonnet',3 max_tokens: 1024,4 messages: [{ role: 'user', content: 'Hello!' }],5}, {6 headers: {7 'X-RelayPlane-Workspace': 'ws_production',8 'X-RelayPlane-Agent': 'support-bot',9 'X-RelayPlane-Session': 'session_abc123',10 },11});5. Understand Every Decision
Get a human-readable explanation of any run:
1curl http://localhost:3001/v1/runs/run_123/explain23# Returns:4{5 "run_id": "run_123",6 "narrative": "Request allowed. Used claude-3-5-sonnet via anthropic (primary choice). Cost: $0.015. Latency: 2.5s.",7 "timeline": [8 { "stage": "auth", "outcome": "passed", "detail": "API auth verified" },9 { "stage": "policy", "outcome": "passed", "detail": "Daily budget: $15/$50 used" },10 { "stage": "routing", "outcome": "selected", "detail": "Primary model available" },11 { "stage": "provider", "outcome": "success", "detail": "200 OK in 2.5s" }12 ]13}