Skip to main content
AINative Moonshot LabsExperimental

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.

17
Components
96%
Test Coverage
0
Dependencies

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.

Agent output (JSON)
// Agent generates safe JSON
{
"type": "Container",
"children": [
{ "type": "Heading", "text": "Hello!" },
{ "type": "Button", "label": "Get Started",
"action": "navigate:/signup" }
]
}
Your app renders
// Rendered using your own components
import { A2UIRenderer } from
'@ainative/ai-kit-a2ui';
<A2UIRenderer
spec={agentOutput}
registry={componentCatalog}
/>
// Renders: Heading + Button
// using YOUR shadcn/ui components

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.

Text
Implemented
Heading
Implemented
Button
Implemented
Container
Implemented
TextField
Implemented
CheckBox
Implemented
Slider
Implemented
Tabs
Implemented
List
Implemented
ChoicePicker
Implemented
Divider
Implemented
Icon
Planned
Image
Planned
Video
Planned
AudioPlayer
Planned
Modal
Planned
DateInput
Planned

AINative A2UI Packages

@ainative/ai-kit-a2ui-core

Alpha

Framework-agnostic core library. Protocol types, JSON Pointer (RFC 6901), WebSocket transport, component registry. Zero dependencies.

$ npm i @ainative/ai-kit-a2ui-core
429 tests, 96% coverage

@ainative/ai-kit-a2ui

Alpha

React renderer with shadcn/ui component mappings. 11 of 17 components implemented.

$ npm i @ainative/ai-kit-a2ui
70 tests passing

@ainative/ai-kit-nextjs-a2ui

Planned

Next.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.