← ClaudeAtlas

ai-sdk-uilisted

Build streaming AI user interfaces with AI SDK patterns — message rendering, tool-call displays, loading states, and optimistic updates. Use when creating chat UIs that stream model output and show agent activity.
aicodedecode/awesome-muse-skills · ★ 0 · AI & Automation · score 75
Install: claude install-skill aicodedecode/awesome-muse-skills
# Streaming AI Interfaces with AI SDK Patterns Modern AI UIs stream: tokens appear as they're generated, tool calls show as activity, and the interface stays responsive throughout. AI SDKs provide the hooks and helpers for this — this skill covers the patterns, not any single SDK's API. ## Overview The core pattern: a `useChat`-style hook manages messages, input, and streaming state; the UI renders message parts (text, tool calls, images) as they arrive. Tool invocations render as activity cards — "searching…", "reading file…" — so users see the agent working. State handling covers the lifecycle: idle, streaming, awaiting tool, error. Get these patterns right and the UI feels alive; get them wrong and it feels broken even when the model is fine. ## When to use - Building a chat interface over a streaming model API. - Showing agent activity: tool calls, reasoning progress, multi-step work. - Adding AI features to an existing app: copilots, assistants, smart compose. - Any UI where the model takes more than a second to respond (which is all of them). ## Core concepts - **Streaming messages**: render tokens incrementally; handle the stream lifecycle (start, chunk, done, error, abort). Never leave the user staring at a spinner with no feedback. - **Message parts**: messages as lists of parts — text, tool-call, tool-result, image, reasoning. Render each part with its own component. - **Tool-call UI**: show tool activity as it happens — pending, running, complete — w