Vercel connects the AI SDK, Chat SDK, and json-render to bring Generative UI directly into conversational enterprise platforms. Rather than relying solely on raw text or Markdown, agents emit structured JSON based on a pre-defined component catalog.
How It Works
Using standard definitions from json-render, developers provide a component catalog to the model prompt (illustrated in documentation using models such as Claude Haiku 5.5). When mentioned, the bot streams JSON that json-render parses and turns into a Chat SDK card. The streamCard function renders the initial root element immediately and throttles incremental updates to 500 ms intervals, matching platform streaming limits.
Validation and Platform Constraints
Schema enforcement is handled via toCard, which checks element properties against the component definition. If the model generates invalid parameters, CardSpecError provides granular issue descriptions that can be fed back to the model for automated correction. Adapters also manage platform-specific message caps; for instance, the Slack adapter will gracefully degrade a second table into a code block, or reject the specification if strict limits are enabled.