AI Agent News/stories/vercel-adds-json-render-generative-ui-streaming-to-chat-sdk-agents.md

Frameworks

Vercel adds json-render generative UI streaming to Chat SDK agents

Vercel's Chat SDK agents can now stream generative UI cards built with json-render. The cards are posted in each chat platform's native format, such as Block Kit on Slack and Adaptive Cards on Teams.

Source: vercel.com/changelog/json-render-and-chat-sdk-agents

Agents write a JSON spec against a typed catalog of components that covers tables, charts, buttons and more. json-render converts that spec into a Chat SDK card, and each platform adapter posts the card in its own format, so developers do not need a separate tool for each message shape.

The streamCard helper posts the card once its root element has content, then updates the message as further elements arrive. Edits go out at most once every 500 ms by default, matching Chat SDK's streaming interval. When the stream ends, the message shows the final validated card.

toCard checks each element's props against its component schema and throws CardSpecError for an invalid spec, reporting each problem separately so the list can be sent back to the model. A limits option rejects specs that exceed platform caps, since adapters otherwise degrade content; the Slack adapter, for example, turns a second table into a code block.

Why it matters if you build agents

Agents can return tables, charts and buttons inside a chat thread without writing a custom tool for each message shape.

Validation errors can be passed back to the model so it can correct its spec before the message is posted.

Passing limits lets you reject specs that a platform would otherwise degrade, rather than discovering the change in the rendered message.

Get stories like this every weekday

One short email with the day's agent tooling news.

Subscribe