R
Relay
Production Ready Caching Proxy

LLM Caching & Cost-Savings
Infrastructure for Agents

A transparent, high-performance API proxy that sits between your code/agents and any LLM backend (OpenAI, Anthropic, Gemini, Azure, Ollama). Save up to 90% on metered token costs and drop request latencies to single-digit milliseconds.

Experience Caching in Real Time

Click the simulation buttons below to trigger actual mocked request cycles and see how Relay's caching drop request times and metrics in real time.

Simulate Requests

Trigger requests to see how Relay behaves on cache misses, exact cache hits, and concurrent deduplications.

relay-proxy-console
[info] Relay Proxy CLI initialized. Awaiting requests...
$

Live Caching Metrics Dashboard

Relay Proxy Active
Total Requests
12,845
Cache Hit Rate
76.4%
Credits Saved
19,628,000
Estimated Savings
$392.56

Designed for Agents and Production Scale

A robust feature set built to optimize multi-agent loops and production services.

🔒

Encrypted Caching

Optionally encrypt cache entries locally using AES-256 with automatically generated or custom runtime keys. Safeguard prompts and system credentials.

Deduplication Engine

Consolidates concurrent in-flight requests requesting identical prompts. Serves all waiting duplicate request streams simultaneously from a single upstream network call.

🧠

Fuzzy Matching (Opt-in)

Sophisticated word-level edit-distance similarity comparison. Reuses responses for minor spacing or typos differences, governed by an automated rapid-edit kill switch.

📊

Token Budgets

Establish strict daily token limits per user or API key. Prevents runaway recursive agent loops from draining upstream provider credits.

🌐

Provider Agnostic

Acts as an OpenAI-compatible endpoint. Out-of-the-box support for OpenAI, Anthropic (Claude Code / Claude CLI), Gemini wire format, Azure OpenAI, and local Ollama/vLLM.

🐋

Daemon CLI & Container

Control background daemons directly via CLI commands or mount the proxy container alongside your docker application with automated configuration backups.

Getting Started in 2 Minutes

Start saving tokens and speeding up your applications today. Follow the simple steps to launch Relay using our npm CLI.

1

Install Relay CLI

Use Homebrew or global npm registry to install the CLI command.

2

Run Sanity Diagnostics

Verify configuration and system setup using relay doctor.

3

Launch Relay Server

Launch the server inline or in the background via relay start.

Terminal
# Option A: Install via Homebrew (macOS & Linux)
brew tap vrushankpatel/relay
brew trust vrushankpatel/relay  # (If prompted by brew)
brew install relay

# Option B: Install via NPM registry
npm install -g relay-llm-proxy

# Verify environment & config
relay doctor

# Launch Relay daemon
relay start -d