ARCHITECTURE

ARCHITECTURE is a command for coding agents from cloudrift-ai/emmy. It costs 0 tokens per session (13,642 once invoked), scanned C, original, Apache-2.0.

A guide to the repository's command architecture: which command-line tools handle benchmarking, deployment, virtual machines, recipes, and image publishing, and where their reusable code belongs.

In plain words
What is it for?
Use it when changing commands, model recipes, cloud virtual-machine provisioning, deployments, benchmark workflows, or serving-image publication.
Why use it?
It helps developers place code in the correct layer and avoid mixing command-line-only logic with shared business logic.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/cloudrift-ai/emmy/architecture
Clone the repo
git clone --depth 1 https://github.com/cloudrift-ai/emmy

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 ARCHITECTURE

README.md
[![agentmods](https://agentmods.dev/badge/commands/cloudrift-ai/emmy/architecture.svg)](https://agentmods.dev/commands/cloudrift-ai/emmy/architecture)
Your own site
<a href="https://agentmods.dev/commands/cloudrift-ai/emmy/architecture"><img src="https://agentmods.dev/badge/commands/cloudrift-ai/emmy/architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 13,642 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00000 $0.13642
Opus 5 $0.00000 $0.06821
Sonnet 5 $0.00000 $0.02728
Haiku 4.5 $0.00000 $0.01364

Measured 4d ago against content hash d3a385ddc0a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

ARCHITECTURE scanned grade C with 1 finding 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 4d 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

emmy deploy ssh --recipe <path> --ssh user@host[:port] [--ssh-key ~/.ssh/id_ed25519] [--dry-run] [--teardown]
emmy/commands/ARCHITECTURE.md · 758 lines

How it starts

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

Commands Architecture

Layered Design

commands/bench ──► benchmark (config, tasks, execution)
commands/bench ──► deploy (DeployParams, deploy/teardown)
commands/bench ──► provisioning (cloud VM lifecycle)
commands/deploy ─► deploy (DeployParams, deploy/teardown)
commands/deploy ─► provisioning (remote setup, cloud VMs)
commands/vm ────► provisioning (create/delete instances)
commands/recipe ─► recipe (catalog queries and onboarding shell creation)
recipe/query ───► provisioning (read-only CloudRift availability and team access)
commands/publish ─► publish (image naming, metadata, collision and digest gates)

Dependency rule: commands/ is the CLI-only layer. All reusable business logic lives in top-level library packages:

  • emmy/recipe/ — recipe loading, dataclass types (Recipe, LLMConfig, etc.), engine flag mapping, catalog queries, and onboarding shell creation
  • emmy/deploy/ — compose generation, deploy orchestration
  • emmy/provisioning/ — VM types, SSH polling, shell helpers, cloud providers
  • emmy/publish.py — the canonical serving-image name parser, model slug, Docker metadata gates, and publication runner
  • emmy/serving/release.py — shell-free pinned serving-config parsing and the exact realization matrix shared by trace and eval
  • emmy/logging_setup.py — CLI logging setup (setup_cli_logging()), which suppresses routine HTTP request INFO records so versioned JSON remains parseable, plus ensure_plugin_logging() — makes emmy INFO logs visible when nothing configured logging (a bare vLLM entrypoint; called by emmy.serving.register())
  • emmy/config.py — the single owner of os.environ for all EMMY_* config vars. Typed getters (tune_db_path, nvcc_flags, debug_enabled, dump_dir, tune_patience, bench_backends_raw, cubin_cache_dir, …) read the env live; set_nvcc_flags(cli_value, default) holds the --nvcc-flags > env > command-default precedence that used to live in this CLI layer, so every callsite (CLI, programmatic, tests) shares it. The thin compile.apply_nvcc_flags / compile.resolve_tune_db wrappers just adapt argparse to it. (Provider/secret vars stay with redact.py; the dynamic EMMY_<KNOB> namespace stays with compiler/pipeline/knob.py, which borrows config.knob_var / config.knob_raw.)
  • emmy/redact.pyredact_secrets(), SecretRedactingFilter, install_redaction() (attach the filter to a handler — must be a handler, not a logger, so child-logger records that propagate up are still redacted), register_secret() (call after resolving any secret from a CLI flag — --hf-token, --api-key — or env var so its value is added to the redaction set)
  • emmy/benchmark/ — config, logging, workload, tasks, execution, and YAML experiment records

Read the full file on GitHub · 758 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. 4d ago First seen · 758 lines · 0 tokens per session scan C d3a385ddc0a6

Subscribe to this mod's changes

ARCHITECTURE is a command published in the GitHub repository cloudrift-ai/emmy (80 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 13,642 tokens. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.