Capital & Compute

What Is OpenUI? The Generative UI Framework Explained

OpenUI is the MIT-licensed generative UI framework from Thesys. Its OpenUI Lang streams 2.1x fewer tokens than JSON, not 3x. The hype, use cases, and rivals.

· ai· developer-tools· agents· By Capital & Compute
OpenUI Lang uses about half the tokens of json-render on every one of seven benchmark screens

OpenUI is a generative UI framework, which means the model decides at runtime which piece of interface best answers a request, then streams it. Ask “which products lost revenue this quarter?” and a plain chatbot returns a paragraph; an OpenUI app can return a ranked table and a trend chart built from your own design system.

The project’s own numbers are mostly honest, but the headline is the best case, and the bigger story is the competition it is chasing.

What is OpenUI?

OpenUI is the open-source generative UI framework on GitHub (thesysdev/openui), maintained by Thesys, a US company that also runs a managed generative UI service (its earlier API was called C1; the Thesys pricing page now sells it as OpenUI Cloud). The repository is MIT-licensed and had 10,221 stars and 706 forks on October 8, 2026, according to the GitHub API.

It has three parts, described in the project README:

  1. A component library. You define (or reuse) the components the model may use, with typed props written as Zod schemas. OpenUI generates the model’s system prompt from that library.
  2. OpenUI Lang. The model replies in this compact language instead of JSON or HTML. Each line declares one component.
  3. A streaming renderer. The client parses each line as it arrives and paints the interface progressively, in React, Vue, Svelte or Angular.

The safety model follows from the design. The model can only compose components you registered, and no generated code is executed, so a prompt-injected model cannot draw an arbitrary login form or run a script.

Two other things share the name. OpenUI5 is SAP’s Apache 2.0 JavaScript framework for enterprise web apps, unrelated to AI. wandb/openui is a separate Weights & Biases project from March 2024 that renders UI you describe in plain language. This post is about thesysdev/openui. The README also warns that OpenUI has no official cryptocurrency or token.

How does OpenUI Lang work?

Here is the contact form from the project’s benchmark samples, shortened to its first lines:

root = Stack([title, form], "column", "l")
title = TextContent("Contact Us", "large-heavy")
form = Form("contact", [nameField, emailField, phoneField, subjectField, messageField], formButtons)
nameField = FormControl("Name", Input("name", "Your full name", "text", ["required", "minLength:2"]))
emailField = FormControl("Email", Input("email", "[email protected]", "email", ["required", "email"]))

Three choices make it short. Arguments are positional, so prop names never repeat. Children are referenced by name rather than nested, so deep trees stay flat. And every line is a complete statement, so the renderer can draw title before form has finished streaming.

JSON formats spell out every key on every element. Vercel’s json-render streams the same form as JSON Patch (RFC 6902) operations, one line per element, each carrying "op", "path", "type" and "props". That is more robust to parse but costs tokens, and output tokens are the slowest and most expensive part of a model call.

Why is OpenUI getting so much hype?

The repository dates to December 2024, but the current product is younger. The @openuidev/react-lang package first appeared on npm on March 10, 2026, and OpenUI ranked #4 of the day on Product Hunt on March 11, 2026 under the tagline “The open standard for Generative UI”.

Since then:

  • Downloads grew 13x in five months. @openuidev/react-lang went from 46,761 npm downloads in April 2026 to 607,938 in September, per the npm downloads API. The framework-agnostic core, @openuidev/lang-core, logged 686,415 in September.
  • A dedicated model shipped. On September 7, 2026 Thesys published OUI-1 on Hugging Face, a fine-tune of Google’s DiffusionGemma 26B-A4B (26 billion parameters, 4 billion active) that writes OpenUI Lang. The model card reports 71.7% (132 of 184 runs) on Thesys’s own Generative UI Benchmark against 13.0% for the base model. That benchmark checks that screens are structurally valid, not that people can use them.
  • Named adopters. The repo’s ADOPTERS.md lists Productboard, Standard Metrics, Oodle, GAIA, prox and others, plus official integrations with LangChain, Mastra, assistant-ui and the Lynx cross-platform framework. Listing is self-submitted, so read it as “using it somewhere”, not as a case study.
  • A business around it. Thesys sells OpenUI Gateway (output validation and repair, provider fallback, an OpenAI-compatible API) and an early-access observability product, per openui.com.
OpenUI vs json-render npm downloads per month, April to September 2026Log-scale line chart. OpenUI react-lang grew from 46,761 downloads in April 2026 to 607,938 in September, about 13x. json-render core grew from 1,380,996 to 6,750,884, about 4.9x, and stayed about 11 times larger in September.10K100K1M10MApr 2026May 2026Jun 2026Jul 2026Aug 2026Sep 2026json-render core6.8MOpenUI react-lang607.9K
OpenUI vs json-render npm downloads per month, April to September 2026
Datejson-render coreOpenUI react-lang
2026-04-011.4M46.8K
2026-05-012M126.3K
2026-06-012.7M163.6K
2026-07-013.6M261.9K
2026-08-015.2M449.5K
2026-09-016.8M607.9K
Monthly npm downloads, April to September 2026: @openuidev/react-lang (OpenUI's React runtime) against @json-render/core (Vercel's competing framework). Log scale. npm counts include CI installs and mirrors, so read them as relative momentum, not users. Pulled October 8, 2026.Source: npm downloads API

