Skip to main content
Products & Tools

Vercel Enhances Chat SDK with JSON-Render for UI Streaming

Vercel's Chat SDK now supports streaming generative UI using json-render.

By Precis Daily Newsroom1 min read184 words
AI-summarized from the linked source and published automatically — not human-edited.How this works →
Illustration for: Vercel Enhances Chat SDK with JSON-Render for UI Streaming
Illustration

What happened

Vercel's Chat SDK now allows agents to stream generative UI using json-render. The system generates a JSON specification based on a typed catalog of components, which json-render converts into a Chat SDK card.

The catalog includes components such as tables, charts, and buttons, eliminating the need for separate tools for each message shape. Edits are sent at most once every 500 ms by default, aligning with Chat SDK's streaming interval.

Why it matters

This update streamlines the process of rendering dynamic content by allowing agents to generate and update UI elements in real time. The system also ensures that each element is validated against its component schema, reducing the risk of invalid or malformed outputs.

Key details

Once the stream ends, the message displays the final, validated card. The toCard function checks every element's properties against its component schema and throws a CardSpecError for invalid specs.

Each invalid element results in a readable issue, allowing the list to be sent back to the model for correction. For example, the Slack adapter converts a second table into a code block.

Sources

Summarized from the linked originals.

Related stories