relay: Instructions file for Codex

AGENTS.md

relay AGENTS.md is an instructions file for Codex, OpenCode from yoreai/relay. It costs 3,182 tokens per session, scanned B, original, Apache-2.0.

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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Codex; mentions OpenCode.

This is yoreai/relay's own configuration. It tells Codex and OpenCode how to work on relay itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything relay configures →

Reuse

Borrowing it

Nothing to install: this file belongs to yoreai/relay. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/yoreai/relay/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/yoreai/relay

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for relay AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yoreai/relay/agents-md/github.svg)](https://agentmods.dev/instructions/yoreai/relay/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/yoreai/relay/agents-md"><img src="https://agentmods.dev/badge/instructions/yoreai/relay/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for relay AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/yoreai/relay/agents-md"><img src="https://agentmods.dev/badge/instructions/yoreai/relay/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.03182 $0.03182
Opus 5.5 $0.01273 $0.01273
Sonnet 5.5 $0.00636 $0.00636
Haiku 4.5 $0.00318 $0.00318

Measured 2mo ago against content hash f3e9851577d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 2mo ago), licensed Apache-2.0. It adds 3,182 tokens to every session, about $0.0127 per session on Opus 5.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.

Related

relay AGENTS.md compared with instructions from other repositories

relay AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
relay AGENTS.mdyoreai/relayInstructions file22mo agoApache-2.0B3,182Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode