...
...
What is Generative UI?
I've been following the evolution of user interfaces for a while, and lately, the idea of "Generative UI" has really caught my attention. In short, it's about letting AI take over (partially or fully) the job of creating what you see on the screen. Instead of every button, layout, or widget being painstakingly designed by hand, an agent can decide what to show, how to organize things, and sometimes even how the whole interface is structured.
Types of Generative UI
From what I've seen, there are three main flavors of generative UI, each with its own pros and cons when it comes to developer control, flexibility, and how easy it is to maintain in the long run.
The main difference is how much freedom the UI has. But no matter which type, you can always decide how much control you want to give to the agent versus the programmer.
-
Static:
This is the most locked-down approach. The agent can only pick from a set of components that you've already built. Nothing unexpected will show up, but it's also the least flexible. -
Open-Ended:
At the other extreme, you let the agent send over any kind of HTML (or even iframes, raw content, etc.). This is super flexible, but it can get messy fast. -
Declarative:
This sits somewhere in the middle. There's a defined set of building blocks (like cards, lists, forms, widgets), and both you and the agent can use them to put together the UI. It's structured, but not as rigid as the static approach.
Specifications
There’s been a lot of new specs for declarative generative UI lately. Here are a few that stand out to me:
A2UI
Google’s take on the problem. It’s a declarative spec designed to play nicely with LLMs. Uses JSONL, supports streaming, and is meant to work across different platforms.
Open-JSON-UI
This one comes from OpenAI. It’s basically an open version of the schema they use internally for their own declarative generative UIs.
MCP-UI
A collaboration between Microsoft and Shopify. It’s a fully open standard that builds on MCP, using iframes to handle user-facing generative UI.