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.
npx agentmods add instructions/skulitom/agentui/claude-mdgit clone --depth 1 https://github.com/skulitom/AgentUIWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01508 | $0.01508 |
| Opus 5 | $0.00754 | $0.00754 |
| Sonnet 5 | $0.00302 | $0.00302 |
| Haiku 4.5 | $0.00151 | $0.00151 |
Grade A, and why
AgentUI CLAUDE.md 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AgentUI
Interactive UIs for coding agents: an MCP server that lets any agent ask its human with sliders, forms, diffs and live previews instead of guessing.
- How to use the tools: skills/agentui/SKILL.md
- Why it is built this way: the design decisions and their evidence are in
the header comments of the files they affect — particularly
packages/server/src/core/{waiters,session,library}.ts,packages/server/src/web/preview.tsandpackages/ui/public/agentui/preview.js.
Working on it
pnpm build # shared -> ui -> server (vendors three.js, copies the shell into server/web)
pnpm test # 394 tests; the server suite runs against the real built binary over stdio
pnpm typecheck
pnpm build before running anything: the server serves the built shell, and
the installer registers the built dist/mcp.js by absolute path.
Examples in packages/server/examples/ are dogfood — each asks something real
about this project, so building the tool and using it are the same activity.
Things that will bite you
- Loopback is the entire security model, until it is not. There is no login
anywhere in this server: 127.0.0.1 is what makes it safe.
AGENT_UI_HOST=lan(or an explicit address) trades that for reachability and MUST carry the token inweb/access.ts— the shell, the preview origin AND the WebSocket upgrade. Anyone who reaches a widget can read what the agent attached and answer as you. It is off by default and prints what it is giving away. - stdout belongs to the MCP transport.
protectStdout()redirectsconsole.*to stderr and blocks stray writes; the transport gets the only remaining handle. A single stray print corrupts every message after it. - The preview frame is a second origin (shell port + 1). Sandboxing on one origin gives an opaque origin, and module imports then fail the CORS check — the DevTools error blames CSP and sends you the wrong way.
values_interimmust never wake a waiter. It is drag noise. If it wakesui_wait, one slider drag wakes the agent hundreds of times.touchedis replaced, not merged. Clearing a flag is how a user says "no opinion here" after poking a control.- Previews animate only agent-sourced changes.
update(values, meta)getsmeta.source;"user"frames must track 1:1 — animating under a live drag is the forbidden failure. The shell's motion tokens (--t-*instyles/tokens-and-base.css) are hand-mirrored inpackages/ui/public/agentui/motion.js; change both. - A visual must encode something the agent went and got.
sample,compareandbindrender in the SHELL, not the frame, and read local values — live at 60fps, nothing on the wire.sample.sourceis required on purpose: a table of invented numbers is worse than a sentence, and the field is what makes that visible instead of asking anyone to remember. - Closing has no message of its own. A tab learns a session ended from the
relayed
closedevent — nothing sends aclosedframe — so anything that ends a session (ui_close, the user dismissing it) reaches the browser only throughstore.ts's event case. Miss it and the page keeps offering controls the server has already stopped accepting. - A new control type is four edits, and the compiler names two of them. A
schema in
shared/src/spec/control-schemas.ts, a member of theControlunion, an entry inCONTROLS(spec/control-registry.ts), and an entry inCONTROL_INPUTS(ui/src/components/controls/index.tsx). Both registries are mappedRecords over the union, so a missing entry will not compile. Content kinds work the same way viaCONTENT_BLOCKSandBLOCK_RENDERERS. This used to be ~15 sites across 8 files, two of which failed silently. shared/src/vocab.jsis plain JS on purpose, and it is COPIED. The preview frame is a second origin with no bundler, so anything both halves must agree on (hint regexes,SELF_SHOWN, display rounding) lives there and is synced toui/public/agentui/vocab.jsby aprebuild/predevscript. The copy is checked in;vocab-sync.test.tscompares the two byte for byte.- One function decides whether a preview opens AND what goes in it.
planPreview(shared/src/preview-plan.js, synced to the frame) returns an ordered list of panels;shouldAutoPreviewis just "does any planned view draw". These used to be two implementations a test compared, and they disagreed — a "type_scale" control landed in the frame's font bucket while the gate said there was nothing to show, so the frame never opened. - A new preview view is two entries.
PREVIEW_VIEWSinpreview-plan.js(the vocabulary — label, accepted control types, and whether drawing it justifies opening a frame) andVIEW_IMPLSinpreview.js(the DOM). A test asserts the key sets match: a view withdraws: trueand no implementation opens a frame and then renders nothing, which is worse than not having it. - A preview can write back, and must do it through the shell's own path.
setValuesin the frame postsset_values;PreviewFramereplays it throughsetLocalValue/commit. Going around that would losetouched, animate under the user's finger, skip the interim throttle, and ignore whether the session is still open — every invariant lives on that path. - MCP tool schemas are shallow on purpose.
ui_askandui_createadvertise the containers and the enumerated vocabulary, not the full spec — inlining the real schemas costs ~5,000 tokens on every request. Detail comes fromui_schemaon demand. A size budget inmcp-e2e.test.tsguards it, and nothing exposed may use.default(): zod 4 emits defaulted fields as required, turning a convenience into a mandatory argument.
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.
- 2d ago First seen · 93 lines · 1,508 tokens per session scan A 2ac385b14b00
AgentUI CLAUDE.md is an instructions file published in the GitHub repository skulitom/AgentUI (0 stars, last pushed 27d ago), licensed MIT. It adds 1,508 tokens to every session, about $0.0075 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-31.
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).
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.
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.
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.
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).
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.