Overview
Build agents that respond with interactive interfaces made from your components.
Build an agent that answers with charts, forms, tables, and dashboards made from your own components, instead of plain text or Markdown.
Quickstart
To create a new agent app, run the OpenUI CLI and customize the project it generates. You need Node.js 20 or later:
npx @openuidev/cli@latest createHow it works
OpenUI works with any agent framework and chat UI. The agent writes its responses in OpenUI Lang, and the chat UI renders them with the OpenUI renderer. The agent loop, tools, and conversation stay the way they are.
Every agent needs two changes:
- The backend adds instructions generated from the component library to the agent's system prompt, so the model writes OpenUI Lang.
- The chat UI renders the streamed OpenUI Lang with the renderer, and sends user interactions in the generated interface back to the agent.
For a step-by-step walkthrough of one turn, read the full explanation.
Set up the backend
Set up UI generation
Define the component library and add its generated instructions to the agent.
Tools: agent-side vs. UI-side
Fetch data in the agent before it responds, or let the generated UI fetch it live.
Conversation history
Send earlier turns, tool results, and user actions back to the model.
Agent frameworks
Complete guides for the Vercel AI SDK, LangGraph Platform, Vercel Eve, and Pi.
Choose a chat UI
Compare the options to see what each one handles for you.
Agent Interface
OpenUI's complete React chat UI, with threads, streaming, tool activity, and actions built in.
assistant-ui
Keep assistant-ui in charge of the conversation while OpenUI renders the assistant's responses.
CopilotKit
Add OpenUI rendering to an application whose chat is built with CopilotKit.
Custom chat UI
Connect an existing message list and composer directly to the OpenUI renderer.
Run it in production
Route model requests through Gateway to correct invalid OpenUI Lang as it streams and fail over to another provider when one is unavailable. See OpenUI in production for Autofix, Reliability Monitoring, and deployment.