Code

cookbook/agent_concepts/tools/slack_tools.py
from agno.agent import Agent
from agno.tools.slack import SlackTools

agent = Agent(
    tools=[SlackTools()],
    show_tool_calls=True,
    markdown=True,
)
agent.print_response("Send a message to #general channel saying 'Hello from Agno!'")

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.

2

Set your Slack token

export SLACK_BOT_TOKEN=xxx
3

Install libraries

pip install -U slack-sdk agno
4

Run Agent