@tom_doerr: Generates UI with 67% fewer tokens than JSON https://github.com/thesysdev/openui…

X AI KOLs Timeline Tools

Summary

OpenUI is an open-source framework for generative UI that uses a streaming-first language to produce UI with up to 67% fewer tokens than JSON, including a React runtime and chat interfaces.

Generates UI with 67% fewer tokens than JSON https://t.co/B8crPruCiS https://t.co/rcPiZ2wFbw
Original Article Export to Word Export to PDF
View Cached Full Text

Cached at: 05/13/26, 04:23 PM

Generates UI with 67% fewer tokens than JSON

https://t.co/B8crPruCiS https://t.co/rcPiZ2wFbw


thesysdev/openui

Source: https://github.com/thesysdev/openui

OpenUI — The Open Standard for Generative UI

OpenUI — The Open Standard for Generative UI

Build License: MIT Discord

thesysdev%2Fopenui | Trendshift

OpenUI is a full-stack Generative UI framework — a compact streaming-first language, a React runtime with built-in component libraries, and ready-to-use chat interfaces — that is up to 67% more token-efficient than JSON.

⚠️ Important Notice: OpenUI has no official cryptocurrency, token, or coin.

Any token or coin using the OpenUI name on Pump.fun or any other platform is not affiliated with, endorsed by, or created by this project or its maintainers.

Do not purchase any cryptocurrency claiming to be associated with OpenUI.


Docs · Playground · Discord · Contributing · English · 中文


What is OpenUI

OpenUI Demo

At the center of OpenUI is OpenUI Lang: a compact, streaming-first language for model-generated UI. Instead of treating model output as only text, OpenUI lets you define components, generate prompt instructions from that component library, and render structured UI as the model streams.

Core capabilities:

  • OpenUI Lang — A compact language for structured UI generation designed for streaming output.
  • Built-in component libraries — Charts, forms, tables, layouts, and more — ready to use or extend.
  • Prompt generation from your component library — Generate model instructions directly from the components you allow.
  • Streaming renderer — Parse and render model output progressively in React as tokens arrive.
  • Chat and app surfaces - Use the same foundation for assistants, copilots, and broader interactive product flows.

Quick Start

npx @openuidev/cli@latest create --name genui-chat-app
cd genui-chat-app
echo "OPENAI_API_KEY=sk-your-key-here" > .env
npm run dev

This is the fastest way to start with OpenUI. The scaffolded app gives you an end-to-end starting point with streaming, built-in UI, and OpenUI Lang support.

What this gives you:

  • OpenUI Lang support - Start with structured UI generation built into the app flow.
  • Library-driven prompts - Generate instructions from your allowed component set.
  • Streaming support - Update the UI progressively as output arrives.
  • Working app foundation - Start from a ready-to-run example instead of wiring everything manually.

How it works

Your components define what the model can generate.

flowchart LR
    A["Component Library"] --> B["System Prompt"]
    B --> C["LLM"]
    C --> D["OpenUI Lang Stream"]
    D --> E["Renderer"]
    E --> F["Live UI"]
  1. Define or reuse a component library.
  2. Generate a system prompt from that library.
  3. Send that prompt to your model.
  4. Stream OpenUI Lang output back to the client.
  5. Render the output progressively with Renderer.

Try it yourself in the Playground — generate UI live with the default component library.

Packages

PackageDescription
@openuidev/react-langCore runtime — component definitions, parser, renderer, prompt generation
@openuidev/react-headlessHeadless chat state, streaming adapters, message format converters
@openuidev/react-uiPrebuilt chat layouts and two built-in component libraries
@openuidev/cliCLI for scaffolding apps and generating system prompts
npm install @openuidev/react-lang @openuidev/react-ui

Why OpenUI Lang

OpenUI Lang is designed for model-generated UI that needs to be both structured and streamable.

  • Streaming output — Emit UI incrementally as tokens arrive.
  • Token efficiency — Up to 67% fewer tokens than equivalent JSON (see benchmarks).
  • Controlled rendering — Restrict output to the components you define and register.
  • Typed component contracts — Define component props and structure up front with Zod schemas.

Token efficiency benchmarks

Measured with tiktoken (GPT-5 encoder). OpenUI Lang vs two JSON-based streaming formats across seven UI scenarios:

ScenarioVercel JSON-RenderThesys C1 JSONOpenUI Langvs Vercelvs C1
simple-table340357148-56.5%-58.5%
chart-with-data520516231-55.6%-55.2%
contact-form893849294-67.1%-65.4%
dashboard224722611226-45.4%-45.8%
pricing-page248723791195-52.0%-49.8%
settings-panel12441205540-56.6%-55.2%
e-commerce-product244923811166-52.4%-51.0%
TOTAL1018099484800-52.8%-51.7%

Full methodology and reproduction steps in benchmarks/.

Documentation

Detailed documentation is available at openui.com.

Repository structure

openui/
├── packages/
│   ├── react-lang/       # Core runtime (parser, renderer, prompt generation)
│   ├── react-headless/   # Headless chat state & streaming adapters
│   ├── react-ui/         # Prebuilt chat layouts & component libraries
│   └── openui-cli/       # CLI for scaffolding & prompt generation
├── skills/
│   └── openui/           # Claude Code skill for AI-assisted development
├── examples/
│   └── openui-chat/      # Full working example app (Next.js)
├── docs/                 # Documentation site (openui.com)
└── benchmarks/           # Token efficiency benchmarks

Good places to start:

Community

  • Discord — Ask questions, share what you’re building
  • GitHub Issues — Report bugs or request features

Adopters

A list of organizations and projects using OpenUI is maintained in ADOPTERS.md. If you’re using OpenUI, please consider adding your organization — it helps the project gain momentum and helps other adopters find peers using OpenUI in similar contexts.

Contributing

Contributions are welcome. See CONTRIBUTING.md for contribution guidelines and ways to get involved.

Agent Skill

OpenUI ships an Agent Skill so AI coding assistants (Claude Code, Codex, Cursor, Copilot, etc.) can help you scaffold, build, and debug Generative UI apps using OpenUI Lang.

Install

# With the skills CLI (works across all agents)
npx skills add thesysdev/openui --skill openui
 
# Manual — copy into your project
cp -r skills/openui .claude/skills/openui

The skill covers component library design, OpenUI Lang syntax, system prompt generation, the Renderer, SDK packages, and debugging malformed LLM output.

Star History

Star History Chart

License

This project is available under the terms described in LICENSE.

Similar Articles

Simpler self hosted alt to Open WebUI

Reddit r/LocalLLaMA

OvertChat is a simpler, polished self-hosted alternative to Open WebUI for local AI models, featuring single Docker compose setup, built-in web search, and Kokoro TTS, all MIT licensed.