Skip to content
Agent UI

Documentation

Build agent interfaces with 56 documented pieces.

15 primitives, 4 tool and reasoning surfaces, 6 navigation controls, 3 blocks, 12 compose primitives, and 15 copy-paste provider blocks. Component pages include a live preview, a copyable example, and a complete API table; block pages include the full source and a shadcn install command.

Quick start

1 · Install

bash
pnpm add @agent-ui/react

2 · Register Tailwind

css
@import "tailwindcss";
@source "../node_modules/@agent-ui/react/src";

3 · Render

tsx
import { ChatShell, useChat } from "@agent-ui/react";
 
export function App() {
const chat = useChat({ onSend: reply });
return <ChatShell {...chat} onSend={chat.send} />;
}

Reference

Browse by category. Every entry has a live preview; component pages add an API table, and block pages include the full source.

Primitives

15

The building blocks: chat, streaming, markdown, code, and loading states.

Hooks

1

Headless state for sending, streaming, stopping, and clearing a conversation.

Compose primitives

12

The context, shell, and controls behind the 15 provider stage clones.

Provider composes

15

Copy-paste provider blocks, assembled from Agent UI compose primitives.

Frequently asked questions

How do I install Agent UI?

Install the workspace package with pnpm add @agent-ui/react, import the component you need, and make sure your Tailwind CSS v4 entry file includes @source for the library. Every docs page includes an exact import and a runnable example.

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?

Every export is tree-shakeable and available through a direct path such as @agent-ui/react/message-bubble. Named imports from the root work too, and unused components are removed by modern bundlers.

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