Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agno.com/llms.txt

Use this file to discover all available pages before exploring further.

The Telegram interface turns any Agno agent, team, or workflow into a Telegram bot with streaming responses, media handling, and group chat support.

Quick Start

telegram_agent.py
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.os.app import AgentOS
from agno.os.interfaces.telegram import Telegram

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

agent_os = AgentOS(
    agents=[agent],
    interfaces=[Telegram(agent=agent)],
)
app = agent_os.get_app()
uv pip install 'agno[telegram]'
python -m agno.os.serve telegram_agent:app --port 7777

How It Works

ConceptBehavior
SessionsEach chat is a session (tg:{agent}:{chat_id}). Send /new to reset.
StreamingToken-by-token with live message edits, throttled for rate limits
GroupsResponds to @mentions and replies by default. Disable privacy mode in BotFather for all messages.
MediaPhotos, voice, video, documents, stickers in and out

Setup

Requires a bot token from @BotFather and a webhook URL. See the full setup guide for step-by-step instructions. Environment variables:
export TELEGRAM_TOKEN="..."
export TELEGRAM_WEBHOOK_SECRET_TOKEN="..."  # production only

Next Steps

Full Guide

Sessions, groups, media, commands, and troubleshooting.

Reference

All parameters, endpoints, and events.

Examples

Agents, teams, workflows, and multimodal examples.

TelegramTools

Proactive messaging, photos, and message management.