a2ui

Open-source generative UI framework: agents stream layout data, and apps render it with native components in React, Angular, Lit, Flutter, SwiftUI and Jetpack C

What is a2ui?

Open-source generative UI framework: agents stream layout data, and apps render it with native components in React, Angular, Lit, Flutter, SwiftUI and Jetpack Compose.

Overview of a2ui

What it is

A2UI (Agent-to-User Interface) is an open-source generative UI framework that provides a declarative JSON format for representing updatable agent-generated user interfaces. It includes a set of renderers that allow agents to generate or populate rich UIs across multiple platforms. The framework separates UI structure from implementation, enabling agents to send layout data that client applications render using native components from their own codebase.

Key features

  • Security first: A2UI uses a declarative data format, not executable code. The client maintains a catalog of pre-approved UI components, and the agent can only request components from that catalog.
  • LLM-friendly and incrementally updatable: The UI is represented as a flat list of components with ID references, making it easy for LLMs to generate incrementally and allowing progressive rendering.
  • Framework-agnostic and portable: The same A2UI JSON payload can be rendered on multiple clients built on different frameworks (React, Angular, Lit, Flutter, SwiftUI, Jetpack Compose).
  • Flexibility: An open registry pattern allows developers to map server-side types to custom client implementations, including secure iframe containers for legacy content.

Use cases

  • Dynamic Data Collection: An agent generates a bespoke form (date pickers, sliders, inputs) based on conversation context, such as booking a specialized reservation.
  • Remote Sub-Agents: An orchestrator agent delegates a task to a remote specialized agent (e.g., a travel booking agent) which returns a UI payload to be rendered inside the main chat window.
  • Adaptive Workflows: Enterprise agents generate approval dashboards or data visualizations on the fly based on the user's query.

Getting started

See the repository README for detailed instructions. The quickstart demo requires Node.js 18+, uv, and a Gemini API key: bash git clone https://github.com/a2ui-project/a2ui.git cd a2ui export GEMINI_API_KEY='your_gemini_api_key' corepack enable yarn install cd samples/client/lit yarn demo:restaurant

License and pricing

The license is Apache-2.0. The project is open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/a2ui-projecta2ui.svg)](https://yunodb.com/tools/a2ui-projecta2ui?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/a2ui-projecta2ui?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/a2ui-projecta2ui.svg" alt="Featured on YunoDB" height="20"></a>