Switchyard: Instructions file for Codex

AGENTS.md

Switchyard AGENTS.md is an instructions file for Codex, OpenCode from NVIDIA-NeMo/Switchyard. It costs 841 tokens per session, scanned A, original, Apache-2.0.

Engineering guidance for Switchyard, a Python library that routes and translates traffic between client applications and language-model backends. It emphasizes stating assumptions, keeping changes small, and avoiding unrequested features.

In plain words
What is it for?
Planning Switchyard changes, modifying routing or format translation, working with health-aware endpoints, and following a simplicity-first development style.
Why use it?
It helps an agent make careful changes in a system that handles routing, logging, testing, and multiple endpoints. The rules reduce speculative code and hidden assumptions.

Instructions file for CodexOpenCode

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

This is NVIDIA-NeMo/Switchyard's own configuration. It tells Codex and OpenCode how to work on Switchyard 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 Switchyard configures →

About the project

Switchyard is a model-routing library and proxy that chooses which language model should handle each LLM request, based on factors such as cost and task suitability. It is for developers running LLM applications who want to route calls through existing gateways, custom harnesses, or a standalone proxy while retaining OpenAI and Anthropic client compatibility. The catalogue add-ons are workflows for operating or integrating Switchyard with coding agents and gateways.

NVIDIA-NeMo/Switchyard · 3,458 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to NVIDIA-NeMo/Switchyard. 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/NVIDIA-NeMo/Switchyard/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/NVIDIA-NeMo/Switchyard

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 Switchyard AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nvidia-nemo/switchyard/agents-md/github.svg)](https://agentmods.dev/instructions/nvidia-nemo/switchyard/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/nvidia-nemo/switchyard/agents-md"><img src="https://agentmods.dev/badge/instructions/nvidia-nemo/switchyard/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 Switchyard AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/nvidia-nemo/switchyard/agents-md"><img src="https://agentmods.dev/badge/instructions/nvidia-nemo/switchyard/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 841 This file is loaded in full into every session.
When invoked 841 The same file — it is already loaded in full.
Security scan A 0 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.00841 $0.00841
Opus 5.5 $0.00336 $0.00336
Sonnet 5.5 $0.00168 $0.00168
Haiku 4.5 $0.00084 $0.00084

Measured yesterday against content hash 5367659479aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Switchyard AGENTS.md scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 68 lines

How it starts

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

Switchyard is an LLM router library. It sits between an agent's request (e.g. Claude Code, Codex CLI) and an inference server, selecting the best model for that request.

It is written in Rust with Python bindings.

Core components in crates/. These are layered:

  • libsy: The core library and routing algorithms. This is the heart of Switchyard. Main entry point is Algorithm::run_stream method.
  • libsy-llm-client: HTTP client that makes requests for libsy algorithms, and drives run_stream. Main entry point is run function in run.rs.
  • switchyard-runner: Parsing TOML configuration, uses libsy-llm-client to run until the algorithm resolves to the selected model. The entry point is Runner struct.
  • switchyard-server: A thin HTTP demo server wrapped around switchyard-runner. Has a TOML config file.
  • switchyard-py: Python bindings for libsy and libsy-llm-client.

Support components (also in crates/):

  • protocol: Types shared between many components.
  • switchyard-translation: Convert between various JSON inference formats: OpenAI Chat Completions, OpenAI Responses and Anthropic Messages. We convert to/from a vendor neutral independent representation (IR). All the core components with with this IR.

Integrations:

  • crates/switchyard-nemo-relay-plugin/: Integrate with NeMo Relay.
  • examples/litellm/: Integrate with LiteLLM.

Writing guidance

  • Write for a high-school level in short, simple sentences.
  • Avoid jargon, analogies and metaphors. Be direct.
  • Only say what something is not if it is essential to understanding. Never use negatives or opposites as a rhetorical flourish.
  • Be humble. Do not inflate claims.
  • Do not say what you would do unless asked.

Official documentation

  • Publish documentation about using, integrating, configuring, and understanding Switchyard's product and software.
  • Keep repository CI, documentation publishing, release procedures, and maintainer or agent workflows in contributor documentation or excluded internal docs, not in the official product documentation.

Read the full file on GitHub · 68 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. yesterday Changed · +5 lines · +55 tokens per session 5367659479aa
  2. 20d ago Changed · +6 lines · +51 tokens per session 2c84596407b1
  3. 1mo ago Changed · -212 lines · -1,901 tokens per session 3511201accb8
  4. 1mo ago First seen · 269 lines · 2,636 tokens per session scan A be9feb1dc582

Subscribe to this mod's changes

Switchyard AGENTS.md is an instructions file published in the GitHub repository NVIDIA-NeMo/Switchyard (3,458 stars, last pushed today), licensed Apache-2.0. It adds 841 tokens to every session, about $0.0034 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories