Slack

Run agents, teams, and workflows in Slack with session routing, streaming, file handling, and human-in-the-loop approvals.

The Slack interface routes messages from Slack users and threads to agents, teams, or workflows in AgentOS.

Coda, a code review agent in Slack

The Slack interface provides:

  1. Session routing: Slack users and threads map to AgentOS user and session IDs
  2. File handling: Uploads and downloads work out of the box
  3. Human in the loop: Pause for approvals before sensitive actions
  4. Streaming: Responses stream live with task cards showing progress

Add a database and enable history or memory on the agent or team when replies need context from earlier runs.

Quick start

agent.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="Support Bot", 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="agent:app", reload=True)

Install dependencies

uv pip install 'agno[os,slack]' openai

Create Slack App

Follow the setup guide to create your app and get credentials.

Set credentials

export OPENAI_API_KEY="..."
export SLACK_TOKEN="xoxb-..."
export SLACK_SIGNING_SECRET="..."

Run

Run the file from the tab you used:

python agent.py
python team.py
python workflow.py

Multiple bots

Run multiple agents on the same server, each with its own Slack App. Useful when you need separate bots for different functions (support vs. sales) or different workspaces.

multi_bot.py
agent_os = AgentOS(
    agents=[ace_agent, dash_agent],
    interfaces=[
        Slack(
            agent=ace_agent,
            prefix="/ace",
            token=getenv("ACE_SLACK_TOKEN"),
            signing_secret=getenv("ACE_SLACK_SIGNING_SECRET"),
        ),
        Slack(
            agent=dash_agent,
            prefix="/dash",
            token=getenv("DASH_SLACK_TOKEN"),
            signing_secret=getenv("DASH_SLACK_SIGNING_SECRET"),
        ),
    ],
)

Each interface mounts on its own prefix. Set each Slack App's Request URL accordingly (/ace/events, /dash/events, etc.).

Next steps