Community라이팅 & 에디팅github.com

assistant-ui/streaming

assistant-stream 패키지를 통해 assistant-ui의 스트리밍 백엔드와 와이어 프로토콜을 제공합니다. 사용자 정의 스트리밍 엔드포인트를 구축하거나 스트림 인코딩/디코딩, 디버깅 시 사용합니다.

streaming란 무엇인가요?

이 스킬은 assistant-ui에서 스트리밍 데이터를 처리하는 데 필요한 모든 도구와 방법을 제공합니다. 특히 assistant-stream 패키지의 `createAssistantStreamResponse`나 `createAssistantStreamController`를 사용하여 AI SDK가 아닌 사용자 정의 스트리밍 엔드포인트를 구축할 때 유용하며, `appendText`, `appendReasoning`, `appendSource`, `appendFile`, `addToolCallPart`, `setResponse` 등의 메서드로 데이터를 내보낼 수 있습니다. AI SDK Data Stream 형식(`toUIMessageStreamResponse`)과 네이티브 Assistant Transport 형식 중에서 선택할 수 있으며, `DataStreamEncoder/DataStreamDecoder`, `AssistantTransportEncoder/AssistantTransportDecoder`, `PlainTextEncoder`, `UIMessageStreamDecoder` 등을 사용하여 스트림을 인코딩하거나 디코딩합니다. 또한 스트림 청크를 `useLocalRuntime`이나 `useChatRuntime`에 연결할 수 있습니다. 이 스킬은 특히 text-delta, part-start, result 이벤트, text/event-stream content-type, SSE 형식, 도구 호출 미표시, 부분 텍스트 미표시 등 스트림 와이어 문제를 디버깅할 때 사용해야 하며, 일반적인 비스트리밍 디버깅은 개별 집중 스킬로 라우팅해야 합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/assistant-ui/skills/tree/main/skills/streaming

Installed? Explore more 라이팅 & 에디팅 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

streaming은(는) 무엇을 하나요?

assistant-stream 패키지를 통해 assistant-ui의 스트리밍 백엔드와 와이어 프로토콜을 제공합니다. 사용자 정의 (AI SDK가 아닌) 스트리밍 엔드포인트를 createAssistantStreamResponse 또는 createAssistantStreamController로 구축하고, appendText/appendReasoning/appendSource/appendFile/addToolCallPart 및 setResponse를 통해 파트를 내보낼 때 사용합니다. AI SDK Data Stream 형식(toUIMessageStreamResponse)과 네이티브 Assistant Transport 형식 중에서 선택하거나, DataStreamEncoder/DataStreamDecoder, AssistantTransportEncoder/AssistantTransportDecoder, PlainTextEncoder 또는 UIMessageStreamDecoder로 스트림을 인코딩/디코딩할 때 사용합니다. 또는 스트리밍 청크를 useLocalRuntime이나 useChatRuntime에 연결할 때 사용합니다. 특히 스트림 와이어 문제 디버깅(예: text-delta, part-start, result 이벤트, text/event-stream content-type, SSE 형식, 도구 호출 미표시, 부분 텍스트 미표시)에 특화되어 있습니다. 일반적인 비-스트리밍 디버깅은 상위 개요가 아닌 관련 집중 스킬로 라우팅하세요.

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

assistant-ui/assistant-ui

Overview and router for assistant-ui, the React library for building AI chat interfaces from composable primitives. Use for high-level, cross-cutting, or architecture-overview questions: choosing packages, picking a runtime, or understanding the layered model (RuntimeCore, Runtime, context hooks, primitives) and message model. Covers the `@assistant-ui/react` core plus `@assistant-ui/react-ai-sdk`, `@assistant-ui/react-langgraph`, `assistant-stream`, and `assistant-cloud`; `AssistantRuntimeProvider`; the primitives `ThreadPrimitive`, `MessagePrimitive`, `ComposerPrimitive`; the hooks `useAui`, `useAuiState`, `useAuiEvent`; and runtime selection across `useChatRuntime`, `useExternalStoreRuntime`, `useLangGraphRuntime`, `useLocalRuntime`. For a specific area route to a focused sibling instead: setup, runtime, primitives, tools, streaming, cloud, thread-list, or update. Not for hands-on tasks already owned by those siblings.

assistant-ui/primitives

Builds and customizes assistant-ui chat UI from composable, unstyled @assistant-ui/react primitives that follow Radix-style part composition. Use when assembling or styling a custom Thread, Composer, message rendering, action bar, or branch picker from building blocks: ThreadPrimitive (.Root, .Viewport, .Messages, .Empty, .ScrollToBottom), ComposerPrimitive (.Input, .Send, .Cancel, .Attachments), MessagePrimitive (.Parts/.Content, .Error), ActionBarPrimitive (.Copy, .Edit, .Reload, .Speak, feedback, .ExportMarkdown), BranchPickerPrimitive, AttachmentPrimitive, ThreadListPrimitive, ThreadListItemPrimitive. Covers MessagePrimitive.Parts children render functions for text, image, reasoning, and tool-call parts; conditional rendering with AuiIf (deprecated .If); and gotchas like wrapping in AssistantRuntimeProvider and adding className since primitives ship unstyled. For prebuilt drop-in UI and scaffolding use setup; for multi-thread sidebar behavior use thread-list.

assistant-ui/runtime

Guide for assistant-ui runtime system and state management. Use when working with runtimes, accessing state, or managing thread/message data.

assistant-ui/setup

Installs and configures assistant-ui in a project via the CLI, and picks the right runtime for a backend. Use for first-time install, scaffold, or config: `npx assistant-ui@latest create my-app` (templates default, minimal, cloud, cloud-clerk, langgraph, mcp), `npx assistant-ui@latest init [--yes] [--overwrite]` in an existing Next.js app, or `npx assistant-ui@latest add` registry components (markdown-text, thread-list). Also use to choose a runtime hook for a backend: useChatRuntime (AI SDK), useLangGraphRuntime, useAgUiRuntime, useA2ARuntime, useLocalRuntime (custom streaming API), or useExternalStoreRuntime (Redux/Zustand). Covers Vite/TanStack Start setup, shadcn styling, the playground --preset flag, and avoiding the deprecated @assistant-ui/styles and @assistant-ui/react-ui packages. For upgrading an existing install or post-upgrade breakage use update; for building UI from raw parts use primitives.

assistant-ui/thread-list

Implements multi-thread (conversation history) management in assistant-ui apps: rendering the prebuilt `ThreadList` next to `Thread`, or building a custom sidebar with `ThreadListPrimitive` and `ThreadListItemPrimitive` (Root, New, Items, Trigger, Title, Archive, Unarchive, Delete). Covers thread CRUD through the `useAui()`/`useAuiState()` API: `switchToThread`, `switchToNewThread`, and per item `rename`, `archive`, `unarchive`, `delete`, `generateTitle`, `initialize`, plus reading `s.threads.threadIds`/`archivedThreadIds`/`mainThreadId`. Includes cloud-backed persistence via `useChatRuntime` + `AssistantCloud` and a local `useRemoteThreadListRuntime` + `InMemoryThreadListAdapter` path. Use when a user wants a thread list/sidebar, switching, searching, sorting, drag-and-drop, or renaming/archiving/deleting conversations. For single-thread state, messages, or composer use runtime; for cloud auth/persistence setup use cloud.

assistant-ui/tools

Registers LLM tools and renders custom tool-call UI in assistant-ui (@assistant-ui/react). Use when adding frontend-only tools with makeAssistantTool / useAssistantTool (browser actions like clipboard, navigation, localStorage, async-generator streaming, AbortSignal), rendering backend AI SDK tool() calls with makeAssistantToolUI / useAssistantToolUI (status.type running/complete/incomplete/requires-action, args, result, artifact via ToolCallMessagePartProps), building generative UI from tool results, or implementing human-in-the-loop and approval flows (addResult, resume with context.human(), respondToApproval for server-side needsApproval gates). Covers registering tool components inside AssistantRuntimeProvider and the case-sensitive toolName matching that connects a tool to its UI. Reach for this when tool UI is not rendering, a tool is not being called, or a result is not showing.

assistant-ui/update

Upgrades an existing assistant-ui project to current releases and executes the resulting migrations. Use when the user wants to update, upgrade, bump, or migrate @assistant-ui/react, @assistant-ui/react-ai-sdk, ai, or @ai-sdk/react, hits peer-dependency conflicts or post-upgrade type errors, or must apply renamed APIs after a version jump. Detects installed versus latest versions via npm ls / npm view, then routes through breaking-change references for each jump (AI SDK v4/v5 to v6; assistant-ui 0.8.x to 0.14.x): useAssistantApi to useAui, runtime.threadList to runtime.threads, ThreadPrimitive.ViewportSlack removal, the primitives components prop to children render functions, toDataStreamResponse to toUIMessageStreamResponse, maxSteps to stopWhen: stepCountIs(n). Runs npx assistant-ui@latest upgrade, pnpm/npm add @latest, and npx tsc --noEmit to verify. For a first-time install or fresh scaffold (not an upgrade) use setup instead.

관련 스킬