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/proxy

2. Start the Proxy

1# Set your API keys
2export ANTHROPIC_API_KEY=your-key
3export OPENAI_API_KEY=your-key
4
5# Start the proxy
6npx relayplane start

The 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';
2
3const client = new Anthropic({
4 baseURL: 'http://localhost:3001/v1', // Point to RelayPlane
5});
6
7const response = await client.messages.create({
8 model: 'claude-3-5-sonnet',
9 max_tokens: 1024,
10 messages: [{ role: 'user', content: 'Hello!' }],
11});
12
13console.log(response.content);
Every request is now recorded in the Learning Ledger. View your runs at http://localhost:3001/dashboard

4. 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/explain
2
3# 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}

Next Steps