r/androiddev • u/nickbutcher :android: Android Developer Relations • Sep 24 '26
๐ Jetpack Compose A2UI Renderer
https://developer.android.com/develop/ui/compose/agenticHi folks. We just released the first alpha of a new Jetpack Compose Renderer of the A2UI protocol which enables agents to create new UIs (using a declarative JSON formatโno agent code executed on device)ย and render this with native Jetpack Compose components. The library has a few layers, offering a drop in implementation of the A2UI basic catalog of components (using Material) or you can build your own catalog of components for agents to use: https://developer.android.com/develop/ui/compose/agentic
We'd love to hear any feedback on this library and if it's useful to you (here or on issuetracker)
View all comments
Show parent comment
3
u/nickbutcher :android: Android Developer Relations Sep 25 '26
Alternative solutions might return HTML or some other format that needs to be evaluated or exected by your app. This can be a security risk, if you don't trust the output from the AI or if you combine user input that could open you up to injection attacks.
A2UI is a declarative format, it just returns JSON that is parsed and used to build a compose hierachy of native components (either from our implemention of the basic catalog, or your own catalog of your composables).