Mastra Brings Generative UI Cards to Slack Agents
Mastra announced generative UI support for agents operating in Slack. According to the vendor, enabling generativeUI gives an agent a render_card tool for creating Slack-native cards on the fly, with fields, tables, charts, images, and link buttons posted through Slack Block Kit. The API requires @mastra/core 1.83.0 or later and remains experimental, so its interface may change between releases.
The feature gives agent builders a way to turn structured agent responses into dynamic, Slack-native interfaces rather than relying only on text or predefined cards.
Your agents can now use generative UI cards in Slack. Turn on generativeUI and the agent gets a render_card tool that posts rich, native cards to the thread.
Agents in Slack usually reply using long blocks of plain text or markdown, making it difficult to see how numbers compare or change over time. With generative UI, the agent decides how to present the data, using fields for key facts, tables for rows of data, charts for metrics or trends, images, and link buttons that open related pages.
Your browser does not support the video tag.A Deploy Agent in Slack answers with a deploy summary, a bar chart of build times, and a table of shipped commits, followed by the setup code and connecting Slack with Mastra Connect.
You've always been able to post UI cards in Slack by predefining them in code, but before generative UI, each card's structure was fixed in advance. Now, with generative UI, the agent creates the card on the fly, choosing the most suitable UI element for each response.
To render Slack-native UI elements, agents call the render_card tool, passing in an object that meets the json-render spec. Mastra can then post responses to the thread using Slack's Block Kit elements.