The chart is the honest frame for the hype. OpenUI is growing faster in percentage terms, but Vercel’s json-render, which launched in January 2026, still pulled about 11x more downloads in September and has more GitHub stars (18,570). Google’s A2UI protocol sits between them at 16,630 stars. OpenUI is a fast-rising challenger, not the default.

Does the “67% fewer tokens” claim hold up?

Mostly, yes. The benchmark folder commits its sample outputs, so the counts can be checked. Re-tokenizing them with the same GPT-5 encoding (o200k_base) on October 8, 2026 reproduced the OpenUI Lang and json-render totals exactly: 4,800 against 10,180 tokens across seven screens.

Tokens per screen: OpenUI Lang vs json-render (OpenUI benchmark samples)Dumbbell chart of output tokens per screen. Simple table 148 vs 340. Chart with data 231 vs 520. Contact form 294 vs 893, the largest gap at 67 percent. Settings panel 540 vs 1,244. E-commerce product 1,166 vs 2,449. Pricing page 1,195 vs 2,487. Dashboard 1,226 vs 2,247, the smallest gap at 45 percent.json-render (JSON Patch)OpenUI Lang05001,0001,5002,0002,500Simple table340148Chart with data520231Contact form893294Settings panel1,244540E-commerce product2,4491,166Pricing page2,4871,195Dashboard2,2471,226
Tokens per screen: OpenUI Lang vs json-render (OpenUI benchmark samples)
Itemjson-render (JSON Patch)OpenUI Lang
Simple table340148
Chart with data520231
Contact form893294
Settings panel1,244540
E-commerce product2,4491,166
Pricing page2,4871,195
Dashboard2,2471,226
Output tokens per screen in the OpenUI benchmark samples, recounted with the o200k_base (GPT-5) tokenizer on October 8, 2026. Gold is OpenUI Lang, slate is the same screen as a json-render JSON Patch stream. Seven-screen total: 4,800 vs 10,180.Source: Capital & Compute recount of thesysdev/openui benchmark samples

Three caveats change how far to trust the headline:

  1. “67%” and “3x” are the best case. Only the contact form hits 67%. The dashboard saves 45%, and the seven-screen total is 52.8%, which is 2.1x fewer tokens, not 3x. The comparison page still prints “1x vs 3x” and “4.9s vs 14.2s”, which matches the contact form alone.
  2. The JSON was never written by a model. Per the benchmark README, GPT-5.2 generated OpenUI Lang once per screen, and the JSON versions were converted from that parsed output. That isolates format verbosity fairly, but a model prompted to write json-render natively could produce a different (larger or smaller) screen.
  3. The system prompt is not counted. The benchmark’s component-library prompt is 3,281 tokens and rides along on every request. Competing formats need a catalog prompt too, so this is not a hidden penalty, but it is the bigger number on the bill unless it is cached.

One smaller discrepancy: the Thesys C1 JSON sample files in the repo now total 9,650 tokens, not the 9,948 in the README, so the table appears to predate a regeneration. The direction is unchanged.

What does the token saving actually save?

Across the seven screens, an OpenUI screen averages 686 output tokens against 1,454 for json-render. Priced at list rates checked October 8, 2026 from this site’s AI model price tracker:

Model (output price per million tokens) 1,000 screens in OpenUI Lang 1,000 screens in json-render Saved per 1,000 screens
Claude Haiku 5.5 ($0.50) $0.34 $0.73 $0.38
Claude Sonnet 5.5 ($10) $6.86 $14.54 $7.69
GPT-5.6 Sol ($20) $13.71 $29.09 $15.37

The dollar saving is small. The 3,281-token prompt costs $6.56 per 1,000 uncached calls on Sonnet 5.5 at $2 per million input tokens, about the same as the whole output saving, and $0.33 once it is a cache read. So the real cost lever is prompt caching, not the output format.

Latency is where the format pays. At the 60 tokens per second the project assumes, the average screen finishes in about 11 seconds instead of 24, and the dashboard in about 20 instead of 37. In the project’s own GPT-5.2 run log, the dashboard took 16.5 seconds end to end. For a user watching a chart assemble, halving that wait matters far more than a few dollars. That is the same lesson this site found checking WebMCP’s token-savings claims: token numbers matter when they turn into time or money a reader can feel.

What are the best use cases for OpenUI?

