React components for agent applications
Build interfaces that think, act, and respond.
From a first streamed token to a completed tool run. A component system for agent conversations and generated experiences, built on React and designed to be yours.
The component library is in review. The next step is to run checks and verify the responsive layouts before release.
Local interactive demo, no AI backend
The details that make agent interfaces feel complete.
Build the entire interaction, not just the message bubble. Each piece has a clear purpose and composes with the rest.
A conversation that holds up
Stable transcript scrolling, accessible messages, streaming controls, and a composer that handles real input.
Make every tool step visible
Show what ran, what completed, what failed, and when a user needs to approve an action.
A canvas for real results
Render structured, interactive responses through an approved OpenUI component library.
Bring your own backend
Choose your provider, model and streaming transport. You own the agent logic and data.
Built for developers
Your model. Your logic. Your interface.
Agent UI doesn't decide how your model works. Pass your own conversation state and callbacks, then replace the sample response with a real stream. The component interface stays the same.
Start with the pieces
Use a primitive, a full chat surface or one of the provider composer examples.
Wire it to your agent
Pass messages, an async streaming iterator, and your existing model backend.
Own the experience
Style the components, register generated-UI blocks and handle actions in your app.
import { ChatShell, useChat } from "@agent-ui/react"; export function Conversation() { const chat = useChat({ onSend: async (text) => { const response = await fetch("/api/chat", { method: "POST", body: JSON.stringify({ text }), }); if (!response.ok) throw new Error("Request failed"); return response.text(); }, }); return ( <ChatShell messages={chat.messages} isStreaming={chat.isStreaming} onSend={chat.send} onStop={chat.stop} error={chat.error} /> );}Explore the library.
A searchable catalog with examples, API references, and copyable code.
The building blocks: chat, streaming, markdown, code, and loading states.
32 entriesTools & reasoningRender tool invocations, results, reasoning traces, and cited sources.
4 entriesPickers & navigationModel menus, provider selectors, suggestions, feedback, history, and branches.
6 entriesHooksHeadless state for sending, streaming, stopping, and clearing a conversation.
1 entriesBlocksPre-composed surfaces that combine primitives into complete UI regions.
14 entriesCompose primitivesThe context, shell, and controls behind the 15 provider stage clones.
12 entriesProvider composesCopy-paste provider blocks, assembled from Agent UI compose primitives.
15 entries84 documented entries, including reference components and 15 provider-specific compose examples.
Generative UI
Responses can become interfaces.
The OpenUI adapter lets you render model-generated structured content using components you register and trust. Keep the chat layout, tools and action policies under your control.
See the integration guideStructured blocks
Cards, metrics, forms and more, using your approved components.
Controlled actions
Events are handled by your application; generated content doesn't get unrestricted access.
Integration pattern
<ChatShell
messages={chat.messages}
renderMessage={(message) =>
<OpenUIMessage
renderer={Renderer}
library={library}
response={message.content}
/>
}
/>Illustrative composition; install and configure the official OpenUI renderer separately.
One foundation. Different conversations.
Adapt the familiar affordances of leading AI products using composable provider blocks.
Frequently asked questions
What is Agent UI?
Agent UI is a React component library for conversation interfaces, tool activity, provider selection, and reusable agent application blocks. The repository includes a component gallery and copyable provider compose examples.
Is a model or backend included?
No. The components work with your existing backend. The public previews use local example responses so you can try the interfaces without API keys.
Can I show generated interfaces in a conversation?
Yes. An optional OpenUI renderer adapter can display a registered component library inside ChatShell. Your app supplies the official OpenUI runtime, component definitions, and explicitly permitted actions.
How do I start using the components?
Browse the live gallery and API documentation, then use the source package within the monorepo or copy provider blocks through the registry. Verify dependency and publishing status before installing from a public package registry.
Build the interface around your agent.
Explore real examples, inspect the source and start composing your own.