what

The What framework for AI Agents

The What framework is designed to be the fastest way for an LLM or coding agent to build and ship a real web app. An app is just .html files plus one what.toml — no build step, no bundler, no separate API or client framework to wire up. Generate HTML, preview with the dev server, and ship via SSH, Docker, or static export.

The machine-readable reference

A complete, terse reference for generating What code lives at /static/llms.txt. Point your agent at it — it covers the full template syntax, the <what> block, the three state scopes, every client attribute, deploy flows, copy-paste app recipes, and the common mistakes to avoid.

One instruction that works: “Read https://getwhatnow.com/static/llms.txt, then build a <app> as What .html files.”

Why agents build faster here

  • No build step. You write HTML; the server renders it. There is nothing to compile, hydrate, or bundle.
  • One mental model. A request returns HTML, the page swaps it in. State lives on the server in three clear scopes: session (per user), wired (shared live), and per-request data.
  • No JavaScript to write. A small set of w-* attributes covers interactivity; the framework's runtime (what.js, ~16 KB gzipped) handles swaps, forms, validation, and live updates. There is no DOM library to learn and no client state to keep in sync.
  • Batteries included. Routing, database (SQLite / Cloudflare D1 / Supabase), auth, forms, validation, uploads, and email are built in — no packages to choose or configure.
  • One-command deploy. run-what deploy ships the same source to a VPS over SSH or as a Docker container — optionally backed by Cloudflare D1 + R2 — or exports a static build for any CDN (dynamic pages need the running server).

The workflow

run-what new myapp && cd myapp     # scaffold
# write pages under site/ (file path = URL), components under components/
run-what dev                         # hot-reload preview at http://localhost:8085
run-what build                       # static output in dist/   (or)
run-what deploy                      # deploy via SSH, Docker, or static export

Which tool for the job

NeedUse
Show server data in a pagefetch.x = "local:collection" + <loop>
Per-user state (cart, wizard step)session.* + w-set
State shared live across clientswired.* + w-set (WebSocket is automatic)
Persisted records / CRUDa collection + <form action="/w-action/<collection>">
Update part of a page on clickw-get/w-post + w-target
Tabs / accordion / modal.tab-group / <details> / w-modal-trigger — no JS

Example: a contact form that stores submissions

<!-- site/contact.html -->
<form method="post" action="/w-action/messages" w-boost w-reset>
  <input name="name" class="form-input" w-required placeholder="Your name">
  <input name="email" type="email" class="form-input" w-required w-type="email">
  <textarea name="body" class="form-textarea" w-required></textarea>
  <button class="btn btn-primary" type="submit">Send</button>
</form>

That's the whole feature. Submissions are stored in the messages collection. More recipes (mini CMS, live poll) are in /static/llms.txt.