Skip to main content
The Telegram interface lets you serve Agno agents, teams, and workflows as Telegram bots. It handles inbound messages (text, photos, voice, video, documents, stickers), processes them through your agent, and sends responses back to the chat.

Key Features

  • Full media support - Handles 8 inbound message types and sends images, audio, video, and files back
  • Streaming responses - Progressively updates messages as content is generated (Agent only)
  • Group chat support - Responds to @mentions and replies, with per-thread session tracking
  • Works with Agent, Team, and Workflow - Any Agno entity can power a Telegram bot

Quick Start

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.os import AgentOS
from agno.os.interfaces.telegram import Telegram

agent = Agent(name="Bot", model=OpenAIChat(id="gpt-4o-mini"))

agent_os = AgentOS(
    agents=[agent],
    interfaces=[Telegram(agent=agent, stream=True)],
)
app = agent_os.get_app()

Required Configuration

VariableDescription
TELEGRAM_TOKENBot token from @BotFather
APP_ENVSet to development to bypass webhook validation locally
TELEGRAM_WEBHOOK_SECRET(Production) Secret for webhook request validation

Resources