agentleFS
ai-dynamoai-dynamo/modelexpress/AGENTS.md

modelexpress

AGENTS.md202 starsChanged 31 days agoApache-2.0View on GitHub

Rust-based model cache management service and GPU-to-GPU weight transfer system using NVIDIA NIXL over RDMA. This file holds the always-on rules for every AI coding agent working in this repository. Multi-step procedures live as skills under .agents/skills/ and load on demand. Both are shared across tools: Edit AGENTS.md or the skill; never add a tool-specific copy. When a section here grows into a procedure, move it to a skill and list it below. Reference documentation: - docs/ARCHITECTURE.md - Project structure,…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,542 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 repository6 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    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
  1. Very specific:

    All cargo dependencies go in the root Cargo.toml.

    line 25
  2. Distinctive:

    No emojis in code or comments.

    line 28
  3. Distinctive:

    Do not create markdown files to document code changes or decisions.

    line 29
  4. Distinctive:

    Do not over-comment code. Removing code is fine without adding comments to explain why.

    line 30
  5. Distinctive:

    Use mermaid diagrams instead of ASCII art in markdown files.

    line 31
  6. Distinctive:

    Prefer established crates over hand-rolled implementations.

    line 32
  7. Distinctive:

    Run pre-commit after every code change, even before creating commits:

    line 51
  8. Very specific:

    Every commit must carry a Signed-off-by: Real Name <email> trailer.

    line 77
  9. Very specific:

    Use the contributor's real name and the email configured in git config user.name / user.email.

    line 78
  10. Very specific:

    Do not add Co-Authored-By or tool-attribution trailers.

    line 80
  11. Distinctive:

    Always read files to understand context before making changes.

    line 85
  12. Distinctive:

    Do not implement changes eagerly.

    line 86
  13. Distinctive:

    When making changes, update the appropriate documentation files:

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

ModelExpress

Rust-based model cache management service and GPU-to-GPU weight transfer system using NVIDIA NIXL over RDMA.

This file holds the always-on rules for every AI coding agent working in this repository. Multi-step procedures live as skills under .agents/skills/ and load on demand. Both are shared across tools:

ToolAlways-on rulesSkills
CodexAGENTS.md (native).agents/skills/ (native)
CursorAGENTS.md (native).agents/skills/ (native)
Claude CodeCLAUDE.md imports this file via @AGENTS.md.claude/skills/<name> symlinks into .agents/skills/<name>
GitHub CopilotCoding agent reads AGENTS.md; Copilot Chat is pointed here by .github/copilot-instructions.mdvia AGENTS.md pointers below

Edit AGENTS.md or the skill; never add a tool-specific copy. When a section here grows into a procedure, move it to a skill and list it below.

Reference documentation:

  • docs/ARCHITECTURE.md - Project structure, crate catalog, gRPC services, server internals, Python client, NIXL integration
  • docs/DEPLOYMENT.md - Configuration reference, Docker, Kubernetes, Helm, P2P transfer setup, debugging
  • CONTRIBUTING.md - Development setup, available commands, pre-commit hooks, environment variables, DCO
  • docs/CLI.md - CLI tool usage, commands, output formats, integration examples

Coding Standards

  • unwrap() is strictly forbidden except in benchmarks. expect() is allowed in tests. Always handle errors with match, ?, or custom error types.
  • All cargo dependencies go in the root Cargo.toml. Sub-crates use workspace dependencies exclusively. Never edit Cargo.toml or Cargo.lock by hand to add or update dependencies - use cargo add so you always get the latest version.
  • Python dependencies go in pyproject.toml. Never edit dependency files by hand - use uv add so you always get the latest version.
  • cargo clippy must pass with no warnings.
  • No emojis in code or comments.
  • Do not create markdown files to document code changes or decisions.
  • Do not over-comment code. Removing code is fine without adding comments to explain why.
  • Use mermaid diagrams instead of ASCII art in markdown files.
  • Prefer established crates over hand-rolled implementations. Check existing workspace dependencies before adding new ones.

Build and Test Commands

cargo build                          # Build
cargo build --release                # Release build
cargo test                           # Run all tests
cargo clippy                         # Lint (must pass, no warnings)
cargo run --bin modelexpress-server  # Run server
cargo run --bin config_gen -- --output model-express.yaml  # Generate config
cargo run --bin test_client -- --test-model "google-t5/t5-small"  # Test client
cargo run --bin fallback_test        # Fallback test
cargo bench                          # Criterion benchmarks
./run_integration_tests.sh           # Integration tests (starts server)

Pre-commit Hooks

Run pre-commit after every code change, even before creating commits:

pre-commit run              # Staged files only
pre-commit run --all-files  # All files (recommended after significant changes)

Hooks: cargo fmt, cargo clippy (--fix), cargo check, trailing whitespace, end-of-file, YAML/TOML/JSON validation, merge conflict detection, large file check.

Procedures (skills)

Load the matching skill before starting any of these. Each is a SKILL.md under .agents/skills/:

TaskSkill
Add or change a client CLI argument or env varadd-cli-argument
Add a gRPC serviceadd-grpc-service
Bump the release version or public-image tagsbump-version
Commit sign-off and DCO repairdco

Git Workflow

Feature branches use <username>/feature-name format, forked from main.

Commits and DCO

  • Every commit must carry a Signed-off-by: Real Name <email> trailer. Always commit with git commit -s. The DCO check is required CI and fails the PR otherwise.
  • Use the contributor's real name and the email configured in git config user.name / user.email. Check both before committing on an unfamiliar machine.
  • Preserve existing trailers when amending, rebasing, squashing, or cherry-picking. Use git rebase --signoff or git cherry-pick --signoff only when the person running the command is the one certifying the change.
  • Do not add Co-Authored-By or tool-attribution trailers.
  • See the DCO section of CONTRIBUTING.md for the full policy.

Tips

  • Always read files to understand context before making changes.
  • Do not implement changes eagerly. When discussing a problem or new feature, investigate thoroughly first, report findings, propose changes, and ask if they are acceptable before writing code.
  • Flush Redis on redeploy: stale metadata causes P2P transfer failures.
  • Long startup times are normal: DeepSeek-V3 takes ~40 min to warm up.
  • Set UCX_LOG_LEVEL=DEBUG for NIXL/RDMA diagnostics.
  • NIXL agents must match ranks: source rank 0 -> target rank 0.

Documentation Updates

When making changes, update the appropriate documentation files:

Change typeFiles to update
Architecture, components, NIXL, gRPC servicesdocs/ARCHITECTURE.md
Coding standards, build commands, new patterns, agent rulesAGENTS.md (the only agent-instruction file; CLAUDE.md and .github/copilot-instructions.md are pointers)
CLI arguments or commandsdocs/CLI.md + .agents/skills/add-cli-argument/SKILL.md
Configuration, environment variablesdocs/DEPLOYMENT.md
Deployment (Docker, K8s, Helm, P2P)docs/DEPLOYMENT.md
Known issues, FP8 handlingdocs/ARCHITECTURE.md
Dev setup, scripts, pre-commit hooksCONTRIBUTING.md
Contribution process, DCOCONTRIBUTING.md
New binary targets, crates, Python modulesdocs/ARCHITECTURE.md
Version-bump procedure changes.agents/skills/bump-version/SKILL.md
Agent procedures (multi-step how-tos).agents/skills/<name>/SKILL.md + the Procedures table in AGENTS.md

A feature is incomplete until documentation is updated.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.