Your agents run everything through a frontier model — including the 70% of work a mid-tier model does just as well. relay is the routing agent under any surface: it sends each task to the cheapest model that clears its quality bar, verifies the result, escalates only on failure, and hands you a receipt.
brew install yoreai/tap/relay
macOS & Linux · single binary · Apache-2.0 · no accounts, no telemetry, no stored credentials
Watchers polling dashboards, bulk renames, test fixes, status
summaries — agents burn frontier tokens on work that doesn't need
frontier judgment. On our open micro-benchmark,
routed models passed the same tests as frontier at a median
5.2× lower cost; on watcher-class load with cache-read pricing
the projection is 10–20× (labeled as the estimate it is).
Every receipt says measured or
estimated on it — nothing here is fabricated
precision.
Auto-routers are opaque and change under you mid-session. relay's
routing lives in router.yaml — a versioned, auditable,
shareable file. Lanes map task shapes to quality tiers;
tiers map to concrete models with fallbacks per backend. When the
market moves, relay advise proposes cheaper
same-class swaps as a git-visible diff. It never rewrites your
policy behind your back.
Cheap-first only works with a floor under it. Every edit lane runs
your repo's own lint and tests; failure widens context, then bumps
the tier: work → review → deep. Edits land
staged in git — your diff is the review surface. relay never
commits unless a lane says so, and never touches your credentials:
it drives the CLIs you already logged into.
# router.yaml — the directive. share it like a dotfile. tiers: work: # first available backend wins - { backend: cursor, model: grok-4.5 } - { backend: claude, model: sonnet-5 } - { backend: codex, model: gpt-5.6-sol } deep: - { backend: cursor, model: fable-5-high } lanes: - name: quickfix match: { verbs: [fix, rename, bump] } tier: work verify: [lint, test] # the quality floor write: stage # git diff = review
cursor-agent / claude / codex in your working tree, with a thin curated briefsaved vs your baseline, measured where the backend reports usage
Two mouths, one brain: a human CLI and an MCP server. Register once with
relay setup, then either call relay_run when
you want a handoff — or drop a short rule/skill so your agent routes
mechanical work through relay by default. You can't force an agent;
you can make the cheap path the obvious one.
relay never stores credentials. It shells out to the agent CLIs you already installed and signed into. First available backend in each tier wins — a Claude-only machine still routes every lane.
cursor-agentverifiedclaudeverifiedcodexverifiedgeminiexperimentalgrokexperimentalkimiexperimentalWe ran six mechanical bug-fix tasks twice with identical prompts: relay's normal routing (grok-4.5, workhorse class) vs the same lane forced to the frontier model (fable-5-high). Grading is each repo's own deterministic tests — no LLM judging. Costs use list prices; the cursor CLI doesn't report tokens, so both arms use the same byte-estimator — absolute dollars are approximate, the ratio is apples-to-apples. Method, fixtures & raw results are in the repo — reproduce it yourself.
What we claim: on mechanical, verifiable work, routed cheap models pass the same tests at a fraction of the cost — and escalation costs are charged to relay's side when they happen. What we don't claim: that cheap models match frontier on hard reasoning — relay routes those to frontier on purpose. N is small and disclosed; this is a receipt, not a leaderboard. *Frontier runs marked with an asterisk stalled past relay's 10-minute cap and passed on retry; times are end-to-end. Run date: 2026-07-21.
brew install yoreai/tap/relay
relay setup
registers relay in Cursor / Claude Code — that's it
relay doctor · relay advise · relay savings
see your routing, get cheaper same-class swaps, watch the receipts add up
Linux/CI: curl -fsSL https://raw.githubusercontent.com/yoreai/relay/main/scripts/install.sh | bash
I'm Yev — founder of YoreAI, AI researcher & ML data scientist at Abridge, with roots in bioinformatics and applied data science (MDS, University of Pittsburgh). The through-line of my career, from genomics pipelines to healthcare AI, has always been the same thing: build tools that help other people succeed.
relay exists because I got tired of watching agents — mine and everyone else's — pay frontier prices for mechanical work, and equally tired of the false trade where "cheap" means "wrong." The cheapest pathway and the best result are usually the same pathway, if something is checking the work. relay is that something. Open source, local-first, honest receipts.