Back to Skills

streaming

Streaming backends and wire protocols for assistant-ui via the assistant-stream package. Use when building a custom (non-AI-SDK) streaming endpoint with createAssistantStreamResponse or createAssistantStreamController, emitting parts through appendText/appendReasoning/appendSource/appendFile/addToolCallPart and setResponse; choosing between the AI SDK Data Stream format (toUIMessageStreamResponse) and the native Assistant Transport format; encoding or decoding streams with DataStreamEncoder/Data

16stars2forksUpdated 6/10/2026

Security Assessment

Low Risk(80/100)

Detected risks:

Sensitive File Access([references/resumable.md] .env)
Security Score80/100

About streaming

The streaming skill provides guidance for implementing and troubleshooting streaming communication between AI backends and assistant-ui using the assistant-stream package. It is designed for developers building custom streaming endpoints rather than using the Vercel AI SDK workflow. The skill focuses on creating streaming responses, handling streamed content parts, selecting appropriate wire protocols, and ensuring that assistant responses are delivered incrementally to the user interface. It also helps diagnose common streaming issues such as missing updates, malformed server-sent events, and rendering problems with streamed content.

Core capabilities include creating custom streaming responses, emitting streamed content such as text, reasoning, sources, files, and tool-call data, and attaching tool results to active streams. The skill covers both the AI SDK Data Stream format and the native Assistant Transport format, along with the encoders and decoders used to serialize and deserialize stream data. It also supports stream inspection and debugging through stream event processing, including events such as part-start, text-delta, result, step lifecycle events, message completion, and errors. Additionally, it explains how streamed chunks can be integrated into runtime systems such as useLocalRuntime.

Typical use cases include building custom AI backend integrations, implementing real-time chat experiences, debugging server-sent event streams, validating wire protocol behavior, and ensuring tool calls render correctly in assistant-ui applications. The primary audience includes JavaScript and TypeScript developers, frontend engineers working with React-based assistant-ui integrations, and backend developers responsible for streaming AI responses from custom services.

FAQ

When should I use this skill instead of the Vercel AI SDK approach?

Use this skill when building a custom backend that does not rely on the Vercel AI SDK. If you are already using the AI SDK and its response helpers, assistant-stream may not be required.

What streaming formats are covered?

The skill covers the AI SDK Data Stream format and the native Assistant Transport format, along with related encoding and decoding workflows.

Can this skill help debug streaming issues?

Yes. It includes guidance for inspecting stream events and troubleshooting issues such as missing UI updates, incorrect content types, malformed SSE streams, and tool calls that do not render.

How can streamed responses be integrated into assistant-ui runtimes?

The skill includes examples and guidance for wiring streamed chunks into runtime integrations such as useLocalRuntime.

What are common requirements for successful streaming?

Streams should be delivered using the correct server-sent events configuration, including a text/event-stream content type, and tool calls should provide the required identifiers so they can be rendered properly.

All Files

5 files
references/assistant-transport.md3.9 KB
View
references/encoders.md2.9 KB
View
SKILL.md4.0 KB
View
references/data-stream.md3.4 KB
View
references/resumable.md13.5 KB
View

Install streaming

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill