Skip to main content
To connect an agent to Slack, you need three pieces in place:
  1. A public endpoint for Slack to send events to. In development, use ngrok to forward Slack traffic to your local AgentOS server.
  2. A Slack app that represents your agent in the workspace. This is what users see under Apps in Slack, with its own name, icon, and permissions.
  3. Credentials so your agent can talk to Slack and verify incoming requests. You’ll use a bot token for Slack API calls and a signing secret for webhook verification.
After setup, Slack events follow this path:
Slack  →  https://YOUR-URL/slack/events  →  AgentOS  →  Agent
The guide below walks through the setup step by step.
Install dependencies first: uv pip install 'agno[slack]'

1. Expose your local server

Slack needs a public HTTPS URL for event callbacks. For local development, start an ngrok tunnel to your AgentOS server:
ngrok http 7777
You now have a public HTTPS endpoint. Copy the forwarding URL, since the app you create next will point at it.
ngrok generates a new URL on each restart. For production, use a stable domain instead (see the deployment guide).

2. Create the Slack app

Create a Slack app for your agent and configure the permissions and events it needs.
The manifest is the quickest setup path. It pre-configures the scopes, events, and settings needed for DMs, @mentions, and Human-in-the-Loop interactions.
  1. Download manifest.json and replace https://YOUR-URL with your ngrok URL
  2. Go to api.slack.com/appsCreate New AppFrom a manifest
  3. Select your workspace, choose JSON, and paste the manifest contents
  4. Click Next, review the summary, then click Create
Your Slack app now has the required scopes and event subscriptions.

3. Install and collect credentials

The last remaining problem is authentication, and installing the app to your workspace generates both credentials you need.
  1. Click Install App in the sidebar
  2. Click Install to Workspace, review permissions, then click Allow
  3. Copy the Bot User OAuth Token (starts with xoxb-)
  4. Go to Basic InformationApp Credentials and copy the Signing Secret
Export them so your code can authenticate:
export SLACK_TOKEN="xoxb-..."           # Bot User OAuth Token
export SLACK_SIGNING_SECRET="..."       # From Basic Information → App Credentials
Slack-side setup is complete: the app exists, it points at your URL, and you hold its credentials.

4. Connect your agent

With all three problems solved, the only thing left is to connect the agent itself:
app.py
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.os.app import AgentOS
from agno.os.interfaces.slack import Slack

agent = Agent(name="My Agent", model=OpenAIResponses(id="gpt-5.4"))

agent_os = AgentOS(
    agents=[agent],
    interfaces=[Slack(agent=agent)],
)
app = agent_os.get_app()

if __name__ == "__main__":
    agent_os.serve(app="app:app", reload=True)
python app.py
AgentOS mounts the Slack interface at /slack/events, the same path your webhook points at. Events from Slack now reach your agent.

5. Test in Slack

Once the agent is running, verify everything works by sending it a message. The quickest check is a direct message: find your agent under Apps in Slack and say hello. To test in a channel, invite the agent and then mention it:
/invite @MyAgent
@MyAgent hello!
Each thread keeps its own conversation, so follow-up messages in the same thread don’t need another @mention.
If the agent replies, events are flowing from Slack through AgentOS to your agent. Setup is complete.

Customization

The five steps above cover the standard setup. Two adjustments come up often enough to walk through here.
Scope and event changes require reinstalling. Go to Install AppReinstall to Workspace after any change.

Respond to all channel messages

By default, the agent only responds to @mentions and DMs. To respond to every message in channels it’s in:
  1. In Event Subscriptions, add message.channels and message.groups events
  2. Go to Install AppReinstall to Workspace
  3. Update your code:
Slack(agent=agent, reply_to_mentions_only=False)
See Response control for how this changes the agent’s behavior.

Add search tools

If your agent uses SlackTools.search_workspace(), the app needs three additional scopes:
  • search:read.public
  • search:read.files
  • search:read.users
Add them under OAuth & Permissions, then reinstall.

Next steps

Once your agent is responding in Slack, continue with the deeper interface guides.

Features

Sessions, files, streaming, and more

Human-in-the-Loop

Pause for approval before taking actions

Reference

All parameters, scopes, and events