OpenUI Conversation
Use the official @openuidev/react-lang Renderer with a createLibrary result to render structured assistant messages. The host application owns model transport, tool permissions and action authorization.
OpenUIConversation ships with a full API table, a copyable example, and accessibility notes.
Renderer adapter preview
A UI library for building AI agent interfaces with React.
Connect the official OpenUI Renderer to render real OpenUI Lang.
Installation
Install the package once, then import OpenUIConversation from its direct entry point or from the root.
pnpm add @agent-ui/reactimport { OpenUIConversation } from "@agent-ui/react/blocks/openui-conversation";Tailwind CSS v4 users: add @source "../node_modules/@agent-ui/react/src" to the global stylesheet so the library utilities are generated.
Usage
The example below is the same code that renders the preview. Copy it, swap in your own handlers, and ship.
import { OpenUIConversation } from "@agent-ui/react";import { Renderer } from "@openuidev/react-lang"; <OpenUIConversation messages={messages} renderer={Renderer} library={library} />API reference
Every prop OpenUIConversation accepts, its type, default, and behaviour.
| Name | Type | Default | Description |
|---|---|---|---|
| messages | ChatMessage[] | — | Conversation history. |
| renderer | React.ComponentType<OpenUIRendererProps> | — | Official OpenUI Renderer. |
| library | Library | — | Registered OpenUI component library. |
| onOpenUIAction | callback | — | Allowlisted custom and built-in action handler. |
| toolProvider | provider | — | Authorized query or mutation tools. |
| isStreaming | boolean | — | Current message streaming state. |
Accessibility
OpenUIConversation composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.
4 lines · copy-ready