alt.dog

Generative UI protocols explained

Five ways an agent gets an interface onto a screen: stream events, send a declarative description, ship HTML to a sandbox, or return data a developer's component draws.

Generative UI means an AI agent decides part of what appears on screen, beyond the text of its reply. The open question is who writes the interface and what crosses the wire. An agent can stream events a client interprets, describe components from a catalog, send a whole HTML page to run in a sandbox, or return data that the developer's own components render. The protocols below each pick one of those answers.

Generative UI approaches compared
What the agent sendsWho draws itTrust boundary
AG-UIA stream of typed events: text, tool calls, state snapshots and deltasThe client applicationThe client decides what each event does
A2UIDeclarative, flat, streaming JSON describing componentsA native renderer on the clientOnly components from the client's approved catalog
MCP AppsAn HTML resource, linked from a toolThe UI's own code, in a sandboxed iframeThe iframe sandbox and JSON-RPC over postMessage
ChatGPT UI (formerly Apps SDK)An MCP Apps resource, plus optional ChatGPT-only callsYour component in an iframe in ChatGPTThe iframe; capability checks
Vercel AI SDKTool calls and tool results as typed message partsThe developer's React componentsThe developer's code

AG-UI: an event stream between agent and app

AG-UI is an open protocol for the connection between an agent backend and a user-facing application. Its event reference groups events by purpose: lifecycle (RunStarted, RunFinished, RunError, StepStarted, StepFinished), text messages (TextMessageStart, TextMessageContent, TextMessageEnd), tool calls (ToolCallStart, ToolCallArgs, ToolCallEnd, ToolCallResult), and state (StateSnapshot, StateDelta as an RFC 6902 JSON Patch, MessagesSnapshot). Newer groups cover activity, reasoning, and subagents, and Raw and Custom carry anything else. AG-UI does not define components. It gives the client enough structure to render progress, tool calls, and shared state however it likes.

A2UI: describe the interface, let the client build it

A2UI, created by Google with contributions from CopilotKit and others, lets an agent send "declarative component descriptions" in a flat, streaming JSON format so a client can render them natively on web, mobile or desktop "without executing arbitrary code". The agent can use only pre-approved components from the client's catalog. Renderers exist for Angular, Flutter, Lit, React and more. Google's announcement frames it as an open project for agent-driven interfaces.

MCP Apps and MCP-UI: HTML in a sandbox

MCP Apps (SEP-1865, proposed on 21 November 2025) is an optional extension to the Model Context Protocol. A server declares UI templates as ui:// resources, and a tool points at one. The host renders the HTML in a sandboxed iframe, and the UI talks to the host with MCP's own JSON-RPC over postMessage. Servers also return text, so a host without UI support still gets an answer. The design came from MCP maintainers at Anthropic and OpenAI together with the creators of MCP-UI, the earlier community SDK that it builds on.

ChatGPT's UI: MCP Apps plus a bridge

OpenAI's developer documentation now calls these ChatGPT plugins; the Apps SDK name survives in its libraries and examples. Components run in an iframe beside the conversation, and the main bridge is the MCP Apps standard. window.openai adds calls the shared standard does not cover, such as checkout, file upload, and widget state. The documentation lists four display modes (inline card, inline carousel, fullscreen, and picture-in-picture) and recommends the smallest one that works.

Vercel AI SDK: tool results, your components

In the AI SDK, you define tools with an input schema and an execute function. On the client, each tool call arrives as a message part typed tool-<name> with a state such as input-available, output-available, or output-error, and you map it to a React component whose props match the tool's output. The model chooses when to call a tool; the developer wrote every component in advance.

What they share

In all five, the agent and the interface are separate programs. A model produces events, descriptions, or data, and a host program built by someone else decides how to draw them. That separation is what makes them safe to adopt: a host keeps control of what can appear. It also means the interface does not change unless a developer changes it. Alt takes the other route: its inhabitant, the program that talks with you in a browser tab on Qwen3-0.6B (a local model of about 350 MB), draws the whole screen with its own program, and your messages never go to a model server.

Drafted by Claude, an AI model made by Anthropic, working as a coding agent for Hraness, on 28 September 2026, from the linked sources. No review of this page is recorded. Prices and features of other products change often, so check the source before you rely on one.

Sources

  1. AG-UI events, AG-UI documentation
  2. AG-UI protocol repository, GitHub
  3. A2UI homepage
  4. Introducing A2UI, Google Developers Blog
  5. MCP Apps proposal (SEP-1865), Model Context Protocol blog, 21 November 2025
  6. MCP-UI documentation
  7. Build a ChatGPT UI, OpenAI developer documentation
  8. Generative user interfaces, AI SDK documentation

Related