The common thread in the adopter list and the project’s own guidance is structured data that a person wants to scan or act on, inside a conversation:

  • Analytics and observability answers. Oodle, per ADOPTERS.md, uses it to stream metrics, logs, traces and incident timelines as interactive UI. A question about a spike returns the chart, not a description of one.
  • Dashboards built on request. KPI cards plus a table plus a trend line, composed from your design system for the question asked. This is the dashboard scenario in the benchmark, and the one where the latency gain is largest in absolute seconds.
  • Dynamic forms. The model picks the fields a situation needs (a support ticket, a booking, an intake form) and the form posts through actions you define, such as submit:contact.
  • Product support and selectors. prox lists troubleshooters, selectors and calculators built from product manuals: the “which one should I buy” answer as a comparison card rather than a paragraph.
  • Copilots inside existing apps. Through the LangChain, Mastra and assistant-ui integrations, an agent you already run can emit OpenUI over the AG-UI event stream (the same protocol covered in whether you need Inngest with the Vercel AI SDK).

When not to use it. If the answer is a sentence, a short list or a code block, markdown is cheaper and clearer. If you need arbitrary, never-seen-before layouts or creative visuals, a fixed component registry is the wrong tool by design. And if your team already standardized on json-render or A2UI, the token saving alone rarely justifies a migration.

How does OpenUI compare with json-render, A2UI and C1?

Pick OpenUI when streaming speed in chat is the priority and you are fine with a Thesys-specific language. Pick json-render when you want the most-used option and plain JSON. Pick A2UI when agents from different vendors must render on web and native mobile clients.

Option Cost and licence Who maintains it Output format Best at
OpenUI Free, MIT (paid Gateway optional) Thesys OpenUI Lang (line DSL) Fastest streaming, chat UI included
json-render Free, Apache 2.0 Vercel Labs JSON / JSON Patch stream Adoption, web plus PDF, email and video targets
A2UI Free, Apache 2.0 a2ui-project (Google-originated) Declarative JSON protocol Cross-agent, native iOS and Android rendering
Thesys managed cloud (C1 API) Free tier of 3,000 calls a month, then from $49 a month Thesys C1 JSON Teams that want generative UI without hosting it

OpenUI hedges the format war itself: its @openuidev/a2ui package carries OpenUI Lang payloads over the A2UI protocol, so choosing OpenUI does not lock you out of A2UI clients.

How do you get started with OpenUI?

  1. Scaffold an app. Run npx @openuidev/cli@latest create --name genui-chat-app, add an OPENAI_API_KEY to .env, and npm run dev. This gives a working streaming chat with the built-in components.
  2. Try the playground first if you only want to see output: the OpenUI playground generates UI live from the default library.
  3. Register your own components. Define props with Zod, then generate the system prompt from that library, so the model only uses your design system.
  4. Cache the system prompt. At about 3,300 tokens for the default library it is the largest per-call cost; turn on your provider’s prompt caching.
  5. Pick the model on latency. Output speed sets how fast a screen appears. A cheap, fast model is often the better fit than a frontier one, and OUI-1 is an option if you want to self-host on one GPU (25.8 GiB at FP8, per its model card).

Frequently asked questions

Frequently asked questions

What is OpenUI?
OpenUI is an open-source, MIT-licensed generative UI framework from Thesys. An AI model writes OpenUI Lang, a compact streaming language, and the app renders it as charts, forms, tables and layouts from components the developer registered. It supports React, Vue, Svelte and Angular.
What is generative UI?
Generative UI is interface that an AI model assembles at runtime for each request, choosing and configuring components such as tables, charts or forms instead of replying only with text. Most frameworks, including OpenUI, restrict the model to a fixed set of approved components.
Does OpenUI really use 67% fewer tokens than JSON?
Only in its best case. In the project benchmark, recounted on October 8, 2026, OpenUI Lang used 4,800 tokens against 10,180 for json-render across seven screens, 52.8% fewer or about 2.1x. The 67% figure is the contact form alone.
Is OpenUI the same as OpenUI5?
No. OpenUI5 is an SAP JavaScript framework for enterprise web apps. OpenUI (thesysdev/openui) is an AI generative UI framework from Thesys. They are unrelated.
Do I need the OUI-1 model to use OpenUI?
No. OpenUI works with any chat model that follows its generated system prompt, such as OpenAI, Anthropic or Google models. OUI-1 is an optional open-weight model from Thesys for self-hosting.
Which is better, OpenUI or json-render?
OpenUI streams about half the tokens, so screens render faster. json-render is far more widely used, with about 11x more npm downloads in September 2026, and uses plain JSON. Choose OpenUI for latency-sensitive chat, json-render for ecosystem and familiarity.

Sources

Get each breakdown before it makes the rounds

You get one email when a new source-backed analysis goes live: what AI agents actually cost, which models are worth running, and what the benchmarks really mean. No hype.

No spam. Unsubscribe anytime.

← Back to Coding agents