Your agents can now reply with tables, charts, and other Slack-native UI elements.
Paul Scanlon·Nov 24, 2026
·3 min read
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.
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.
Get started
Install @json-render/chat:
npm install @json-render/chat@mastra/core@1.83.0 or later, added in PR #29820.
This example uses Mastra Connect to manage the Slack connection on Mastra platform. Add @json-render/chat to bundler.dynamicPackages and set generativeUI: true on the Slack provider:
import { Mastra } from "@mastra/core/mastra";
import { channels } from "@mastra/connect";
import { deployAgent } from "./agents/deploy-agent";
export const mastra = new Mastra({
agents: { deployAgent },
bundler: {
dynamicPackages: ["@json-render/chat"]
},
channels: await channels({
providers: {
slack: {
providerOptions: { generativeUI: true }
}
}
})
});Optionally, name the components you want the agent to use in the agent's instructions:
import { Agent } from "@mastra/core/agent";
import { Memory } from "@mastra/memory";
export const deployAgent = new Agent({
id: "deploy-agent",
name: "Deploy Agent",
instructions: `You report on deploys for the mastra-website project.
Answer every deploy question with one render_card card that includes:
- a title and subtitle
- fields for the key facts
- a table
- a chart
- an image
- link buttons
`,
model: "mastra/anthropic/claude-opus-5.5",
memory: new Memory()
});For more information and full configuration options, see:
Generative UI is still experimental — the API may change between releases.
Share on X or LinkedIn
Paul ScanlonTechnical Product Marketing ManagerPaul Scanlon sits between Developer Education and Product Marketing at Mastra. Previously, he was a Technical Product Marketing Manager at Neon and worked in Developer Relations at Gatsby, where he created educational content and developer experiences.
All articles by Paul Scanlon →More on Agents
All postsBlogNov 11, 2026Introducing Mastra Forward
A dedicated Mastra engineer, backed by a factory of agents in your repo, building your agents and getting them to production.
BlogNov 10, 2026Introducing Mastra FDE
Forward-deployed engineers from the Mastra team, embedded with yours. If you're hiring an AI engineer, an option worth considering.
BlogNov 6, 2026Introducing Ring Signals for Mastra Agents
Your agents can now respond to real-world events.
AI Trends