Documentation Index
Fetch the complete documentation index at: https://agno-v2-shaloo-ai-support-link.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Enable Agno agents to perform Telegram bot operations.
For selective functions access use enable_ flag patterns.
Prerequisites:
from agno.agent import Agent
from agno.tools.telegram import TelegramTools
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
telegram_token = "<enter-your-bot-token>"
chat_id = "<enter-your-chat-id>"
# Example 1: All functions enabled (default behavior)
agent = Agent(
name="telegram-full",
tools=[
TelegramTools(token=telegram_token, chat_id=chat_id)
], # All functions enabled
description="You are a comprehensive Telegram bot assistant with all messaging capabilities.",
instructions=[
"Help users with all Telegram bot operations",
"Send messages, handle media, and manage bot interactions",
"Provide clear feedback on bot operations",
"Follow Telegram bot best practices",
],
markdown=True,
)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
agent.print_response("Send a message to the bot")
Run the Example
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/91_tools
# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate
python telegram_tools.py
For details, see Telegram tool cookbook.