a2ui-project/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.
What it solves
Generative AI agents often struggle to present rich, interactive interfaces to users, especially when those agents operate remotely or across different platforms. A2UI solves this by providing an open standard that allows agents to "speak UI" safely, ensuring that the interface is treated as data rather than executable code.
How it works
Agents generate a declarative JSON payload that describes the intent of the UI—such as a button or a text field—rather than sending raw code. This payload is sent to a client application, which uses a pre-approved "catalog" of native components to render the interface. Because the agent can only request components from this trusted catalog, the system remains secure while allowing for dynamic, incremental updates to the UI as a conversation progresses.
Who it’s for
It is designed for developers building agent-powered applications across multiple platforms (such as Flutter, Angular, React, or SwiftUI) who need a secure, portable way to render agent-generated interfaces. It is particularly useful when the agent is remote or third-party, as it prevents the execution of arbitrary code.
Highlights
- Security-first design: Uses a declarative data format instead of executable code to prevent security risks.
- Cross-platform compatibility: Separates UI structure from implementation, allowing the same JSON payload to render on different frameworks.
- Incremental updates: Supports efficient, partial UI updates, making it ideal for responsive, conversational experiences.
- Flexible integration: Includes an open registry pattern to map server-side types to custom client-side widgets or secure containers.
- Broad ecosystem support: Provides SDKs and renderers for Python, TypeScript, Dart/Flutter, and Swift.
Related
- Project
- Project
- Project
- Project