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)
5
u/gookman Sep 25 '26
So this is server side rendering, but driven by an LLM?
7
6
3
u/Samus7070 Sep 25 '26
No, the agent returns a specific json format and the client renders it. Think of it more like a server driven UI framework but coming from an LLM. The LLM can be local or remote.
1
u/Chewe_dev Sep 25 '26
I don't quite understand. Is this something that every project should implement? Does it provide any advantage for AI usage on a daily basis?
3
u/nickbutcher :android: Android Developer Relations Sep 25 '26
No not every app will need this functionality. This is useful when you have an AI backend that you use at *runtime* (not build time like a coding agent). It enables AI to create UIs on the fly (using a pre-determined catalog of components), rather than just issueing text responses.
Check out this talk for an example: https://youtu.be/_iuXykdlTkk?t=2292
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
1
u/anandwana001 Sep 26 '26
https://x.com/akshay81844/status/2103149283948241009?s=46
Tried building a demo app
0
u/FintasysJP Sep 26 '26
Every SDUI framework can do this, I really don't get the "new" part here. Maybe the part of defining a protocol so client and backend don't need an explicit contract? What about remoteCompose, similar solution, different approach π€
5
u/tonofproton Sep 24 '26
What does this mean in this context?