Typescript/React Library for AI Chat
Product · Documentation · Examples · Discord · Contact Sales
assistant-ui is an open-source TypeScript/React library to build production-grade AI chat experiences fast.
The fastest path is the CLI, which scaffolds a Next.js app or adds the styled components to an existing project:
npx assistant-ui@latest create # new project
npx assistant-ui@latest init # add to existing projectOr install the packages directly:
npm install @assistant-ui/react @assistant-ui/ai-sdk"use client";
import { AssistantRuntimeProvider } from "@assistant-ui/react";
import { useChatRuntime } from "@assistant-ui/ai-sdk";
import { Thread } from "@/components/assistant-ui/elements/thread.aui";
export function Chat() {
const runtime = useChatRuntime();
return (
<AssistantRuntimeProvider runtime={runtime}>
<Thread />
</AssistantRuntimeProvider>
);
}useChatRuntime connects to the Vercel AI SDK out of the box. Swap it for useLangGraphRuntime, useDataStreamRuntime, or any custom runtime to integrate with your own backend.
Thread, Message, Composer, ThreadList, ActionBar, and friends. Style every pixel yourself, or start from a polished shadcn/ui theme that the CLI copies into your project.| Integration | Package |
|---|---|
| Vercel AI SDK | @assistant-ui/ai-sdk |
| LangGraph / LangChain | @assistant-ui/react-langgraph, @assistant-ui/react-langchain |
| AG-UI / A2A protocols | @assistant-ui/react-ag-ui, @assistant-ui/react-a2a |
| Google ADK / OpenCode | @assistant-ui/react-google-adk, @assistant-ui/react-opencode |
| Custom data-stream backend | @assistant-ui/react-data-stream |
| Managed thread history, telemetry, and file storage | assistant-cloud |
Broad model support out of the box (OpenAI, Anthropic, Google Gemini, Mistral, Perplexity, AWS Bedrock, Azure, Fireworks, Ollama) plus community providers via the AI SDK, and easy extension to any custom HTTP backend.
Instead of a single monolithic chat component, you compose primitives and bring your own styles. The CLI ships a great starter in your choice of Base UI (the default) or Radix UI flavor; you control everything else.
Sample customization to make a Perplexity lookalike:
, , , , , , , , , , and many more.
|
@assistant-ui/react-native@assistant-ui/react-inkMIT, with optional Assistant Cloud for managed thread persistence and analytics.
Backed by Y Combinator.
react-ag-ui: adapter still depends on @ag-ui/client ^0.0.59 while the workspace moves to 1.0
[react] a run that starts elsewhere moves focus from another text field into the composer
other runtime hooks still lose in-flight work on a fast refresh
feat(demos): add keyboard thread management and a shared terminal sidebar
core: a cancel during a queued dispatch's notification stalls the message queue
ai-sdk: answering an approval on a message that later turns follow does nothing
ci: claude-review fails on large PRs without posting a review
ci: restore the template footprint ceiling to 300
docs: element-docs.ts entries never render
[react-ag-ui] Regenerating the answer after a tool call deletes the earlier answer when the run starts with a MESSAGES_SNAPSHOT