Introduction
read as.md ggui is an open protocol that lets AI agents render interactive UI on the fly. Your agent describes what it needs in natural language; ggui compiles a typed component and returns it as an MCP-Apps resource (ui://ggui/render/<sessionId>) that your host mounts. The UI reports back typed events the next time your agent calls ggui_consume.
You run the whole protocol yourself with ggui serve — no account, no cloud, no API key. A managed hosted endpoint that speaks the same wire is coming after the preview.
How ggui works
Reading as an LLM?
Choose your path
Section titled “Choose your path”Agent Builder — wire ggui into an MCP server
Section titled “Agent Builder — wire ggui into an MCP server”Start with the Quickstart (5 min, local). Then read the MCP protocol reference, browse the Cookbook, or copy a worked example agent.
Host — connect a client to your server
Section titled “Host — connect a client to your server”Connect Claude Desktop to a ggui serve you run yourself. Other MCP hosts use the same self-hosted endpoint with their own config shape.
Operator — self-host the stack
Section titled “Operator — self-host the stack”ggui serve is the local deployment guide. Reference deploys covers Docker, Fly.io, and Render. The Self-hosted Registry is the artifact layer for private gadgets and blueprints.
Agentic App Builder — make your SaaS agent-drivable
Section titled “Agentic App Builder — make your SaaS agent-drivable”If you ship a SaaS or webapp and want agents to drive it without rewriting the frontend, see Agentic App Builders.
LLM agent reading docs
Section titled “LLM agent reading docs”Every page is also raw markdown at the same slug. Start with /llms.txt (index, per the llms.txt convention), /llms-full.txt (single-file dump of the whole site), or /llms-small.txt (compact variant). See the LLM-agent track for the full machine-readable surface.
How ggui works
Section titled “How ggui works”A typical exchange is four moments — handshake → render → interact → consume. See How ggui works for the full walk-through with code.
Key concepts
Section titled “Key concepts”A few terms recur across the docs:
- GguiSession — one rendered UI, minted by
ggui_render(render is the verb; the object it creates is a GguiSession). Each GguiSession carries a stablesessionId. - Contract — the typed agreement between agent and renderer for one GguiSession.
- Tool — an agent-side action (
ggui_render,ggui_consume, …) — the MCP surface. - Gadget — a renderer-side capability (Leaflet map, Stripe Checkout, …) the LLM can compose with.
- Blueprint — a cached recipe — a UI promoted from one-shot to “use this exact screen next time.”
→ Glossary for everything else.
What’s on this site
Section titled “What’s on this site”- How ggui works — narrative walk-through for builders
- Quickstart — zero to a running local server in 5 minutes
- Protocol — Overview · Envelopes · Bootstrap · Conformance · Version policy
- API — MCP · WebSocket · MCP Apps · OAuth (self-hosted) · Ops MCP · Rate limits
- SDK — React · Gadgets · Marketplace · Self-hosted Registry
- CLI — Overview ·
ggui dev·ggui serve - Connect a host — Claude Desktop · Other MCP hosts
- Self-hosted — Pair a client app · Reference deploys
- Cookbook — Feedback form · Multi-step wizard · Real-time dashboard · Auth-gated UI · Theming · Error handling · Chat · Testing
- Architecture — Overview · Agent backend · Audience routes · MCP services · Event System · UI Generator
- Design System — Design Tokens
- Examples — Claude Agent · OpenAI · Gemini · OpenClaw · Generic MCP
- Glossary — terminology reference
- Troubleshooting — common errors and what they mean