A2UI
Agent-to-User Interface
Let AI agents generate rich, interactive UIs through safe declarative JSON. No executable code. No XSS. Just components your app already trusts.
How A2UI Works
Your agent describes the UI it wants in JSON. Your app renders it using pre-approved components from its own catalog. The agent never touches the DOM.
Why A2UI?
Security First
Agents generate JSON, not code. No eval(), no innerHTML, no XSS vectors. Your component catalog is the security boundary.
Framework Agnostic
Same A2UI JSON renders on React, Vue, Svelte, Flutter, iOS, or Android. Write once, render anywhere.
LLM Friendly
Simple JSON structure that LLMs generate reliably. Supports progressive/streaming rendering for real-time agent UIs.
17 Standard Components
Every component maps to your existing UI library. Built-in support for shadcn/ui and Radix UI.
AINative A2UI Packages
@ainative/ai-kit-a2ui-core
AlphaFramework-agnostic core library. Protocol types, JSON Pointer (RFC 6901), WebSocket transport, component registry. Zero dependencies.
@ainative/ai-kit-a2ui
AlphaReact renderer with shadcn/ui component mappings. 11 of 17 components implemented.
@ainative/ai-kit-nextjs-a2ui
PlannedNext.js renderer with Server Components, Server Actions, and Streaming SSR support.
Build Agent UIs That Users Trust
A2UI is open source and built on Google's A2UI v0.8 protocol. Contribute, extend, or just use it.