assistant-ui /assistant-ui
Typescript/React Library for AI Chat 💬🚀
★ 13,256⑂ 1,344👁 81⑃ 8,297● 2,164▤ 2,620
13,256
stars
1,344
forks
81
watchers
8,297
prs
2,164
issues
2,620
releases
README
Product ·
Documentation ·
Examples ·
Discord ·
Contact Sales
The UX of ChatGPT in your React app 💬🚀
assistant-ui is an open-source TypeScript/React library to build production-grade AI chat experiences fast.
Installation
The fastest path is the CLI, which scaffolds a Next.js app or adds the styled components to an existing project:
bash
npx assistant-ui@latest create new project
npx assistant-ui@latest init add to existing project
Or install the packages directly:
bash
npm install @assistant-ui/react @assistant-ui/ai-sdk ai
Usage
tsx
"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 (
);
}
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.
What you get
- Composable primitives: build any chat UX from 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.
- Production UX out of the box: streaming, auto-scroll, retries, attachments, markdown, code highlighting, voice dictation, keyboard shortcuts, and accessibility.
- Generative UI: render tool calls and JSON as React components, collect inline human approvals, and expose safe frontend actions to the model.
- Strong TypeScript: typed runtime APIs, tool schemas, message parts, and adapters end to end.
Backends
| 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.
Customization
Instead of a single monolithic chat component, you compose primitives and bring your own styles. The CLI ships a great starter Top issues
#8505other runtime hooks still lose in-flight work on a fast refresh9 comments · 2026-09-28#6557deps: the babel hold, and what the update pipeline still cannot see8 comments · 2026-08-29#10313[core] keep a redacted reasoning part from an external store, so a UI can show that the model thought5 comments · 2026-11-04#10229[react-ag-ui] the assistant message id switches from the optimistic id to the server id on the first TEXT_MESSAGE_START, remounting the message mid-run5 comments · 2026-10-30#9758[react-google-adk] edit and reload never rewind the ADK session on the server5 comments · 2026-10-15#8866Add a first-party Flue runtime adapter5 comments · 2026-10-06#10456feat(assistant-stream): pass the data part `id` to `onData`4 comments · 2026-11-11#10389[core] remote thread list: a queued title rename reaches the adapter after the thread was deleted and relisted4 comments · 2026-11-07
Discussions
#10459ArtiGram: a free gallery of AI-made HTML artifacts with a remote MCP server0 comments · 2026-11-11#10330FinGuard: guarding separate summary state against stale results (experimental, feedback wanted)0 comments · 2026-11-05#10263OpenCode 2.x Support ?0 comments · 2026-11-02#10127Rendering validated MCP results with ExternalStoreRuntime: live read and local rejection0 comments · 2026-10-26#5741assistant-ui is indexed on our MCP marketplace0 comments · 2026-08-09#5211BidiLens integration recipe for mixed-direction AI messages0 comments · 2026-07-27#4862how to use tanstack start ServerFnction with useChatRuntime?2 comments · 2026-07-13#4820URL-as-source-of-truth for active thread: which pattern is recommended?0 comments · 2026-07-10
Latest release
[email protected] [email protected] 2026-11-13Patch Changes - Updated dependencies [4254c59]: - [email protected]