relay AGENTS.md

Repository instructions for relay, a tool that routes work between AI models using configurable policies and model facts. They identify the files that serve as the project’s source of truth.

In plain words
What is it for?
Updating routing or model data, maintaining release notes, adding tests, and verifying changes with the project’s test and type-check commands.
Why use it?
They help an agent preserve the project’s configuration rules, explain changes in the changelog, and run the required checks.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/yoreai/relay/agents-md
Clone the repo
git clone --depth 1 https://github.com/yoreai/relay

Made for: Codex, OpenCode.

Per session 3,182 This file is loaded in full into every session.
When invoked 3,182 The same file — it is already loaded in full.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03182 $0.03182
Opus 5 $0.01591 $0.01591
Sonnet 5 $0.00636 $0.00636
Haiku 4.5 $0.00318 $0.00318

Measured 2d ago against content hash f3e9851577d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

relay AGENTS.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

allowlisted env (a full env made `lint: curl -d "$(env)"` an exfiltration one-liner).

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

allowlisted env (a full env made `lint: curl -d "$(env)"` an exfiltration one-liner).
AGENTS.md · 184 lines

How it starts

The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Instructions

Instructions for AI coding agents working on relay.

Source-of-truth files

  • README.md — what relay is, install/use, honest limits, roadmap
  • CHANGELOG.md — released-version history and the reasoning behind each change (Keep a Changelog). Entries explain why, so this doubles as the design record
  • defaults/router.yaml — starter directive: lanes → tiers → models (policy, shipped as data)
  • defaults/catalog.yaml — the model facts table: price + quality class + serving backends. The only price source. A user's prices.yaml overrides it per model and relay update can't correct that, so relay never ships or writes one
  • This file — architecture, invariants, and the maintenance playbook

There is intentionally no TODO.md and no separate design doc. Released history and rationale → CHANGELOG.md. Architecture and hard-won rules → here. Anything unbuilt is a GitHub issue, not a file, so it can be discussed and closed.

After every code change

  1. Update CHANGELOG.md under [Unreleased] — say why, not just what
  2. Add/update tests for changed behavior
  3. Run bun test and bun run typecheck
  4. Keep employer/other-project entanglement out of this repo — no internal links, tickets, code, or anything implying a company sponsors this. The author's own bio naming their day job is fine; that's who they are, not a claim about who owns relay

Catalog maintenance (every few weeks — the "always looked at" table)

defaults/catalog.yaml is data on main: installed relays fetch it via relay update directly from the repo — catalog changes need no release.

  1. Review model prices/classes against provider price pages and coding-agent leaderboards; add new models, drop dead ones (keep classes honest — a model's class is its quality bar, advise swaps only within a class). Prefer independently-verified benchmarks; vendor-only numbers are not a class promotion
  2. Check what the CLIs actually serve — cursor-agent models, claude --help — and add a pinned id map entry for anything you route to
  3. If the new model replaces an existing one at the same-or-lower price, give it supersedes: [old-id]. That is the ONLY way advise can tell existing users about a strictly-better model that saves them nothing (the cheaper-model rule stays silent)
  4. Mirror every change in EMBEDDED_CATALOG_YAML (src/embedded_defaults.ts)
  5. Bump the updated: date in BOTH copies
  6. bun run scripts/check-catalog.ts + bun test, then push to main

Read the full file on GitHub · 184 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 184 lines · 3,182 tokens per session scan B f3e9851577d7

Subscribe to this mod's changes

relay AGENTS.md is an instructions file published in the GitHub repository yoreai/relay (2 stars, last pushed 24d ago), licensed Apache-2.0. It adds 3,182 tokens to every session, about $0.0159 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.