What is Generative UI?
mainGenerative UI is a pattern where parts of the user interface are generated, selected, or controlled by an AI agent at runtime. Instead of static, predefined screens, agents can send UI state, structured UI specifications, or interactive UI blocks that the frontend renders in real time, allowing the interface to adapt to changing context and agent actions.
In the CopilotKit ecosystem, this is achieved through three patterns:
- Controlled Generative UI (AG-UI): High control, low freedom. You pre-build components and the agent chooses when to show them.
- Declarative Generative UI (A2UI + Open-JSON-UI): Shared control. The agent returns a structured UI description (cards, lists, forms) which the frontend renders.
- Open-ended Generative UI (MCP Apps): Low control, high freedom. Uses Model Context Protocol (MCP) or custom UIs.