route the work.
keep the money.

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

agent
any agent, same pattern — relay picks the sub-agent · measured receipts are from real runs

$ why

pay for judgment, not ceremony

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.

your policy, not a black box

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.

quality first — enforced, not hoped

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.

$ how it works

# 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
  1. route — rules-first matching on the task; no model call needed to decide
  2. run — headless cursor-agent / claude / codex in your working tree, with a thin curated brief
  3. verify — your own lint & tests decide, not vibes
  4. widen → escalate — thin briefs self-heal; frontier models are the exception path
  5. receiptsaved 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.

$ backends — the CLIs relay drives

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.

surfaceCLIstatus
Cursorcursor-agentverified
Claude Codeclaudeverified
Codexcodexverified
Gemini CLIgeminiexperimental
Grok CLIgrokexperimental
Kimi CLIkimiexperimental

$ proof — small, open, honest

We 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.

6/6 = 6/6tests passed, both arms — quality parity
5.2×median cost reduction (2.2–8.7×)
3–6×faster on clean frontier runs — often far more*
taskrouted · grok-4.5frontier · fable-5-highratio
brackets✓ $0.073 · 47s✓ $0.379 · 131s5.2×
clamp✓ $0.064 · 21s✓ $0.240 · 708s*3.7×
csvline✓ $0.060 · 33s✓ $0.313 · 683s*5.2×
duration✓ $0.049 · 19s✓ $0.108 · 1258s*2.2×
paginate✓ $0.037 · 16s✓ $0.306 · 102s8.2×
slugify✓ $0.053 · 18s✓ $0.463 · 791s*8.7×

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.

$ install

1 brew install yoreai/tap/relay
2 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

$ about

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.