npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@relayplane/proxy

v1.9.61

Published

Open source cost intelligence proxy for AI agents. Cut LLM costs ~80% with smart model routing. Dashboard, policy engine, 11 providers. MIT licensed.

Readme

RelayPlane

Know what every agent run costs. Kill the runaway before it drains your budget.

A local proxy that sits between your AI agents and their model providers, prices every request as it happens, rolls the cost up per run and per agent, and lets you cap or kill spend before a loop turns into a bill.

npm license node

RelayPlane dashboard: live spend, budget burn, routing savings, and a per-run cost table

RelayPlane runs on your machine and is a drop-in replacement for the Anthropic and OpenAI base URLs: no Docker, no Python, no account, and nothing leaves your machine unless you turn it on. It is for people running multi-agent or fan-out workloads who cannot tell which run ate the bill. MIT licensed, no paid tiers, the whole product is in this repo.

Quick start (30 seconds)

npm install -g @relayplane/proxy
relayplane start

Point Claude Code (or any tool that speaks the Anthropic or OpenAI API) at it:

export ANTHROPIC_BASE_URL=http://localhost:4100
claude

That is the whole setup. Open http://localhost:4100 for the live dashboard, or run relayplane watch for a cost ticker in your terminal. Using API keys instead of a Claude subscription? relayplane init walks you through it. Full walkthrough: relayplane.com/docs/quickstart.

What you get

  • Live cost intelligence. Every request priced as it happens and rolled up per run, per agent, and per model, in a local dashboard and a terminal ticker. No SDK, no code changes. Runs and attribution · Telemetry
  • Model routing. Send simple work to cheap models and hard work to frontier models by complexity tier. It is a config edit that hot-reloads, never a code change. Routing
  • Budget caps. Hard limits (daily, hourly, per-request, per-session, and per-run) that block, downgrade, or warn. A per-run cap 429s that one job instead of stopping the whole machine. Budget caps
  • Kill switch. One command or one button halts all routed traffic instantly, with an audit trail of what was stopped and what it saved. Cost caps and kill switch
  • Anomaly detection. Opt-in detectors flag token-explosion loops, velocity spikes, and repetition (a stuck agent looping the same call) and alert you before the caps have to. Cost caps and kill switch
  • Failover. On a 429 or an overload, RelayPlane cools the provider down; enable cross-provider cascade and it remaps the model and retries on the next provider instead of failing your run. Providers
  • Providers. Native drop-in forwarding for Anthropic, OpenAI, Google (Gemini), xAI, OpenRouter, and local Ollama, all behind one base URL. Providers
  • Local and private by default. Passthrough is the default: your credentials and traffic stay yours. Per-request telemetry is off unless you turn it on. Privacy

Runs

Tag work at dispatch time and the proxy rolls cost up by run, agent, and thread. No SDK, no instrumentation, nothing inside your agent:

relayplane run --label nightly-backfill -- ./orchestrate.sh
relayplane runs list --days 7

Claude Code forwards custom headers byte for byte, so a .claude/settings.json is enough:

{ "env": {
  "ANTHROPIC_BASE_URL": "http://localhost:4100",
  "ANTHROPIC_CUSTOM_HEADERS": "X-RelayPlane-Run: my-run\nX-RelayPlane-Agent: coder"
} }

Every claude -p already lands in an inferred cc-<session> run with no setup at all.

| Request header | Meaning | |---|---| | X-RelayPlane-Run | Run id, 128 chars max; a / nests it under a parent | | X-RelayPlane-Agent | Agent label, 64 chars (alias: x-agent-id) | | X-RelayPlane-Run-Label | Human name, 80 chars; expected-cost bands key off this | | X-RelayPlane-Tags | k:v,k:v, up to 10 pairs | | X-RelayPlane-Attempt | Retry attempt number, 1 to 999 | | X-RelayPlane-Run-Cap-Usd | Per-run hard cap, in USD |

Set an expected-cost band per label and the proxy tells you when today's run is not like the others. Set a per-run cap and it 429s that one job. Retries are counted apart from first attempts, so you can see how much of a run was rework. Every figure is notional list price for the traffic, never an invoice, and the ledger is SQLite on your machine. Full reference: relayplane.com/docs/runs.

Why we built it (and how we know it works)

We run an autonomous engineering pipeline that ships real code every day, and all of its traffic goes through RelayPlane. Over the last four months that is thousands of pipeline runs a day, routed, priced, and guarded by this proxy.

The payoff is the swap seam. When we wanted to test a cheaper model on our heaviest tier, we changed one field, watched the live cost pane, and reverted nine hours later when the numbers said no:

// ~/.relayplane/config.json, one field, hot-reloaded, no code change
"routing": {
  "mode": "complexity",
  "complexity": {
    "complex": { "provider": "anthropic", "model": "claude-sonnet-5" }
  }
}

If you run agents seriously, this is the control you are missing: one pane for spend, one seam for swapping models, one place to say "never spend more than this."

How it compares

| | RelayPlane | claude-code-router | LiteLLM | OpenRouter | |---|---|---|---|---| | Runs locally | yes | yes | yes | no (cloud) | | Anthropic API compatible | yes | yes | partial | no | | Live per-agent cost pane | yes | per-request estimates | budgets (platform teams) | dashboard (cloud) | | Spend guardrails (caps, anomaly, kill) | yes | no | budgets | no | | Free / open source | MIT, everything | MIT | OSS + paid enterprise | 5.5% fee |

Different tools for different jobs: LiteLLM is built for platform teams, OpenRouter is a hosted marketplace, claude-code-router focuses on multi-agent orchestration. RelayPlane is the local cost-and-control pane for people who run agents on their own machine.

Docs

Privacy

Passthrough by default: RelayPlane forwards your own credentials and does not modify your traffic unless you turn routing on. Per-request telemetry is off by default. The optional Osmosis mesh (anonymized routing signals shared across users) is off until you turn it on with relayplane mesh on. Full details in docs/privacy.md.

License

MIT. No paid tiers. Everything in this repo is the whole product.