showcase/shell-docs/src/content/docs/concepts/generative-ui-overview.mdx
Generative UI in CopilotKit is the set of primitives that let an agent decide what appears on the screen — from rendering a specific React component you've built, to composing layouts from a catalog, to embedding sandboxed UI shipped by an MCP server.
Six primitives. Each one solves a different problem.
| Primitive | What it does |
|---|---|
| Components as Tools | Register a React component with useComponent; the agent calls it as a tool and CopilotKit renders it inline with typed props. |
| Tool Call Rendering | Wrap your agent's existing backend tool calls in custom UI cards with useRenderTool (live status, arguments, results). |
| State Rendering | Subscribe to the agent's streamed state and re-render UI as values arrive. |
| Reasoning | Render the model's reasoning tokens inline as a first-class message type (default card, or fully custom). |
| A2UI | Render UI from a declarative schema the agent emits, composed against a catalog you register. Two flavors: Dynamic Schema (LLM generates the schema) and Fixed Schema (you author the schema, agent supplies data). |
| MCP Apps | Embed UI that an MCP server ships alongside its tools, rendered in a sandboxed iframe. No frontend renderer required. |
Match the row that sounds like your situation:
| You want to… | Use |
|---|---|
| Let the agent render a specific React component you've already built | Components as Tools |
| Brand the cards CopilotKit draws for your agent's existing backend tools | Tool Call Rendering |
| Update UI as the agent's state changes (progress, drafts, dashboards) | State Rendering |
| Surface the model's thinking chain in the chat | Reasoning |
| Let the agent compose layouts from a catalog you define | A2UI — Fixed Schema if the surface is known, Dynamic Schema if it isn't |
| Embed someone else's MCP-hosted UI in the chat | MCP Apps |
These primitives sit along a spectrum from author-controlled to agent-invented. Same React app, same runtime, same AG-UI protocol — the choice is per-feature, not per-product.