# Connect Vercel AI SDK to Slack | Novu Connect

> Give your Vercel AI SDK agent a voice in Slack with Novu Connect.

Canonical: https://www.novu.co/channels/slack/ai-sdk/

Markdown: https://www.novu.co/channels/slack/ai-sdk.md

The Vercel AI SDK is the open-source TypeScript toolkit for building agents and AI apps on any model provider. Novu Connect gives it a voice in Slack.

Novu Connect is the communication layer, the ACI, Agent Communication Infrastructure, bridge between your AI SDK agent and Slack. Your agent keeps running in your app. Novu delivers its messages to Slack, maps each user, and forwards their replies back to your handler. We never run your agent's reasoning. That is the whole point.

Connect command: npx novu connect --channel slack --runtime ai-sdk

## What is Vercel AI SDK

The Vercel AI SDK gives developers one TypeScript API for agents: generateText and streamText, tool calling, structured output, and a provider layer for OpenAI, Anthropic, Google, Groq, and more. You write the agent loop in your own app and swap models without rewriting it. The AI SDK runs the agent. It does not carry the conversation to your users. That last mile, reaching a person in Slack and routing their reply back to your agent, is what Novu Connect adds.

- One TypeScript API across OpenAI, Anthropic, Google, Groq, and more
- Tool calling and structured output for real agent actions
- generateText for full replies, streamText for streaming ones
- Runs anywhere JavaScript runs, from Next.js to plain Node

## How to connect Vercel AI SDK to Slack

1. Keep your AI SDK agent: Your agent loop, tools, and prompts stay in your codebase exactly as they are. Novu Connect wraps the input and output, so your AI SDK logic does not change when you add Slack.
2. Connect the channel: Run npx novu connect --channel slack --runtime ai-sdk. The CLI scaffolds a bridge route in your app and connects Slack. You can also paste the prompt below into your coding agent and let it wire the bridge for you.
3. Wire the bridge handler: The CLI prints a requirements file with the bridge route and handler. Return your generateText or streamText result from the handler, and use toModelMessages to pass the Slack conversation history to your model.
4. Go live: Sign in to keep the agent live, then run your dev server. Your AI SDK agent now holds a two-way conversation in Slack, and the same agent can reach every other channel from one thread.

Prompt for your coding agent: Connect this project's Vercel AI SDK agent to Slack with Novu using instructions from https://novu.co/agents.md

## Vercel AI SDK and Slack, common questions

### Do I have to rewrite my AI SDK agent to add Slack?

No. Novu Connect uses a custom-code bridge. Your AI SDK agent keeps running in your app. Novu forwards messages from Slack to your handler and routes replies back, so your agent code stays the same.

### Does Novu run my AI SDK agent?

No. Novu Connect is the communication layer, the ACI, Agent Communication Infrastructure, bridge between your agent and Slack. You own the reasoning and the tools. We never run your brain, that is the whole point.

### Can I keep using streamText and my model provider?

Yes. The bridge handler accepts the results your AI SDK code already produces, including streaming ones, and you can swap model providers at any time. Novu only carries the conversation to and from Slack.

### How do I connect my AI agent to Slack?

Run npx novu connect --channel slack, or paste the prompt above into your coding agent. Novu Connect handles the Slack app, user identity, and two-way message routing so your agent code does not change when you add the channel.

### Can the agent hold a two-way conversation in Slack, not just post alerts?

Yes. Novu Connect maps each Slack user to your agent and routes their replies back into the same thread, so the conversation is genuinely two-way with retries on delivery.
