athanor AGENTS.md

athanor AGENTS.md is an instructions file for Codex, OpenCode from MylesBorins/athanor. It costs 4,789 tokens per session, scanned A, original, Apache-2.0.

Contributor instructions for athanor, a local Apple Silicon tool that finds and runs machine-learning models for pi-agent.

In plain words
What is it for?
Use them before changing athanor’s model registry, ports, process management, command-line interface, or terminal interface.
Why use it?
They give contributors and coding agents the project layout, required context files, and rules that must remain unchanged without an explicit decision.

Instructions file for CodexOpenCode

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 instructions/mylesborins/athanor/agents-md
Clone the repo
git clone --depth 1 https://github.com/MylesBorins/athanor

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mylesborins/athanor/agents-md.svg)](https://agentmods.dev/instructions/mylesborins/athanor/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mylesborins/athanor/agents-md"><img src="https://agentmods.dev/badge/instructions/mylesborins/athanor/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,789 This file is loaded in full into every session.
When invoked 4,789 The same file — it is already loaded in full.
Security scan A 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.04789 $0.04789
Opus 5 $0.02395 $0.02395
Sonnet 5 $0.00958 $0.00958
Haiku 4.5 $0.00479 $0.00479

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

Security

Grade A, and why

athanor AGENTS.md scanned grade A 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| verify endpoint | `curl localhost:<port>/v1/models` | OpenAI-compatible; port is printed by `ls` / `show` / `status` |
AGENTS.md · 203 lines

How it starts

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

AGENTS.md

Orientation for contributors and AI agents working on athanor. Read this before making changes; the invariants below are not negotiable without an explicit user decision.

What athanor is

Athanor — personal LLM alchemy on Apple Silicon. It scans the Hugging Face cache, registers MLX and llama.cpp (GGUF) models in ~/.athanor/models.json, assigns each one a stable port, supervises detached child processes, and exposes models to pi-agent. By default pi sees ingress-backed athanor-mlx / athanor-llama aggregators; direct per-model providers are available when router.enabled is false. Surfaces are an Ink TUI (athanor) and a hand-rolled CLI (athanor <cmd>).

Not a library. Not a daemon. No network listeners except the runtime children themselves (and an optional local control API, off by default).

Invariants

These are load-bearing. If a change seems to need to break one, stop and ask.

  1. Stable port per model. Ports are allocated on first discovery from config.portRange and persisted on the registry entry forever. A model's port never changes behind the user's back; pi-agent provider URLs must be stable across restarts.
  2. Atomic registry writes. ~/.athanor/models.json is always written via temp-file + rename in src/registry/index.ts. Never partial-write it, never keep it open across awaits.
  3. Preserve non-athanor pi entries. src/sync/pi.ts rewrites only providers whose name starts with athanor-. Everything else in ~/.pi/agent/models.json (OpenAI, Anthropic, Ollama, OpenRouter, user customs) must round-trip untouched. Same for ~/.pi/agent/settings.json — only defaultProvider / defaultModel are touched, and only when a model is started as the active default.
  4. Pi sync shape follows config.router.enabled. Default (router.enabled: true): up to two aggregator providers — athanor-mlx and athanor-llama — both pointing at the ingress baseUrl, each listing only models of its runtime and carrying runtime-specific compat flags (MLX sets supportsDeveloperRole: false; llama-server doesn't). Providers with zero exposed members are suppressed. When router.enabled is false: each exposed model becomes its own pi provider athanor-<runtime>-<slug> with one baseUrl per model. Never emit both shapes. The CLI verbs are expose / hide; the underlying registry field is publish: boolean (storage name, kept stable for backward-compat of on-disk models.json).
  5. Runtime model id matches launch argument literally. mlx_lm.server compares the request's model field to whatever was passed as --model and falls back to a HuggingFace network lookup on mismatch. The pi model id we emit must equal the adapter's --model (MLX) or --alias (llama-server). Hub GGUF defaults to registry id (author/repo:file.gguf) unless the user set a custom piAlias different from slug. See src/adapters/model-id.ts, src/sync/pi.ts, and src/adapters/*.ts. pi's /model picker lists by id, not name.
  6. Pi context metadata reflects effective served context. src/sync/pi.ts must advertise the model's effective runtime context window from merged runtime config (mergedConfigFor(entry)), not only explicit per-model formula fields and not the model's theoretical maximum. pi should see what athanor will actually serve.
  7. MLX capability detection and flavor routing are separate axes. Two fields live on an MLX entry:
    • mlxCapabilities: ("vlm")[] — a detected fact about the model (does config.json advertise a vision tower?). Refreshed by ingestDiscovered and pull via detectMlxCapabilities() in src/discovery/scanner.ts. Safe to overwrite on re-scan.
    • mlxFlavor: "lm" | "vlm" — user intent about which server binary to launch. "vlm" routes to mlx_vlm.server; "lm" (or absent) routes to mlx_lm.server. Only set by athanor flavor <slug> lm|vlm (cmdFlavor in src/cli/commands.ts). Discovery and ingest must never touch it.

Read the full file on GitHub · 203 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 · 203 lines · 4,789 tokens per session scan A 7bbed45e5d8e

Subscribe to this mod's changes

athanor AGENTS.md is an instructions file published in the GitHub repository MylesBorins/athanor (20 stars, last pushed 11d ago), licensed Apache-2.0. It adds 4,789 tokens to every session, about $0.0239 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens