1 min read
We've published @vercel/slack-bolt
, a library for building and deploying robust Slack agents to Vercel's AI Cloud.
It works with any framework or function that uses the Node.js Request object.
import { App } from "@slack/bolt";import { generateText } from "ai";import { VercelReceiver, createHandler } from "@vercel/slack-bolt";
const receiver = new VercelReceiver();
const app = new App({ token: process.env.SLACK_BOT_TOKEN, signingSecret: process.env.SLACK_SIGNING_SECRET, receiver, deferInitialization: true,});
// listening to Slack messagesapp.event("message", async ({ say, message }) => { const { text } = await generateText({ model: "openai/gpt-5", prompt: `Respond to the user's message: ${message.text}`, }); // responding to Slack await say(text);});
export const POST = createHandler(app, receiver);
Listen to Slack messages and respond using the AI SDK
Deploying your Slack agent to Vercel gives you full access to primitives like Fluid compute, AI SDK, and AI Gateway. Learn more about the AI Cloud here.
Slack Agent Template
Deploy your Slack agent on Vercel's AI Cloud
Deploy Now
Get started with our Slack Agent Template today or visit the library on npm.