Metadata-Version: 2.4
Name: meshagent-telegram
Version: 0.44.14
Summary: Telegram channel support for MeshAgent
License-Expression: Apache-2.0
Project-URL: Documentation, https://docs.meshagent.com
Project-URL: Website, https://www.meshagent.com
Project-URL: Source, https://www.meshagent.com
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: meshagent-api==0.44.13
Requires-Dist: meshagent-agents==0.44.13
Requires-Dist: telethon<2,>=1.36
Dynamic: license-file

# MeshAgent Telegram

Telegram account channel support for MeshAgent process agents.

This package exports `TelegramChannel` and `create_channel(...)` for use with a
MeshAgent process channel shim.

Set `TELEGRAM_API_ID`, `TELEGRAM_API_HASH`, and `TELEGRAM_BOT_TOKEN` before
starting the channel. The bot token comes from BotFather; users must start the
bot or add it to a chat before Telegram will deliver messages to the channel.

Set `MESHAGENT_TELEGRAM_ALLOWED_CHAT_IDS` to a comma-separated chat ID allowlist
to process and respond only in specific Telegram chats. Use Telethon's marked
chat IDs, such as positive private chat IDs, negative group IDs, and `-100...`
channel or supergroup IDs. Leave it empty to allow all chats.

Inbound Telegram media is downloaded with Telethon, uploaded to room storage
under `MESHAGENT_TELEGRAM_MEDIA_STORAGE_PREFIX`, and passed to the agent as
`AgentFileContent`. `MESHAGENT_TELEGRAM_INBOUND_MEDIA_MAX_BYTES` limits how
large an inbound media file the channel will download. Agent file attachments
are sent back through Telethon `send_file`; HTTP(S) URLs are sent as external
media, and `room:///...` URLs are downloaded from room storage before upload.
