setup
Initialize and configure assistant-ui chat UI in Next.js projects or create new apps from templates.
- Supports two workflows:
initfor existing Next.js projects andcreatefor new apps, with six starter templates covering AI SDK, cloud persistence, Clerk auth, LangGraph, and MCP integrations - CLI flags enable non-interactive setup (
--yes), template selection (-t), preset configuration (--preset), and component registry additions (add) - Reference documentation covers advanced runtimes including LangGraph, custom backends, external state management, and non-Next.js frameworks like Vite and TanStack Start
- Includes component registry for adding pre-built UI elements like markdown text and thread lists
assistant-ui Setup
CLI Commands
Quick Decision Flow
- Existing Next.js app (
package.jsonexists): usenpx assistant-ui@latest init - Existing app in CI/agent/non-interactive shell: use
npx assistant-ui@latest init --yes - Existing app + force overwrite of conflicts: add
--overwrite - New app / empty directory: use
npx assistant-ui@latest create <name> - Need specific starter template: add
-t <default|minimal|cloud|cloud-clerk|langgraph|mcp> - Need a curated example: use
npx assistant-ui@latest create <name> --example <example> - Need playground preset config: use
npx assistant-ui@latest create <name> --preset <url>
New Project (create)
More from assistant-ui/skills
assistant-ui
Guide for assistant-ui library - AI chat UI components. Use when asking about architecture, debugging, or understanding the codebase.
1.8Kstreaming
Guide for assistant-stream package and streaming protocols. Use when implementing streaming backends, custom protocols, or debugging stream issues.
1.5Kprimitives
Guide for assistant-ui UI primitives - ThreadPrimitive, ComposerPrimitive, MessagePrimitive. Use when customizing chat UI components.
1.5Ktools
Guide for tool registration and tool UI in assistant-ui. Use when implementing LLM tools, tool call rendering, or human-in-the-loop patterns.
1.5Kruntime
Guide for assistant-ui runtime system and state management. Use when working with runtimes, accessing state, or managing thread/message data.
1.4Kthread-list
Guide for multi-thread management in assistant-ui. Use when implementing thread lists, switching threads, or managing conversation history.
1.4K