Thesys Opens OpenUI, Cutting AI Interface Token Costs by 67%
Thesys open-sourced OpenUI, a streaming UI language that renders LLM output as live components using up to 67% fewer tokens than JSON.
Takeaways
- Thesys open-sourced OpenUI, a streaming generative UI framework under MIT license
- OpenUI Lang uses up to 67% fewer tokens than equivalent JSON across seven benchmark UI scenarios
- Latency drops from ~14s to 4.9s at 60 tok/s versus Vercel json-render and Google A2UI
- Ships React, Vue, Svelte, LangChain, React Email, and CDN browser-bundle packages
- Component library defines allowed output via Zod schemas, auto-generating the system prompt
- Scaffold instantly with
npx @openuidev/cli@latest createor try the playground
Getting an LLM to reliably produce UI has been one of the more painful corners of AI engineering. Most teams end up shipping massive JSON schemas over the wire, praying the model closes every bracket, and burning tokens on structural noise that has nothing to do with the actual interface. Thesys, the team behind the C1 generative UI platform, just open-sourced OpenUI, an MIT-licensed framework that replaces JSON with a compact streaming language designed specifically for model-generated interfaces.
OpenUI is a full-stack, renderer-agnostic Generative UI framework built around a compact, streaming-first language. It offers official React support with built-in component libraries and ready-to-use chat interfaces, plus community-supported integrations for other frameworks. OpenUI Lang uses up to 67% fewer tokens than JSON. The repo has crossed 8,300 stars and ships as a monorepo with adapters for React, Vue, Svelte, LangChain, and even React Email.
Why JSON kept breaking
The motivation is straightforward. Thesys has powered generative UI for 10,000+ developers through its managed platform C1, and at that scale kept hitting the same wall. JSON, the standard format everyone used for structured UI output, kept breaking in production. It was too verbose, so rendering felt slow. It was too rigid, so custom design systems fought against it.
OpenUI Lang is the answer: a compact, line-oriented language designed for LLMs to generate user interfaces, up to 67% more token-efficient than JSON-based alternatives. Instead of nested objects with quoted keys and escaped strings, the model emits a terse DSL that streams line by line into a renderer.
The pipeline in five steps
The architecture is a clean pipeline where your component library defines the entire surface area the model is allowed to touch: