What If Your LLM Could Return Real UI Instead of Just Text?
You've probably built something where a model generates a response, and then you spend the next few hours parsing that response, mapping it to components, and praying the JSON doesn't break halfway through the stream. OpenUI is an attempt to fix that at the source: a compact, streaming-first language for model-generated UI, with runtimes for React, Vue, Svelte, and Angular.
What It Does
OpenUI is a full-stack, framework-agnostic Generative UI framework built around a language called OpenUI Lang. Instead of asking a model to emit JSON that you then translate into components, OpenUI has the model emit OpenUI Lang directly—a compact format designed for streaming output—and a renderer parses and renders it progressively as tokens arrive.
The architecture is straightforward. You define or reuse a component library, generate a system prompt from that library, send the prompt to your model, and stream the OpenUI Lang output back to the client. A framework-agnostic core powers first-party runtimes for React, Vue, Svelte, and Angular. React additionally ships built-in component libraries (charts, forms, tables, layouts) and ready-to-use chat interfaces. The same foundation is meant to cover assistants, copilots, and broader interactive product flows.
Why It's Cool
-
The token savings are real and measurable. The README claims OpenUI Lang uses up to 67% fewer tokens than JSON. For anything running at scale, that's not a rounding error—it's a meaningful reduction in cost and latency per request, and it compounds every time a user interacts with your app.
-
Streaming is the design constraint, not an afterthought. Most structured-output approaches treat streaming as a problem to solve after the fact—you buffer, you hope the JSON is valid, you render when it's done. OpenUI Lang is built for progressive rendering from the start, so the UI updates as tokens arrive. That's a fundamentally different developer experience when you're building chat interfaces.
-
The prompt is derived from your components. This is the clever part. You don't hand-write instructions about what the model can generate—you generate the system prompt from the component library you allow. Fewer opportunities for the prompt to drift out of sync with what your renderer actually supports.
-
Framework-agnostic core, first-party runtimes. You're not locked into React to get the benefits. The core is shared, and the runtimes for Vue, Svelte, and Angular are first-party rather than community ports, which suggests the maintainers intend to keep them in step.
-
The scaffold gets you to a working app fast. The CLI creates an end-to-end starting point with streaming, built-in UI, and OpenUI Lang support already wired up—useful when you want to evaluate the approach before committing to it.
One honest caveat: the README includes a notice that OpenUI has no official cryptocurrency, token, or coin, and that any asset using the name is unaffiliated. It's a strange thing to have to say, but worth knowing if you go searching for the project and find something that looks off.
How to Try It
The fastest path is the CLI:
npx @openuidev/cli@latest create --name genui-chat-app
That scaffolds an app with streaming, built-in UI, and OpenUI Lang support already in place. From there, the flow is:
- Define or reuse a component library.
- Generate a system prompt from that library.
- Send the prompt to your model.
- Stream OpenUI Lang output back to the client.
- Render it progressively with the renderer.
If you'd rather poke at it before installing anything, there's a playground at openui.com/playground. The full docs live at openui.com, and the source is at github.com/thesysdev/openui. The project is MIT licensed and has a Discord if you want to ask questions directly.
Final Thoughts
OpenUI is aimed at developers building model-driven interfaces—chat assistants, copilots, anything where the model's output needs to become something more than a wall of text. The token efficiency and streaming-first design are the practical draws; the framework-agnostic core means you're not forced into a particular stack. It's early enough that you'll want to read the docs carefully and check how the runtimes for your framework are holding up, but if you've been hand-rolling a parser between your model and your components, this is worth a look before you write another one.
Follow @githubprojects for more developer tools and open source projects.