You can now stream generative UI from your Chat SDK agent with json-render.
With a typed catalog of components, the agent writes a JSON spec that json-render
converts into a Chat SDK card. Each adapter then posts the card in its platform’s native format, such as Block Kit on Slack and Adaptive Cards on Teams.
The catalog covers tables, charts, buttons, and more, so there’s no separate tool to build and maintain for each message shape.
import { defineCatalog } from "@json-render/core";import { schema, standardComponentDefinitions, streamCard,} from "@json-render/chat";import { streamText } from "ai";
const catalog = defineCatalog(schema, { components: standardComponentDefinitions,});
bot.onNewMention(async (thread, message) => { const result = streamText({ model: "anthropic/claude-haiku-5.5", system: catalog.prompt(), prompt: message.text, }); await streamCard(thread, result.textStream);});
Stream a generated card into the thread when your agent is mentioned.
Copy link to headingStream cards as the model writes
streamCard
posts the card once its root element has content and updates the message as new elements stream in. Edits go out at most once every 500 ms by default, which matches Chat SDK’s streaming interval. Once the stream ends,…