# Repository Briefing: thesysdev/openui
> Source: https://repoforai.com/repo/thesysdev/openui (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/thesysdev/openui
- **Official Docs / Website**: https://www.openui.com
- **Category**: Chat UI & AI Apps (聊天界面与 AI 应用)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (94/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: @openuidev/react-lang@1.2.1 (2026-12-04) — https://github.com/thesysdev/openui/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: CLI, API
- **Momentum**: 16,734 ★ total (+191 24h / +1,200 7d) · 1,150 forks
- **Topics**: `agents`, `generative-ui`, `ai`, `agent`, `javascript`, `llm`, `ag-ui`, `langchain`, `mastra`, `react`
- **When to Use**: Best for: Teams building assistants that need to stream charts, forms, or other interactive UI from an approved component library, especially React teams that can reuse the prebuilt chat surface. Skip if: Plain text or fixed tool-result layouts already meet the product need, the pipeline must remain native JSON, or the team needs a turnkey non-React chat interface rather than a rendering SDK.

## Overview
```text
### Architecture & Core Mechanics
OpenUI is a TypeScript monorepo that separates the model-facing format from frontend rendering. The framework-agnostic @openuidev/lang-core package owns parsing, runtime evaluation, types, and prompt generation. A component library defines the permitted UI vocabulary through Zod schemas. That library drives the system prompt; the backend sends the prompt to the model and streams OpenUI Lang output to a renderer, which resolves it into registered components as output arrives.

React, Vue, Svelte, and Angular have first-party rendering bindings, but chat scaffolding and bundled component libraries are concentrated in React. react-headless separates chat state, streaming adapters, and message conversion from presentation; react-ui adds prebuilt layouts and components. AG-UI streaming through the LangChain/LangGraph integration and A2UI with OpenUI Lang payloads are separate integration paths, not prerequisites for the core renderer.

### Key Capabilities & Differentiators
OpenUI Lang lets an assistant stream charts, forms, tables, and layouts instead of waiting for a complete response before rendering structured UI. Teams can use React's bundled components or register their own. The monorepo also includes React Email definitions with HTML export and assistant-ui tool renderers. The core flow does not prescribe a model family, but teams should validate that their chosen model produces usable OpenUI Lang streams for their component set.

In seven scenarios measured with tiktoken using the GPT-5 encoder, OpenUI Lang consumed 4,800 tokens in total, versus 10,180 for Vercel json-render and 9,948 for Thesys C1 JSON: reductions of 52.8% and 51.7%, respectively. The dashboard was 45.4% smaller than the Vercel payload, while the contact form was 67.1% smaller. These are output-token counts for specific payloads, not measurements of model accuracy, end-to-end latency, or total request cost.

### Trade-offs & Limitations
Compared with Vercel json-render, OpenUI trades a familiar JSON representation for a more compact language and its associated parser and tooling. That trade is attractive when UI payload size matters, but less so when an existing stack relies on native JSON inspection or processing. Evaluate A2UI separately if interoperability is the main goal: @openuidev/a2ui transports OpenUI Lang component payloads, so verify that the receiving clients can consume them.

Component registration constrains what the model can render, but it does not authorize actions behind forms or buttons. Keep authorization and data validation on the application side. Because the prompt is generated from the library, changes to component contracts warrant testing the prompt and renderer together, including malformed or interrupted streams. React offers the shortest path to a prebuilt chat experience; for Vue, Svelte, or Angular, plan for more work on the surrounding chat UI. MIT licensing permits commercial use, but does not cover model-provider terms.

### Hardware & Deployment Guide
For an end-to-end starting point, run `npx @openuidev/cli@latest create --name genui-chat-app`. In an existing React app, use `@openuidev/react-lang` for rendering and add `@openuidev/react-ui` if you want the bundled UI. A backend or edge function that only generates prompts can use `@openuidev/lang-core`. The root workspace uses pnpm and declares Node.js `^20.19.0 || >=22.12.0`; the script-tag bundle provides a no-build embedding option.

You can host the app and rendering stack yourself while sending generation requests to an external model API; running the SDK does not require local inference. Plan backend capacity around concurrent streams and test browser rendering with realistic payloads. In the supplied release series, lang-core 1.2.1 lets `JSONSchemaDef.type` accept arrays so generated specs with named unions type-check as `LibrarySpec`; react-lang 1.2.1 picks up that dependency. In react-ui 0.20.3, line and area charts leave gaps for missing or invalid values rather than plotting them as zero.
```

## Key Capabilities
```text
- Component contract: Zod schemas describe the registered components and drive generation of model instructions.
- Runtime split: lang-core handles parsing, evaluation, types, and prompt generation; React, Vue, Svelte, and Angular bindings render progressively.
- Chat integration: react-headless supplies state and stream adapters; react-ui supplies prebuilt layouts and two component libraries.
- Protocol integration: LangChain and LangGraph helpers stream through AG-UI; @openuidev/a2ui carries OpenUI Lang component payloads.
- Measured payload size: Across seven scenarios, OpenUI Lang uses 4,800 tokens versus 10,180 for Vercel json-render and 9,948 for Thesys C1 JSON.
- Adoption paths: Start with the CLI scaffold, install individual packages, or use the browser bundle for script-tag, CDN, or iframe embeds.
```

## Quick Start / Clone
```bash
npx @openuidev/cli@latest create --name genui-chat-app
```
