Chat SDK agents can now stream generative UI with json-render
Vercel’s Chat SDK now supports streaming generative UI via json-render, converting JSON specs into platform-native cards for Slack, Teams, and others without separate tooling.
Vercel has introduced streaming generative UI for its Chat SDK agents using json-render, which converts JSON specifications into platform-native cards such as Slack’s Block Kit or Teams’ Adaptive Cards. The feature eliminates the need to maintain separate tools for each message format, as the typed component catalog handles tables, charts, buttons, and more. Developers can stream generated cards directly into threads when an agent is mentioned, with updates arriving at most every 500 milliseconds to match the SDK’s streaming interval.
The streamCard method posts a card once its root element has content and continues updating the message as new elements stream in, ensuring real-time rendering. Edits are throttled to a maximum of once every 500 milliseconds by default, aligning with the Chat SDK’s streaming behavior. Once the stream concludes, the final validated card is displayed, completing the user-facing output with the intended generative UI.
Validation is enforced via the toCard method, which checks each element’s properties against its component schema and throws a CardSpecError for invalid specifications. Each validation issue is presented with a readable description, allowing developers to send the error list back to the model for corrections. This ensures only valid, platform-compliant cards are rendered in the final output.
Platforms impose message size limits, and Chat SDK adapters automatically degrade content that exceeds these caps—for example, converting a second table into a code block in Slack. Developers can pass these limits to the system to reject non-compliant specifications upfront, avoiding runtime degradation. Documentation and a playground are available to help teams implement the new streaming generative UI feature.