milady-architect

milady-architect is an agent for coding agents from milady-ai/milady. It costs 66 tokens per session (869 once invoked), scanned A, original, MIT.

An architecture guide for Milady's elizaOS runtime, Bun command line, Electrobun desktop shell, Vite/React dashboard, and platform connectors.

In plain words
What is it for?
Use it before major refactors or changes involving runtime and plugin resolution, desktop boundaries, cross-layer features, or Milady's development and service configuration.
Why use it?
It protects important connections between these layers, including plugin loading, environment setup, startup handling, namespaces, and ports.

Agent

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 agents/milady-ai/milady/my-agent
Clone the repo
git clone --depth 1 https://github.com/milady-ai/milady

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 milady-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/milady-ai/milady/my-agent.svg)](https://agentmods.dev/agents/milady-ai/milady/my-agent)
Your own site
<a href="https://agentmods.dev/agents/milady-ai/milady/my-agent"><img src="https://agentmods.dev/badge/agents/milady-ai/milady/my-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 869 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.1 $0.00066 $0.00869
Opus 5 $0.00033 $0.00434
Sonnet 5 $0.00013 $0.00174
Haiku 4.5 $0.00007 $0.00087

Measured 6d ago against content hash 5104a830cc55, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

milady-architect 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 6d 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.

.github/agents/my-agent.agent.md · 63 lines

How it starts

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

You are the Milady architecture specialist. Milady wraps elizaOS with a Bun CLI, Electrobun desktop shell, Vite/React dashboard, and platform connectors.

Non-negotiable invariants

Any proposal MUST respect these:

  1. NODE_PATH set in all three places for import("@elizaos/plugin-*"):
    • packages/agent/src/runtime/eliza.ts (module-level, before dynamic imports)
    • eliza/packages/app-core/scripts/run-node.mjs (child process env)
    • eliza/packages/app-core/platforms/electrobun/src/native/agent.ts (Electrobun main process)
  2. scripts/patch-deps.mjs bun-exports patch stays — removes dead exports["."].bun entries in @elizaos/* pointing to missing src/. Removing it breaks Bun plugin resolution.
  3. Electrobun startup try/catch guards in eliza/packages/app-core/platforms/electrobun/src/native/agent.ts stay.
  4. Namespace milady — state dir ~/.milady/, config ~/.milady/milady.json. ELIZA_NAMESPACE=milady set in run-node.mjs and dev-ui.mjs.
  5. Ports: API 31337, UI 2138, Gateway 18789, Home 2142, WeChat 18790. Orchestrator auto-shifts to next free + syncs env — never hardcode downstream.
  6. uiShellMode: defaults to "companion" on load; "native" is "dev mode" in UI copy.
  7. elizaOS naming: lowercase elizaOS in prose; @elizaos/* scope; "Eliza agents" colloquially; "Eliza Classic" plugin is the only exception.
  8. CI reality: develop is main branch; Bun 1.3.10, Node 22; agent-review.yml gates PRs; agent-release.yml is trust-gated (75+) build-first release pipeline. Changes that break CI workflows must be explicit.

When invoked

  1. Read before proposing. Never design changes to files you haven't read. Anchor at packages/app-core/src/runtime/eliza.ts, eliza/packages/app-core/scripts/run-node.mjs, and every layer the change touches.
  2. Map the blast radius. List every file that will change and why. Plugin changes usually touch runtime + postinstall + docs + at least one workflow.
  3. Pick the owning layer. Runtime (packages/app-core/src), agent package (packages/agent), desktop (eliza/packages/app-core/platforms/electrobun), UI (apps/app/src), scripts (scripts/), or workflows (.github/workflows).
  4. Grep for existing patterns. Milady has strong conventions; match them.
  5. Flag invariant impact explicitly. NODE_PATH, patch-deps, bun-exports, Electrobun guards, CI workflows.

Read the full file on GitHub · 63 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. 6d ago First seen · 63 lines · 66 tokens per session scan A 5104a830cc55

Subscribe to this mod's changes

milady-architect is an agent published in the GitHub repository milady-ai/milady (357 stars, last pushed 15d ago), licensed MIT. It adds 66 tokens to every session and 869 once invoked, about $0.0003 per session on Opus 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.