assistant-ui/assistant-ui
Composable React chat UI with swappable runtimes for AI backends.
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
assistant-ui is a TypeScript/React chat SDK that separates the component tree from the backend runtime. In the Vercel AI SDK integration, useChatRuntime() from @assistant-ui/ai-sdk supplies the runtime to AssistantRuntimeProvider from @assistant-ui/react, with Thread rendered beneath it. Applications compose Thread, Message, Composer, ThreadList, and ActionBar rather than adopting a fixed chat screen.
The monorepo uses a pnpm workspace, with packages under packages/ and examples under examples/. Backend integrations are packaged separately: @assistant-ui/react-langgraph and @assistant-ui/react-langchain connect to their respective frameworks, @assistant-ui/react-ag-ui and @assistant-ui/react-a2a handle those protocols, and @assistant-ui/react-data-stream serves custom data-stream backends. A custom runtime is another option when an existing adapter does not fit.
Key Capabilities & Differentiators
The library covers streamed messages, auto-scroll, retries, attachments, Markdown, code highlighting, voice dictation, and keyboard shortcuts, with accessibility support. Typed runtime APIs, tool schemas, and message parts provide explicit contracts for integration. Applications can render tool calls and JSON as React components, collect human approvals inline, and expose selected frontend actions to the model. The application still needs to enforce authorization wherever those actions execute.
Backend options also include Google ADK and OpenCode. Through the AI SDK, teams can access providers including OpenAI, Anthropic, Gemini, Mistral, AWS Bedrock, and Ollama; model execution is separate from the React layer. For teams that want managed thread history, telemetry, and file storage, assistant-cloud is a separate integration. Check which streaming, attachment, and tool behaviors the chosen backend supports before committing to a UI design.
Trade-offs & Limitations
Compared with using the Vercel AI SDK directly, assistant-ui adds reusable chat components and an explicit runtime boundary. That pays off when a product needs thread navigation, message actions, or tool approvals. For a single, simple chat surface, a small component stack built directly on the AI SDK may be easier to maintain. Compared with a hosted widget, editable components give the team more control over interaction and styling but leave more integration work in the application.
Because the CLI copies components into the project, teams own their local edits and must review upstream component changes rather than expecting every UI fix to arrive with a package update. For each backend adapter, test stream interruption, cancellation, and tool-call handling before rollout. The MIT license permits commercial use and self-hosting subject to its notice requirements; review managed-service terms and data handling separately.
Hardware & Deployment Guide
Use npx assistant-ui@latest create to scaffold a Next.js app or npx assistant-ui@latest init to add styled components to an existing project. For a direct Vercel AI SDK integration, install @assistant-ui/react, @assistant-ui/ai-sdk, and ai. The monorepo declares Node.js >=24.11; treat that as a source-workspace requirement, not an established minimum for every consuming app.
Deploy the UI as part of the React application and connect it to a reachable chat backend. Operating without external services requires local choices for inference and any storage, file, or telemetry features in use; installing the SDK alone does not provide an offline stack. The @assistant-ui/react-opencode@0.2.37 patch makes user stops end as cancellations rather than errors. That is a useful integration test case: verify that stopping a run produces the intended state in both your backend and UI.
AssistantRuntimeProvider passes the selected runtime to React chat components such as Thread.assistant-cloud integration covers thread history, telemetry, and file storage.@assistant-ui/react-opencode@0.2.37 marks a user-stopped assistant message as cancelled rather than showing an aborted error.React teams building a branded assistant or copilot that needs streaming, custom message rendering, or tool approvals and already has a backend or a plan to build one.
You need a turnkey chat service that includes model execution and persistence, or your existing UI can handle a simple prompt-and-response flow without another abstraction.
Quick Start & Installation
npx assistant-ui@latest create # new project npx assistant-ui@latest init # add to existing project
Comparison vs. Top Chat UI & AI Apps Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| assistant-ui ★ | 13.5k | +102 | TypeScript | MIT | Composable React chat UI with swappable runtimes for AI backends. |
| lobe-ui | 2.3k | +13 | TypeScript | MIT | React component library for AI chat and rich model-output rendering |
| lobe-editor | 187 | +1 | TypeScript | MIT | A Lexical kernel with React components for chat, documents, and reviewable AI ed |
| chatbox | 42.6k | +74 | TypeScript | GPL-3.0 | Electron chat client for switching between cloud APIs and local Ollama models |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/assistant-ui/assistant-ui.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about assistant-ui
How do I connect the chat UI to an existing backend?
useChatRuntime() to AssistantRuntimeProvider and render Thread beneath it. For LangGraph, a custom data stream, or another backend, choose the corresponding runtime or implement a custom one. Check message parts, tool-call events, and cancellation behavior before assuming a runtime swap preserves every feature.Do I need a GPU, and what should I size for?
Can I use it commercially and self-host it?
When would I choose this over the Vercel AI SDK alone or a hosted chat widget?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy