Build Generative UI Apps with A2UI & CopilotKit Agents A2UI, a framework-agnostic standard for declaring UI intent, now lets agents generate interfaces at runtime from a developer's existing component catalog, with CopilotKit built on the AG-UI protocol carrying A2UI operations to the client as typed events. A2UI's Basic Catalog ships 18 general-purpose primitives across layout, display, input and containers, and most production apps define custom catalogs; the setup works with any AG-UI-compatible agent framework, including Google ADK, LangChain, Mastra and Strands. The approach matters because it moves agent-user interaction from walls of text to interactive UI while keeping rendering inside the developer's design system. Agent-User Interactions are now evolving from text exchanges to rich UIs. Until recently, most conversations looked like this: User: "Find me a holiday package to Bali in March." Agent: six packages in prose, each with dates, hotel, flights, price User: "The five-night one with breakfast." Agent: "Here's the link. You can book it on the operator's site." Agents could plan the trip, but everything came back as walls of text. They had no standard way to render a selectable list of packages, a map of the destinations, or a date picker to carry you through the rest of the booking, inside the conversation itself. Generative UI is the layer that lets agents build interfaces at runtime, shaped by what each request needs - giving users a rich, interactive experience. Implementing that takes two pieces: a way to describe the UI and an agentic stack that connects your agent to your application and renders that UI. Generative UI covers a spectrum of approaches, from using predefined higher order components, to enabling your AI agent to have the flexibility to decide how to build the UI. At the controlled end, you build each component ahead of time, and the agent picks which one to render and with what data. It's brand-safe but it does not allow for deep customization and personalization based on the user’s intent. At the open end, the agent returns a raw UI program written in HTML, Javascript and/or Dart that renders inside a sandboxed iframe. That covers anything you did not plan for, at the cost of a surface that drifts from your design system and executes code a model wrote. A2UI https://a2ui.org/ works through the entire spectrum. It participates in controlled generation with decision models https://developers.googleblog.com/fast-reliable-a2ui/ like Typesafe’s Jev and also open-ended code generation that may output A2UI JSON messages. The declarative mode, where agents assemble pre-declared components and functions, is the most popular. A2UI is the framework-agnostic standard for declaring UI intent, so local or remote agents can generate your UI from your existing component catalog using a common language. Frontend developers can now ship the building blocks once, and the agent composes them for each request. The Basic Catalog https://a2ui.org/reference/components/ ships 18 general-purpose primitives across layout, display, input, and containers. The agent can compose entirely different interfaces from the same 18 primitives, depending on what the request needs. The Basic Catalog is deliberately sparse, so most production apps define their own custom catalog https://a2ui.org/guides/defining-your-own-catalog/ . A custom component can be anything your frontend already renders, including a live map the agent fills with coordinates while your renderer draws the route. CopilotKit is built on AG-UI Agent-User Interaction Protocol https://github.com/ag-ui-protocol/ag-ui , which supports A2UI payload and provides Agent SDKs across many agentic backends. Your agent emits A2UI operations. AG-UI carries them to the client as typed events. When the user takes any action, the values are sent back along the same stream. A2UI works with any AG-UI compatible agent. Frameworks like Google ADK, LangChain, Mastra and Strands are all AG-UI compatible, so the setup is identical whichever one your agent runs on. Setup comes down to two things: connecting your agent to CopilotKit, and defining which components the agent is allowed to use. Using Google ADK as the example, the ag ui adk package wraps any ADK agent and serves it as an AG-UI endpoint on FastAPI: python from fastapi import FastAPI from google.adk.agents import LlmAgent from ag ui adk import ADKAgent, add adk fastapi endpoint root agent = LlmAgent name="flight agent", model="gemini-3.8-flash", instruction="Help users find and book flights. Call generate a2ui to show results.", adk agent = ADKAgent adk agent=root agent, app name="flights", user id="demo user", use in memory services=True, app = FastAPI add adk fastapi endpoint app, adk agent, path="/" On the app side, you register that endpoint with the CopilotKit runtime at /api/copilotkit . It's a few lines of standard setup, covered in the Google ADK quickstart https://docs.copilotkit.ai/google-adk/quickstart?agent=bring-your-own setup-copilot-runtime , and it needs nothing A2UI-specific. A2UI itself turns on from the client, where your components already are. Define what the agent is allowed to draw, map each definition to a renderer, and pass the catalog to the CopilotKit provider. js import { CopilotKit, CopilotChat } from '@copilotkit/react-core/v2'; import { createCatalog, type CatalogDefinitions, type CatalogRenderers, } from '@copilotkit/a2ui-renderer'; import { z } from 'zod'; const catalogDefinitions = { FlightCard: { description: 'A flight result with airline, times, and stops.', props: z.object { airline: z.string , departs: z.string , arrives: z.string , stops: z.number , } , }, } satisfies CatalogDefinitions; const catalogRenderers = { FlightCard: MyFlightCard, // your React component } satisfies CatalogRenderers