Files
PraisonAI/examples/python/bots/telegram_approval_example.py
2026-02-14 00:06:53 +00:00

14 lines
416 B
Python

"""Telegram Approval — route tool approvals to a Telegram chat."""
from praisonaiagents import Agent
from praisonai.bots import TelegramApproval
agent = Agent(
name="assistant",
instructions="Help users with system tasks",
tools=["execute_command"],
approval=TelegramApproval(chat_id="YOUR_CHAT_ID"), # token from TELEGRAM_BOT_TOKEN env
)
agent.start("List the files in the current directory")