nyro
AGENTS.md194 starsChanged 4 months agoApache-2.0View on GitHub
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- go/AGENTS.mdAGENTS.md
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 42
Keep changes focused and reversible.
- Distinctive: line 43
Prefer existing patterns and utilities before adding abstractions or dependencies.
- Very specific: line 44
Do not edit generated build output such as webui/dist/ unless the task explicitly requires it.
- Distinctive: line 50
Add localized alternatives explicitly, but keep the canonical fallback/default value in English unless a caller/user setting selects …
- Very specific: line 79
When modifying the database schema — including changes to INIT_SQL, POSTGRES_INIT_SQL, MYSQL_INIT_SQL constants or the migrate() function …
- Very specific: line 81
Update docs/database/schema.md to reflect the new table/column definitions.
- Very specific: line 98
Verify with make check and make test, then commit (chore: release vX.Y.Z) and push the branch.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- Generated: 2026-05-21 | Updated: 2026-09-09 -->Nyro AI Gateway
Purpose
Nyro is a Rust workspace for a local AI protocol gateway with a Tauri desktop app, standalone server, and React WebUI. It translates OpenAI / Anthropic / Gemini-compatible client traffic to configured model providers while keeping administration and configuration local.
Key Files
| File | Description |
Cargo.toml | Root nyro package plus workspace definition for the new data-plane crates and legacy applications. |
Cargo.lock | Locked Rust dependency graph. |
README.md / README_CN.md | User-facing project documentation in English and Chinese. |
Makefile | Common development and release commands. |
docs/design/architecture.md | Architecture overview and module layout. |
webui/package.json | React/Vite WebUI dependencies and scripts. |
Subdirectories
| Directory | Purpose |
src/ | Experimental source-built root nyro proxy entrypoint, bootstrap, and Unix SIGHUP configuration reload; separate from released legacy entries. |
crates/nyro-kernel/ | Workload-neutral lifecycle/generation library used by the experimental root proxy. |
crates/nyro-protocol/ | Protocol wire types and bounded stream framing for the new data plane. |
crates/nyro-llm/ | New typed LLM runtime, OpenAI/Anthropic/Gemini Chat codecs/providers, request execution, and correlated usage observations. |
crates/nyro-config/ | Strict standalone file configuration for the experimental root proxy. |
crates/nyro-security/ | Transport-neutral credential authentication and authorization primitives. |
crates/nyro-limit/ | Shared concurrency, token-bucket rate admission, and cumulative quota primitives. |
crates/nyro-core/ | Core Rust library: gateway, proxy, protocol conversion, provider adapters, storage, admin service. |
crates/nyro-tools/ | Rust CLI/tooling crate. |
src-server/ | Standalone server binary exposing proxy/admin HTTP surfaces. |
src-tauri/ | Tauri desktop application shell and IPC integration. |
webui/ | React + TypeScript management console. |
docs/ | Design, server, standalone, and testing documentation. |
tests/ | Python/E2E test assets and shared fixtures. |
scripts/ | Install and release automation. |
For AI Agents
Working In This Repository
- Keep changes focused and reversible; do not mix unrelated cleanup into feature or refactor work.
- Prefer existing patterns and utilities before adding abstractions or dependencies.
- Do not edit generated build output such as
webui/dist/unless the task explicitly requires it. - Preserve separate English and Chinese user-facing docs when updating public documentation.
Multilingual Defaults
- For any multilingual/i18n-capable value, the default must be English, in both frontend and backend code.
- This applies to UI labels, fallback strings, seed/default configuration, generated examples, API defaults, and documentation-derived constants.
- Add localized alternatives explicitly, but keep the canonical fallback/default value in English unless a caller/user setting selects another language.
Testing Requirements
- Rust core changes: run the narrowest relevant
cargo test -p <crate> ..., thencargo check -p <crate>orcargo clippy -p <crate> --all-targetswhen behavior or public APIs change. - WebUI changes: run the relevant package script from
webui/such asnpm run lintornpm run buildwhen TypeScript/UI behavior changes. - Documentation-only changes should still be checked for path/name accuracy.
Common Patterns
nyro-kernelowns resource/generation invariants only; keep business rules, configuration, HTTP, databases, and global module discovery outside it. See its README for lifecycle ownership and cancellation contracts.nyro-coreshould remain transport-agnostic; desktop IPC and server HTTP layers call into core APIs rather than embedding core business logic.- Admin service code should be split by functional responsibility and tested through public APIs where possible; keep private state-machine tests internal instead of exposing private APIs just for tests.
- Protocol/provider logic should keep protocol conversion boundaries explicit and avoid coupling provider adapters to UI/server transport concerns.
Dependencies
Internal
- The root
nyropackage composesnyro-kernel,nyro-config,nyro-llm,nyro-security, andnyro-limitfor the experimental file-config proxy. src-tauri/andsrc-server/depend oncrates/nyro-core/.webui/talks to the desktop IPC/server admin surfaces and should not duplicate core business rules.- Documentation in
docs/should reflect current crate and module boundaries.
External
- Rust workspace uses Tokio, Axum, Reqwest, SQLx, Serde, Tauri, and tracing-related crates.
- WebUI uses React, Vite, TypeScript, Radix UI primitives, TanStack Query, and Zustand.
<!-- MANUAL: Any manually added notes below this line are preserved on regeneration -->Database Changes
When modifying the database schema — including changes to INIT_SQL, POSTGRES_INIT_SQL, MYSQL_INIT_SQL constants or the migrate() function in any storage backend — you must also:
- Update
docs/database/schema.mdto reflect the new table/column definitions. - Regenerate
deploy/schema/postgres.sqlanddeploy/schema/mysql.sqlto match the final post-migration state:
These files are the authoritative reference schema for DBAs. They represent the final state after all migrations have run (with final table names:nyro-tools dump-schema --backend postgres > deploy/schema/postgres.sql nyro-tools dump-schema --backend mysql > deploy/schema/mysql.sqlmodels,model_backends,api_key_models).
The SQL files in
deploy/schema/are derived reference artifacts — do not manually edit them except to update the header comment. Always regenerate from the migration source of truth.
Release Process
Local release work (cutting a release/vX.Y.Z branch off master through pushing it):
- Branch:
git checkout master && git pull && git checkout -b release/vX.Y.Z. - Bump the version in 3 places (keep identical):
Cargo.toml[workspace.package].version,src-tauri/tauri.conf.jsonversion,webui/package.jsonversion. RefreshCargo.lockviacargo update -w(never edit it by hand). - Changelog: summarize all commits since the last tag (
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline) into a new version entry, and write it to bothCHANGELOG.md(English, canonical) andCHANGELOG_CN.md(Chinese). - Verify with
make checkandmake test, then commit (chore: release vX.Y.Z) and push the branch.
PR merge (release/vX.Y.Z → master) and tagging vX.Y.Z are done remotely on GitHub; pushing the tag triggers the release workflows.
See
docs/release.mdfor the full local release runbook (source of truth).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

