
How to Connect Your Agents to Slack
Today I'll show you how to connect your agents to Slack. It's one of the first things you'll do when you start building agents: put them where your team works. One agent becomes two, two become five and suddenly any task that can be done by humans becomes a message to an agent.
Here's what it looks like:
Normally agents operate in channels like #sales and #engineering. This video is from our testing channel: #agents. If you look closely you can see Sam trying to hack my personal context agent. Everything you see works out of the box: streaming, tool calls rendered as they run, human-in-the-loop, memory of the person the agent is talking to. We'll get to how all of that works.
One backend, many frontends
A big advantage of having your own agent platform is that the same backend connects to every frontend. So the same agent is available over Slack, a custom UI, or AI apps like Claude and ChatGPT. The key is setting up the platform right, so it can serve any frontend.
Do it yourself
Here's what we'll do to get our agents in Slack:
- Set up our agent platform
- Deploy our platform (Slack needs a public URL)
- Connect our agent to Slack
End to end this should take ~20 minutes. We'll use coding agents for steps 1 and 2 so you'll move through this pretty quickly and the only manual setup is creating the Slack app. Let's go.
Set up your platform
If there's one thing you take away from my posts, it's that you need your own agent platform: shared execution, shared security, shared context, and a consistent way of exposing your agents over REST, MCP, and chat interfaces like Slack.
Your code lives in one place, easy to scale beyond your first agent. Sessions, memory, and traces are stored in your database and can be mined for self-improvement. Platform access and security are managed in one place, and the best part: the whole thing can be done by coding agents. Let's start by setting up our platform.
Step 1: Start up your coding agent. I'm using claude code with --dangerously-skip-permissions (fine here, it's a fresh project).
Step 2: Create your agent platform using one prompt.
- Make sure Docker is installed and running.
- Export your OpenAI API key using
export OPENAI_API_KEY=... - Get your prompt from os.agno.com and give it to your coding agent.
And that's it. Your coding agent will set up and run your agent platform locally.
Deploy your platform
Slack needs the agent to be available over a public URL. When you copied the prompt from os.agno.com, you chose a cloud to deploy your platform to (I chose Railway).
Let's deploy our platform so slack can reach our agent. cd into your agent platform, start your coding agent so the slash commands are available and run:
/deploy-platform
I'm telling the skill to deploy to the AB workspace because I already have my internal company platform running in my main account. The skill checks the prerequisites (may ask you to log in), provisions the services, and pauses for the JWT key. This is important.
One mistake I see agent builders make all the time is deploying their agents to a public URL with no authentication. If the open URL gets discovered, strangers have unrestricted access to your agents. The platforms I build come with JWT auth on by default, so a production deploy needs a JWT verification key before it will even start.
You can mint one yourself, or get one from os.agno.com.
Connect to your AgentOS on os.agno.com, flip on token-based authorization, and paste in the verification key when the skill pauses for it. Your coding agent deploys the platform and hands you a live URL.
Connect to Slack
Now for the main event. We will:
- Create the app
- Install it to your workspace
- Add the credentials to your platform
- Chat with Chief over Slack (the agent that's pre-wired)
- View the chat sessions on the AgentOS UI.
Here's me doing it end to end:
Step 1: Create the Slack app from a manifest.
- Grab this manifest.json and replace
https://YOUR-URLwith your AgentOS URL. The events URL becomesYOUR-AGENTOS/slack/eventsand the interactivity URL becomesYOUR-AGENTOS/slack/interactions. Also update thedisplay_informationandbot_user.display_name. - Then go to api.slack.com/apps and Create New App → From a manifest, pick your workspace, and paste in the manifest. The manifest pre-configures everything: the scopes, the event subscriptions, interactivity.
Note: create the app after your platform is live. Slack sends a verification challenge to
/slack/eventsand AgentOS answers it automatically, so the URL is verified on creation.
Step 2: Install it to your workspace.
Click Install App → Install to Workspace → Allow. Copy two values: the Bot User OAuth Token (starts with xoxb-) from the install page, and the Signing Secret from Basic Information.
Step 3: Add the credentials to your platform.
Open the .env.production file and add both values to SLACK_BOT_TOKEN and SLACK_SIGNING_SECRET, then sync and redeploy. You can just tell your coding agent to redeploy the platform or run the following commands manually.
./scripts/railway/env-sync.sh
./scripts/railway/redeploy.shThat's it. Find your agent under Apps in Slack and say hello. Then invite it to a channel and mention it:
/invite @Chief
@Chief tell me about yourself.If you want to see the code, open app/main.py and you'll see:
if SLACK_BOT_TOKEN and SLACK_SIGNING_SECRET:
interfaces.append(
Slack(
agent=chief,
streaming=True,
resolve_user_identity=True,
token=SLACK_BOT_TOKEN,
signing_secret=SLACK_SIGNING_SECRET,
)
)How it works
When you message the agent, Slack sends an event to https://your-url/slack/events. There AgentOS runs a signature check and responds in a thread. Streaming is on by default, so responses appear as they're generated, with task cards showing progress on longer work.
Two details worth understanding:
- Threads are sessions. Each Slack thread maps to one session (the ID is literally
chief:{channel_id}:{thread_ts}). - With
resolve_user_identity=True, each sender resolves to their email, so the agent knows who it's talking to. Chief keeps a private profile and memory for every person, while notes and entities stay shared across the team. Ask the same question as two different people and you'll get answers shaped by what Chief knows about each person.
Monitoring and Observability
Open the AgentOS UI and go to the Sessions and Traces tabs. Every Slack thread is there with its full history. You can also ask the Platform Manager about usage, run activity, and tool activity.
A couple of notes on security
You just deployed a public agent platform. It's important to understand your security posture. Your platform has two entry points:
The platform entry point. JWT auth is on by default in production. Every API and MCP request needs a valid bearer token, and the verification key you pasted during deploy is what checks them. The MCP endpoint adds OAuth on top (MCP_CONNECT_SECRET) so chat apps like claude.ai can connect with authentication.
The Slack entry point. The events webhook is public by design. That's safe because every request carries an HMAC signature computed with your signing secret. Requests older than five minutes are rejected.
Wrapping up
Here's the picture after this post:
┌──► AgentOS UI build, monitor, improve
│
├──► Slack where your team works ◄── you are here
Your agents ───┤
├──► MCP claude.ai, ChatGPT, Claude Code, Cursor
│
└──► REST API your own productOne backend for every frontend. Your agent now lives where your team works, with auth on both entry points and full visibility from the AgentOS UI.
Thanks for reading!
Ashpreet