Auto-Pilot
Updated a month ago

assistant-ui

Aassistant-ui
0.0k
assistant-ui/skills/assistant-ui/skills/assistant-ui
72
Agent Score

πŸ’‘ Summary

English summary.

🎯 Target Audience

Persona 1Persona 2Persona 3

πŸ€– AI Roast: β€œPowerful, but the setup might scare off the impatient.”

Security AnalysisLow Risk

Risk: Low. Review: outbound network access (SSRF, data egress). Run with least privilege and audit before enabling in production.


name: assistant-ui description: Guide for assistant-ui library - AI chat UI components. Use when asking about architecture, debugging, or understanding the codebase. version: 0.0.1 license: MIT

assistant-ui

Always consult assistant-ui.com/llms.txt for latest API.

React library for building AI chat interfaces with composable primitives.

References

When to Use

| Use Case | Best For | |----------|----------| | Chat UI from scratch | Full control over UX | | Existing AI backend | Connects to any streaming backend | | Custom message types | Tools, images, files, custom parts | | Multi-thread apps | Built-in thread list management | | Production apps | Cloud persistence, auth, analytics |

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  UI Components (Primitives)             β”‚
β”‚    ThreadPrimitive, MessagePrimitive, ComposerPrimitive β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Context Hooks                         β”‚
β”‚   useAssistantApi, useAssistantState, useAssistantEvent β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Runtime Layer                        β”‚
β”‚  AssistantRuntime β†’ ThreadRuntime β†’ MessageRuntime      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Adapters/Backend                      β”‚
β”‚   AI SDK Β· LangGraph Β· Custom Β· Cloud Persistence       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Pick a Runtime

Using AI SDK?
β”œβ”€ Yes β†’ useChatRuntime (recommended)
└─ No
   β”œβ”€ External state (Redux/Zustand)? β†’ useExternalStoreRuntime
   β”œβ”€ LangGraph agent? β†’ useLangGraphRuntime
   β”œβ”€ AG-UI protocol? β†’ useAgUiRuntime
   β”œβ”€ A2A protocol? β†’ useA2ARuntime
   └─ Custom API β†’ useLocalRuntime

Core Packages

| Package | Purpose | |---------|---------| | @assistant-ui/react | UI primitives & hooks | | @assistant-ui/react-ai-sdk | Vercel AI SDK v6 adapter | | @assistant-ui/react-langgraph | LangGraph adapter | | @assistant-ui/react-markdown | Markdown rendering | | @assistant-ui/styles | Pre-built CSS | | assistant-stream | Streaming protocol | | assistant-cloud | Cloud persistence |

Quick Start

import { AssistantRuntimeProvider, Thread } from "@assistant-ui/react"; import { useChatRuntime, AssistantChatTransport } from "@assistant-ui/react-ai-sdk"; function App() { const runtime = useChatRuntime({ transport: new AssistantChatTransport({ api: "/api/chat" }), }); return ( <AssistantRuntimeProvider runtime={runtime}> <Thread /> </AssistantRuntimeProvider> ); }

State Access

import { useAssistantApi, useAssistantState } from "@assistant-ui/react"; const api = useAssistantApi(); api.thread().append({ role: "user", content: [{ type: "text", text: "Hi" }] }); api.thread().cancelRun(); const messages = useAssistantState(s => s.thread.messages); const isRunning = useAssistantState(s => s.thread.isRunning);

Related Skills

  • /setup - Installation and configuration
  • /primitives - UI component customization
  • /runtime - State management deep dive
  • /tools - Tool registration and UI
  • /streaming - Streaming protocols
  • /cloud - Persistence and auth
  • /thread-list - Multi-thread management
  • /update - Version updates and migrations
5-Dim Analysis
Clarity8/10
Novelty6/10
Utility8/10
Completeness7/10
Maintainability7/10
Pros & Cons

Pros

  • p1
  • p2

Cons

  • c1
  • c2

Related Skills

claude-domain-skills

B
toolAuto-Pilot
72/ 100

β€œPowerful, but the setup might scare off the impatient.”

my-skills

B
toolAuto-Pilot
72/ 100

β€œPowerful, but the setup might scare off the impatient.”

terraform-ibm-modules-skills

B
toolAuto-Pilot
72/ 100

β€œPowerful, but the setup might scare off the impatient.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author assistant-ui.