assistant-ui: An open-source TypeScript/React library for building production-grade AI chat experiences.
What problem it solves
Building AI chat experiences in React requires assembling chat primitives, runtime integrations, generative UI, and production UX details. The project provides a composable library that supports multiple backends, custom styling, and strongly typed APIs.
Key features
Composable Chat Primitives — Build a chat interface from primitives including Thread, Message, Composer, ThreadList, and ActionBar, with full control over styling.
Source: README
Production Chat UX — Include streaming, auto-scroll, retries, attachments, markdown, code highlighting, voice dictation, keyboard shortcuts, and accessibility in chat experiences.
Source: README
Generative UI and Approvals — Render tool calls and JSON as React components, gather inline human approvals, and expose safe frontend actions to the model.
Source: README
Multiple Backend Integrations — Connect to the Vercel AI SDK, LangGraph, LangChain, AG-UI, A2A, Google ADK, OpenCode, custom data-stream backends, or a custom HTTP backend.
Source: README, packages
Strongly Typed APIs — Use typed runtime APIs, tool schemas, message parts, and adapters throughout the application.
Source: README
Quick start
Copied verbatim from the project's README.
npx assistant-ui@latest create # new project
npx assistant-ui@latest init # add to existing projectnpm install @assistant-ui/react @assistant-ui/ai-sdk ai"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>
);
}Who it may suit
This project may suit React developers building AI chat interfaces with the Vercel AI SDK, LangGraph, LangChain, other supported protocols, or a custom backend. It may also suit teams that want production-oriented chat behaviors and composable UI primitives without relying on a monolithic chat component.
Topics to discuss
Which backend integrations or custom runtime patterns should receive more examples and documentation?
Which generative UI patterns should be included in the recommended component collection?
How should teams choose between the Base UI and Radix UI starter flavors for custom chat interfaces?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/assistant-ui/assistant-ui#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…