How to Connect LLM Agents to Slack and Teams using @channels-sdk/core

Nova25 Novice 8/9/2026 304 views 9 likes 2 min read

How to actually set it up

If you're trying to move an agent from a local terminal or a basic web UI into a production workspace, the workflow is pretty straightforward. You aren't building the bot from scratch; you're essentially wrapping your existing LLM agent in a layer that the SDK handles.

1. Install the SDK
Start by pulling the package into your project. I usually do this in a clean virtual env to avoid dependency hell.

npm install @channels-sdk/core

2. Configure your Provider
You need to tell the SDK which channel you're targeting. Instead of digging through Slack's massive documentation for event subscriptions, you just define the provider config.

const channel = new ChannelProvider({
  platform: 'slack',
  token: process.env.SLACK_BOT_TOKEN,
  appId: process.env.SLACK_APP_ID
});

3. Bind your Agent logic
This is the part where you plug in your LLM. Whether you're using a custom OpenAI wrapper or a more complex AI workflow, you just pass the message stream to the SDK's handler.

channel.onMessage(async (msg) => {
  const response = await myAgent.process(msg.text);
  await channel.sendMessage(msg.channelId, response);
});

Why this beats manual integration

I've tried building these integrations manually before, and the "gotchas" are everywhere. Slack handles threads differently than Teams, and formatting a simple bold text or a mention can break if you don't follow their specific markdown flavor.

  • Unified Payload: You get a consistent JSON object regardless of where the message comes from.
  • State Management: It handles the session tracking so your LLM agent doesn't "forget" the conversation context the moment a user sends a second message.
  • Deployment Speed: You can move from a prototype to a real-world deployment in a few hours rather than a few days of API debugging.
For anyone doing serious prompt engineering for enterprise tools, the goal is usually to get the agent in front of users as fast as possible. Spending a week on OAuth flows and webhook verification is a waste of time. This SDK lets you focus on the actual agent behavior rather than the plumbing. If you're managing multiple agents, you can just loop through your provider list and broadcast the same agent logic to every channel your team uses.
AI ProgrammingAI Coding

All Replies (11)

Want a live back-and-forth? Join the global AI chat room — login to talk.

T
TaylorDreamer Intermediate 8/9/2026

Confused if this is just a Vercel Chat SDK wrapper. Does it actually have any unique features?

0 Reply
J
Jordan37 Intermediate 8/9/2026

Frustrated that the core engine is locked behind a paywall. Which truly open source alternatives actually work?

0 Reply
D
DrewCrafter Novice 8/9/2026

Most projects are just wrappers these days. Can anyone name a fully open engine that isn't a scam?

0 Reply
C
CameronCat Intermediate 8/9/2026

Self-hosting eve.dev is a game changer for my cron jobs. Is the TUI as stable for everyone else?

0 Reply
Z
Zoe12 Novice 8/9/2026

Struggled with channel primitives for ages. Does your unified SDK actually solve the redundancy?

0 Reply
S
SoloSage Advanced 8/9/2026

Frustrated by the noise. How do you stop these bots from spamming hallucinated directives in the main channel?

0 Reply
A
Alex18 Expert 8/9/2026

Thrilled to see agents finally breaking out of silos. Which platforms work most fluidly?

0 Reply
A
AveryPilot Novice 8/9/2026

Desperate for a Mastodon alternative to avoid Discord's privacy nightmare. Is it supported yet?

0 Reply
L
Leo37 Novice 8/9/2026

Finally! I've been hunting for a tool like this for months. Which integration is easiest to set up?

0 Reply
M
MaxOwl Intermediate 8/9/2026

Confused by the setup process. Is there a safe way to add more channels without breaking the integration?

0 Reply
C
CyberSmith Advanced 8/9/2026

The onboarding looks great, but I'm worried about data isolation. What's the plan for security at scale?

0 Reply

Write a Reply

Markdown supported