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
2
u/kokeroulis Sep 25 '26
In simple terms form the android app you might ask the LLM
"On saturday 26 of September, what are the 10 hottest cities in the USA".
a2ui is probably using prompt engineering in order to say to the LLM:
"Please reply to the request of the user by using the specific format. Your reply should not be free text but it much observe and follow that schema exactly!
{{schema}}
The user question is:
{{question from client with the weather}}
"
then LLM emits the json and the server is validating, if there is a schema violation, it sends the error back to the LLM and asks for a retry.
For the a2ui to work you need the following connections:
a2ui question on mobile -> a2ui on backend -> backend to llm (Chatgpt, claude, gemini etc) -> au2i response received by mobile -> mobile renders the response based on the components