Documentation
Build agent interfaces with 84 documented pieces.
32 primitives, 4 tool and reasoning surfaces, 6 navigation controls, 14 blocks, 12 compose primitives, and 15 copy-paste provider blocks. Browse examples and API references, then use the source registry for supported primitives. Provider block pages include full source and installation guidance.
Quick start
Install a standalone primitive from the component registry. For full conversation modules, use the monorepo React workspace until package publishing and verification are complete.
1. Set up shadcn
npx shadcn@latest init2. Add a primitive
npx shadcn@latest add https://agent-ui-27t.pages.dev/r/button.json3. Render the component
import { Button } from "@/components/ui/button"; export function App() { return <Button>Start conversation</Button>;}Reference
Browse by category. Every entry has a live preview; component pages add an API table, and block pages include the full source.
Primitives
32The building blocks: chat, streaming, markdown, code, and loading states.
- ButtonPolymorphic button with six visual variants, four sizes, and asChild composition.
- CardA bordered surface with header, title, description, content, and footer slots.
- CodeInline code with a muted background that matches prose and tables.
- MessageBubbleRole-aware chat bubble with avatar, display name, timestamp, and delivery status.
- ComposerCompound chat input with slots for providers, models, skills, attachments, search, thinking, and mentions.
- SimpleComposerA ready-made Composer with an input and send button.
- MessageListScrollable transcript with an ARIA live region, empty state, loading state, and auto-scroll.
- ChatShellComplete chat surface: transcript, composer, typing indicator, stop button, and error banner.
- MarkdownContentXSS-safe GFM renderer for headings, lists, tables, blockquotes, links, and inline code.
- CodeBlockSyntax-aware code surface with language label, optional line numbers, and copy-to-clipboard.
- SkeletonPulsing placeholder lines for pending messages and loading panels.
- StreamingTextToken reveal with an optional blinking caret for in-progress assistant replies.
- TypingIndicatorThree bouncing dots with a screen-reader status label.
- StopButtonAbort control that appears while a response is streaming.
- CancelledBadgeInline notice that marks a response the user cancelled.
- InputAccessible text input with focus, invalid and disabled states.
- TextareaResizable multiline input with native keyboard and form behavior.
- BadgeCompact status badges with semantic color variants.
- SeparatorDecorative or announced horizontal and vertical dividers.
- AvatarImage avatar with a stable, accessible fallback.
- ProgressNative progress indicator for determinate or indeterminate operations.
- SpinnerLoading status with an accessible label and reduced-motion behavior.
- AlertActionable contextual notices; destructive alerts are announced.
- TableSemantic responsive table for agent and model data.
- CheckboxNative checkbox supporting keyboard interaction and form submission.
- SwitchNative checkbox with switch semantics and focus styles.
- KbdKeyboard shortcut label with legible key typography.
- ScrollAreaKeyboard-focusable overflow container using native scrollbars.
- DialogAccessible native modal dialog, with title, description, content and close button.
- AccordionNative details and summary disclosures that work with keyboard and touch.
- SelectNative select input for form and model settings.
- SliderNative range input with min, max and step controls.
Tools & reasoning
4Render tool invocations, results, reasoning traces, and cited sources.
- ToolCallCardExpandable tool invocation card with status, arguments, result, error, and duration.
- ToolResultFormatted output block for a tool response, with monospace JSON handling.
- ThinkingBlockCollapsible reasoning trace for models that expose chain-of-thought summaries.
- SourceCardCitation card with title, hostname, snippet, and a safe external link.
Pickers & navigation
6Model menus, provider selectors, suggestions, feedback, history, and branches.
- ModelPickerSearchable model dropdown with keyboard navigation and provider hints.
- ProviderSelectorSegmented provider pills with logo, label, and pressed state.
- SuggestionChipsQuick-start prompt chips for empty chat states.
- FeedbackButtonsThumbs up/down controls for rating assistant responses.
- ConversationSidebarChat history rail with active state, timestamps, and a new-chat action.
- BranchPickerTab switcher for alternate response branches.
Hooks
1Headless state for sending, streaming, stopping, and clearing a conversation.
Blocks
14Pre-composed surfaces that combine primitives into complete UI regions.
- AgentStatusCompact lifecycle state badge with semantic status text.
- AgentErrorIn-context error card with optional retry action.
- AgentEmptyStateEmpty-state panel with a clear next action.
- AgentRunComposable run panel with a status and tools detail slot.
- AttachmentPreviewFile attachment chips with stable IDs and removal.
- ConversationWorkspaceResponsive shell with conversation history and composer.
- OpenUIMessageOptional official OpenUI renderer host for structured responses.
- AgentDashboardResponsive run metrics with typed data and status.
- AgentSettingsControlled provider/model settings with accessible native inputs.
- AgentCommandPaletteSearchable native command dialog with an action callback.
- OpenUIConversationComplete conversation workspace with OpenUI Lang assistant blocks and streaming controls.
- ChatGPTShellFull ChatGPT-style layout with conversation rail, messages, streaming state, and composer.
- ToolApprovalHuman-in-the-loop prompt that asks the user to approve or reject a tool call.
- CitationsPanelStacked source cards for grounded answers and research results.
Compose primitives
12The context, shell, and controls behind the 15 provider stage clones.
- ComposeProviderContext provider that owns text, model, toggles, send, and disabled state for a stage.
- ComposeShellFull-bleed stage frame with hero, footer, max-width, and stretch behaviour.
- ComposeCardAnimated prompt surface with border, shadow, entrance, and focus-within glow.
- ComposeTextareaAuto-resizing textarea wired to compose context; Enter sends, Shift+Enter breaks.
- ToolButtonIcon-only round button with active state and accessible label.
- ToolPillText pill for composer toggles such as web search, deep think, or tools.
- ComposeSendButtonSend control bound to compose state; disabled until text exists.
- ModelChipModel menu trigger with keyboard navigation, light tone, and top or bottom placement.
- SuggestionPillsPrompt suggestions as pills or as a two-column card grid.
- ComposeDisclaimerMuted provider disclaimer line for the bottom of a composer stage.
- useComposeRead and drive compose state from any child of ComposeProvider.
- createComposeFactories that pre-bind a provider's static config to a shell and context, plus an HOC variant.
Provider composes
15Copy-paste provider blocks, assembled from Agent UI compose primitives.
- openai-composeA faithful ChatGPT compose stage with the collapsible rail, rounded prompt bar, and public chrome.
- gemini-composeThe Gemini capsule composer with the greeting hero, gradient bloom, and pill-shaped prompt field.
- perplexity-composeAn answer-engine stage with a research rail, source cards, and the teal Sonar model menu.
- anthropic-composeClaude's warm parchment stage, serif greeting, and research/thinking composer controls.
- grok-composeGrok's stark monochrome stage with the Fast / Expert / Heavy model picker.
- mistral-composeLe Chat's orange-accented header, rounded prompt bar, and Mistral Large model menu.
- deepseek-composeDeepSeek's blue-tinted stage with DeepThink and Search toggles above the prompt.
- zai-composeZ.ai's framed canvas, template cards, and GLM model menu with a warm paper tint.
- kimi-composeMoonshot's KIMI stage with a project rail, skill tray, and K3 model picker.
- minimax-composeMiniMax Code's task rail, download pill, and rounded capsule prompt bar.
- mimo-composeMiMo's brutalist cream stage with oversized display type and a hard-shadow composer.
- cohere-composeCohere's enterprise research stage with pastel gradient blobs and the Command R model menu.
- meta-composeMeta AI's bloom mark, violet gradient headline, and soft rounded prompt card.
- microsoft-composeCopilot's parchment stage with the gradient ring composer and suggestion pills.
- qwen-composeQwen's gallery-white stage with a top-left model menu and search/thinking pills.
Frequently asked questions
How do I install Agent UI?
For standalone apps, initialize shadcn/ui and add a component from the Agent UI registry. Within the monorepo, use the @agent-ui/react workspace package with Tailwind CSS v4 source scanning. Package publication is a separate release step.
Does Agent UI work with Tailwind CSS v4?
Yes. All components ship as Tailwind utility classes with no runtime CSS-in-JS. Add @source "../node_modules/@agent-ui/react/src" (or the workspace path) to your global stylesheet so Tailwind emits the classes the library uses.
Does Agent UI support streaming AI responses?
Yes. useChat exposes isStreaming, stop, and error state; ChatShell renders a typing indicator and stop button; StreamingText reveals tokens with a reduced-motion-safe caret; and ToolCallCard tracks tool status from pending to success or error.
Can I use a single component without adopting the whole library?
Each library component has a direct export path. Basic primitives can also be copied individually through the source registry. Verify bundle output in your application before making size claims.
Which AI providers have compose blocks?
Agent UI ships 15 copy-paste provider compose blocks: OpenAI ChatGPT, Google Gemini, Perplexity, Anthropic Claude, xAI Grok, Mistral Le Chat, DeepSeek, Z.ai GLM, Kimi, MiniMax, Xiaomi MiMo, Cohere Coral, Meta AI, Microsoft Copilot, and Alibaba Qwen.
Machine-readable index: /llms.txt · sitemap.xml