A2UI is a declarative UI format that describes what to render. AG-UI is the transport layer that carries those descriptions between an agent and your application. CopilotKit’s AG-UI implementation is the fastest path to putting A2UI in front of users today: any agent framework CopilotKit supports can emit A2UI and have it rendered in a supported app surface with no custom transport code.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/a2ui-project/a2ui/llms.txt
Use this file to discover all available pages before exploring further.
Source of truth: This guide mirrors the key steps from CopilotKit’s A2UI docs. For Google ADK-specific setup, see the Google ADK + A2UI guide. Always refer to the CopilotKit docs for the latest API surface.
Supported Agent Frameworks
CopilotKit’s AG-UI implementation supports every major agent framework out of the box:Google ADK
Native ADK agents with A2UI surface rendering
LangGraph
LangGraph agents and stateful graph workflows
CrewAI
Multi-agent CrewAI pipelines
Mastra
Mastra agent and workflow runtime
Custom Python Services
Any Python service that can emit A2UI operations
Custom TypeScript Services
Any TypeScript/Node.js service that emits A2UI operations
Setup in Three Steps
Set up CopilotKit
Install CopilotKit into your application with the agent framework of your choice. The CopilotKit init command scaffolds everything you need:Alternatively, follow the CopilotKit quickstart to wire it into an existing project. This is standard CopilotKit setup — there is nothing A2UI-specific about this step.
Enable A2UI
Backend
Turn on A2UI inCopilotRuntime. For dynamic-schema flows, inject the render_a2ui tool so your agent can produce A2UI surfaces:app/api/copilotkit/route.ts
agents array:a2ui_operations directly (rather than using the injected tool), a minimal config is enough:Frontend
The A2UI renderer activates automatically once you adda2ui configuration to CopilotKitProvider. This guide uses React/Next.js snippets; CopilotKit also supports A2UI through Vue, Angular, and React Native/headless clients.To add an optional theme:app/layout.tsx
theme prop — A2UI will render using the Basic Catalog’s default styles.Add custom components (optional)
A2UI ships with a built-in Basic Catalog (Text, Image, Card, and more) that gives you a working surface immediately. The real power is extending it with your own React components from your design system, so the agent can compose interfaces from primitives you already trust.A catalog has three pieces:Agents will now see your custom components alongside the built-ins and can use them in any A2UI surface they emit.
- Definitions — Zod schemas with natural-language descriptions. This is what the agent reads in its system prompt. Note that for client-side functions, the client determines the function’s execution boundary (such as
clientOnlystatus) at runtime by reading its configuration from the active catalog definition. - Renderers — Typed React components, one per definition. This is what the user sees.
- Registration — Pass the catalog through the provider so the A2UI renderer knows how to draw your components.
1. Define component schemas
Create platform-agnostic definitions using Zod. Thedescription field is injected into the agent’s system prompt so the LLM knows when to reach for each component:lib/a2ui/definitions.ts
2. Create React renderers
Map each definition to a React component.createCatalog is generic over the definitions type, so the props your renderer receives are type-checked against the Zod schema — a typo in props.text is a compile error:lib/a2ui/renderers.tsx
catalogId is the stable handle the agent uses to target this catalog. Set includeBasicCatalog: true to keep the built-in components available alongside yours, or omit it to render only your components.3. Pass the catalog to CopilotKit
app/layout.tsx
Advanced Usage
For the full A2UI integration surface — multiple catalogs, fine-grained agent scoping, theming hooks, and advanced patterns — refer to CopilotKit’s official documentation:- CopilotKit A2UI docs — full BYOC reference, multiple catalogs, theming hooks.
- Google ADK + A2UI guide — ADK-specific setup walkthrough.
Next Steps
A2UI Composer
Build widgets visually in the A2UI Composer playground.
Transports Reference
Understand how A2UI messages map onto AG-UI transport events.
Defining Your Own Catalog
Go deeper on catalog structure and security considerations.
v0.9.1 Specification
Read the full underlying A2UI protocol specification.