assistant-ui-streaming

Translate backend events into assistant-ui SSE wire protocols and chunk shapes.

182|8|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/compozy/agh --skill assistant-ui-streaming
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: assistant-ui-streaming
Source: https://github.com/compozy/agh/tree/main/.agents/skills/assistant-ui/assistant-ui-streaming
Command: npx skills add https://github.com/compozy/agh --skill assistant-ui-streaming

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents broken or inconsistent assistant-ui streaming by guiding you through the correct streaming formats, encoders/decoders, and event shapes used to deliver text, tool calls, reasoning, and results to the UI.

Core Features & Use Cases

  • Protocol selection for backends: Choose between AI SDK Data Stream helpers and assistant-stream for custom streaming backends.
  • Correct wire formats and event decoding: Understand and implement Data Stream SSE and assistant-ui’s native Assistant Transport so the client renders updates properly.
  • Tool-call streaming support: Emit tool-call parts with deterministic args streaming and attach tool results to the right tool call.

Quick Start

Implement a streaming endpoint that returns assistant-ui compatible SSE by using createAssistantStreamResponse and closing the stream after emitting text, optional tool-call parts, and final results.

Frequently Asked Questions about assistant-ui-streaming

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does assistant-ui streaming break when I send custom backend events?▼

assistant-ui streaming breaks when backend events are not translated into the required SSE wire protocols and chunk shapes. You must use assistant-stream encoders/decoders to emit part-start, text-delta, and tool-call event sequences for proper UI rendering.

How do I format SSE wire protocols for assistant-ui text and tool calls?▼

Format SSE wire protocols by producing part-start, text-delta, and tool-call event sequences using assistant-stream encoders. Ensure your response content type supports Server-Sent Events to deliver incremental UI updates correctly.

Does assistant-ui support streaming tool-call arguments and attaching results?▼

Yes, assistant-ui supports tool-call streaming. You must emit tool-call parts with deterministic args streaming and attach tool results to the correct tool call within the event sequence.

What's the best way to choose between AI SDK Data Stream and assistant-stream for custom backends?▼

Choose AI SDK Data Stream helpers for standard integrations, or select assistant-stream for custom streaming backends. Both produce Data Stream SSE or Assistant Transport formats required by the assistant-ui client to render updates properly.

How do I create an assistant-ui compatible streaming endpoint from an async iterator?▼

Create a streaming endpoint using createAssistantStreamResponse. Translate ChatModelRunResult chunks from your async iterator into assistant-ui compatible SSE, then close the stream after emitting text, tool-call parts, and final results.

When do I need Server-Sent Events for assistant-ui incremental UI updates?▼

You need Server-Sent Events whenever streaming assistant responses to assistant-ui. The response content type must support SSE to ensure incremental UI updates render correctly without breaking the client.