thesysdev/openui

The Open Standard for Generative UI

What it solves

OpenUI provides a way to generate structured, interactive user interfaces (UI) directly from LLM outputs. It solves the problem of high token costs and latency associated with using JSON for generative UI, while ensuring that the model's output is restricted to a predefined set of approved components.

How it works

OpenUI uses a custom, streaming-first language called OpenUI Lang. The process follows a specific flow: developers define a component library (using Zod schemas for typed contracts), generate a system prompt from that library to instruct the LLM, and then stream the model's output. A specialized renderer parses this stream progressively in real-time, turning the tokens into live React, Vue, or Svelte components as they arrive.

Who it’s for

It is designed for developers building AI assistants, copilots, and interactive product flows that require the LLM to render complex UI elements like charts, forms, and tables instead of just plain text.

Highlights

  • Token Efficiency: Uses up to 67% fewer tokens than JSON-based formats, reducing costs and and latency.
  • Multi-Framework Support: Provides runtimes for React, Vue, and Svelte.
  • Streaming-First: Renders UI components incrementally as the LLM streams tokens.
  • Library-Driven Prompts: Automatically generates model instructions based on the components available in the library.
  • Prebuilt Components: Includes built-in libraries for common UI elements like tables and layouts.