OpenUI SDK

API reference for the documented surfaces of @openuidev/react-lang, @openuidev/react-headless, @openuidev/react-ui, and @openuidev/react-email.

The OpenUI SDK is split into packages that build on each other:

  • @openuidev/react-lang — Core runtime. Define component libraries with Zod schemas, generate system prompts, parse OpenUI Lang, and render streamed output to React. This is the foundation — you need it for any OpenUI integration.

  • @openuidev/react-headless — Headless chat state management. Provides ChatProvider, thread/message hooks, streaming protocol adapters (OpenAI, AG-UI), and message format converters. Use this when you want full control over your chat UI.

  • @openuidev/react-ui — Prebuilt chat layouts (Copilot, FullScreen, BottomTray) and two ready-to-use component libraries (general-purpose and chat-optimized). Depends on both packages above. Use this for the fastest path to a working chat interface.

  • @openuidev/react-email — API reference for the pre-built email templates library and prompt options.

  • @openuidev/cli — Command-line tool for scaffolding new OpenUI chat apps and generating system prompts or JSON schemas from library definitions.

Packages

On this page