tiygate: Instructions file for Codex

AGENTS.md

tiygate AGENTS.md is an instructions file for Codex, OpenCode from tiylabs/tiygate. It costs 1,187 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for TiyGate, an open-source Rust AI Gateway organized as a Cargo workspace with eight crates and a web admin console.

In plain words
What is it for?
Use them when working on TiyGate so changes fit the crate boundaries, web console, documentation, scripts, and testing layout.
Why use it?
They give coding agents the project’s structure, engineering rules, build and test commands, and naming conventions.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tiylabs/tiygate/agents-md"><img src="https://agentmods.dev/badge/instructions/tiylabs/tiygate/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,187 This file is loaded in full into every session.
When invoked 1,187 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.01187 $0.01187
Opus 5.5 $0.00475 $0.00475
Sonnet 5.5 $0.00237 $0.00237
Haiku 4.5 $0.00119 $0.00119

Measured 2mo ago against content hash c6814217940f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

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 · 57 lines

How it starts

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

Repository Guidelines

Contributor guide for TiyGate, an open-source Rust AI Gateway. Preserve the crate layering described below; it is intentional and enforced.

Project Structure & Module Organization

This repository is a Cargo workspace with 8 crates and an embedded admin console:

  • crates/core contains canonical IR, traits, and pipeline code. It must stay zero-I/O and free of concrete provider, protocol, or database dependencies.
  • crates/protocols implements protocol codecs for chat completions, messages, responses, Gemini, and embeddings.
  • crates/providers stores built-in provider metadata and auth; crates/provider-bedrock isolates heavy AWS Bedrock SDK dependencies.
  • crates/store, crates/cache, crates/admin, and crates/server cover config storage, embedding cache, Admin REST/OAuth, and the tiygate binary.
  • webui/ is the React + TypeScript + Vite admin console, embedded with rust-embed and served at /admin/ui.
  • docs/ holds architecture and protocol capability docs; scripts/ contains helper checks such as verify-deps.sh.
  • Tests live in crates/<crate>/tests/ for integration tests and inline #[cfg(test)] modules for unit tests.

Engineering Principles

Keep changes aligned with three project constraints:

  • Reliability first: keep the request hot path resilient with fallback budgets, circuit breakers, ingress limits, graceful drain, and telemetry/logging off the hot path.
  • Extensible by design: add providers, protocols, routing strategies, cache backends, and log sinks through existing trait/registration boundaries instead of central rewrites.
  • Maintainable layering: keep core as canonical IR + traits only, use the IR to avoid N×N protocol coupling, document lossy protocol behavior in docs/protocol-capability-matrix.md, and isolate heavy dependencies in dedicated crates.

Build, Test, and Development Commands

Run commands from the repository root. Use make help for the full list.

make build        # Build webui, then release Rust binary
make build-debug  # Build webui, then debug Rust binary
make dev          # Build webui and run tiygate-server with webui feature
make dev-server   # Run Rust server only, without webui embedding
make dev-web      # Start the WebUI Vite dev server
make check        # cargo check --workspace --all-targets --all-features
make test         # cargo test --workspace --all-features
make lint         # rustfmt check, clippy -D warnings, and webui tsc
make fmt          # Format Rust and WebUI code
make audit        # Run cargo audit and npm audit

Read the full file on GitHub · 57 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 · 57 lines · 1,187 tokens per session scan A c6814217940f

Subscribe to this mod's changes

tiygate AGENTS.md is an instructions file published in the GitHub repository tiylabs/tiygate (147 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 1,187 tokens to every session, about $0.0047 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

tiygate AGENTS.md compared with instructions from other repositories

tiygate AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tiygate AGENTS.mdtiylabs/tiygateInstructions file1471mo agoApache-2.0A1,187Codex, 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