Native A2UI Renderer for iOS/Android/HarmonyOS. High performance streaming Generative UI. Custom Components, Styles and more.
Native A2UI Renderer for iOS/Android/HarmonyOS. High performance streaming Generative UI. Custom Components, Styles and more.
This project is under active development and evolving rapidly. Contributions, feedback, and discussions are warmly welcome.
Released on 2026-09-04
AGenUI.setRuntimeConfig(_:), which accepts a JSON string of runtime switches from the host so behavior can be toggled remotely. Call it once during SDK initialization, before any surface renders.borderPixelAlignment switch (default on).line-height Measurement Rework: Text measurement now carries the resolved absolute line-box height, matching the render side exactly. An explicit line-height defines the line box even when smaller than the font's natural metrics, and white-space no longer affects line-height resolution.font-weight Catalog Coverage: All three platforms now accept the normal / medium / bold keywords and numeric 100–900 weights, as either a JSON number or an integer string, with platform caveats documented in the catalog.onBlankCheckResult now reports the component-tree size at detection time. Breaking change: the signature becomes onBlankCheckResult(_ surface:isBlank:componentCount:).trackInfo — never reaching listeners.AGenUI is an A2UI SDK that simultaneously supports iOS, Android, and HarmonyOS. Built on and fully implementing the A2UI v0.9 protocol open-sourced by Google, it renders the streaming data of LLM-generated interactive UI in real time on mobile devices. Under the hood, it is powered by a cross-platform shared C++ core engine, while the three-platform rendering engines consume the component protocol dispatched by the core engine and perform drawing using native system capabilities.
AGenUI leverages native system UI capabilities to render interactive cards, forms, lists, images, media players, and more, delivering a high-performance, smooth user experience.
AGenUI adopts a shared C++ core engine + three-platform component rendering engines design. The C++ layer implements capabilities shared across all three platforms, including streaming data parsing, virtual component tree management, render data caching, theme/style resolution, and component change diffing. The C++ layer synchronizes the parsed component protocol to the three-platform rendering engines to trigger drawing.
| Path | Contents |
|---|---|
core/ |
C++ core engine — parser, differ, layout, Function Call framework |
core/include/ |
Public C++ API consumed by platform bridging layers |
platforms/ios/ |
iOS component renderer + Objective-C bridge |
platforms/android/ |
Android component renderer + JNI bridge |
platforms/harmony/ |
HarmonyOS component renderer + NAPI bridge |
playground/ |
Three-platform demo apps for development & debugging |
scripts/ |
Build scripts for each platform |
The following 18 components implement the A2UI protocol specification and are supported on all three platforms.
| Component | Description |
|---|---|
Text |
Styled text with variants (h1–h5, body, caption, etc.) |
Image |
Network image with scale modes and rounded corners |
Icon |
Icon rendered via Unicode / SVG mapping |
Divider |
Horizontal or vertical separator |
Video |
Native video player with seek and auto-hiding controls |
AudioPlayer |
Audio player with progress bar |
Button |
Tappable button that triggers Action events |
Row |
Horizontal flex container |
Column |
Vertical flex container |
Card |
Shadowed card container |
List |
Scrollable list with static or template-driven children |
Tabs |
Tab bar with switchable panels |
Modal |
Native dialog overlay |
TextField |
Text input with optional validation |
CheckBox |
Boolean toggle |
Slider |
Numeric range input |
ChoicePicker |
Single / multi-select picker |
DateTimeInput |
Date and time picker |
The following 4 components are bundled with the SDK but are not part of the A2UI protocol specification.
| Component | Description |
|---|---|
Table |
Data table with Yoga sub-layout |
Carousel |
Image / content carousel |
Web |
Embedded WebView |
RichText |
HTML rich text rendering |
The following 3 components are registered and applied in the Playground to demonstrate integrating custom components via the API.
| Component | Description |
|---|---|
Chart |
Bar, line, and pie charts |
Markdown |
Markdown rendering with streaming support |
Lottie |
Lottie animation playback |
You can register your own components at runtime using the same API — see the Quick Start section.
The repository root includes agenui_catalog.json, a self-contained (freestanding) Catalog JSON Schema file conforming to the A2UI v0.9 specification. All external $refs have been inlined — it can be used standalone with no external dependencies.
Coverage:
Table, Carousel, Web, RichText), plus 3 Playground example components (Chart, Markdown, Lottie)Styles (general style properties) and TextStyles (text-specific style properties) — both extended by AGenUIHow to use:
When integrating an LLM Agent, supply this file's content or its hosted URL as the catalogId in the supportedCatalogIds field of A2UI ClientCapabilities. The Agent will use this Schema as a constraint to generate strictly conformant A2UI JSON messages, ensuring the renderer correctly parses and renders all dispatched UI components.
The skills/a2ui-generation/ directory ships a standalone A2UI generation Skill that can be mounted into any Agent that supports the Agent Skills mechanism (e.g. Claude Code, Cursor, Codex, Gemini CLI, Windsurf, GitHub Copilot, etc.). It guides the LLM — via the Skill's built-in design rules and constraints — to turn a natural-language query into A2UI protocol messages (updateComponents / updateDataModel) that AGenUI can render directly.
One-command install (recommended)
npx skills add AGenUI/AGenUISupports 55+ AI coding agent runtimes, including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, GitHub Copilot, and more.
Manual install
git clone https://github.com/AGenUI/AGenUI.git
cp -r AGenUI/skills/a2ui-generation ~/.claude/skills/For other runtimes, copy the
skills/a2ui-generation/directory to the corresponding skills directory (e.g.~/.cursor/skills/,~/.codex/skills/).
After installation, describe the UI you want through a query in your agent. The Skill drives the LLM to emit A2UI v0.9–conformant JSON protocol.
Different LLMs may produce somewhat different results when generating A2UI output. We recommend trying a few models against your own scenarios and picking the one that fits best.
AGenUI Studio is a local, bring-your-own-key workbench that turns natural-language descriptions into renderable A2UI protocol — with a browser UI for streaming generation, live protocol preview, validation, and one-tap push to the AGenUI Playground on a real device via QR code. It builds on the open-source A2UI generation Skill (reusing its design rules and validator) and supports multiple LLM providers (DeepSeek, Qwen, GLM, OpenAI, Gemini, and more) and runs entirely on your machine.
npx agenui-studioSee playground/studio/README.md for installation, configuration, and architecture details.
| Platform | Toolchain |
|---|---|
| Android | Android Studio Hedgehog+, NDK 27.3.13750724, API 35 SDK, JDK 11 |
| iOS | Xcode 15+, CocoaPods, CMake |
| HarmonyOS | DevEco Studio 4.0+, ohpm |
All build scripts live in the scripts/ directory. The C++ engine in core/ is compiled automatically — no separate preparation step is needed.
Android
# Release AAR (default)
./scripts/android/build.sh
# Debug AAR
./scripts/android/build.sh --debug
# Release AAR + native debug-symbol companion (see "Native debug symbols" below)
./scripts/android/build.sh --with-symbols
# Publish to local Maven (~/.m2)
./scripts/android/build.sh --publish-local
# Publish debug AAR to local Maven
./scripts/android/build.sh --debug --publish-local
# Publish to remote Maven (requires MAVEN_URL / MAVEN_USERNAME / MAVEN_PASSWORD env vars)
./scripts/android/build.sh --publish-maven
# Clean before building
./scripts/android/build.sh --cleanThe AAR is written to dist/android/release/.
Native debug symbols (Android, opt-in)
For symbolicating release crashes on the host, run ./scripts/android/build.sh --with-symbols. The release build then:
-Wl,--strip-all so the linker output retains DWARF info.lib.so.debug via objcopy --only-keep-debug (CMake POST_BUILD), then strips the .so and links them via .gnu_debuglink..so.debug files into -symbols.aar alongside the regular release AAR, under build/outputs/aar/.The release AAR size is unaffected — AGP strips the .so before packaging anyway. The .so.debug suffix follows the GNU/LLVM convention (o
No open issues yet, or sync has not completed.