Skip to content
All tags

#ai-sdk

2 posts

AI SDK Message Parts: The Data Skeleton of a Conversation UI

The AI SDK splits an AI message into a parts array — text, reasoning, source-url, tool-* — each an independent typed fragment (introduced in v5, unchanged since). That data structure dictates how modern AI conversation UIs are written: render by switching on part.type, handing each fragment to its component. This post unpacks the design logic of the parts model, useChat's streaming behavior, and how it became the foundation for component libraries like AI Elements.

AI Elements: Vercel's ChatGPT-Style Interface as Copy-In shadcn Blocks

AI Elements is Vercel's React component library for the AI SDK ecosystem — the registry currently holds 48 components covering Conversation, Reasoning, Sources, Tool, and the rest of the AI-interface vocabulary. It follows the shadcn model: npx ai-elements@latest copies the source into your project, fully editable, mapped one-to-one onto useChat's message parts.