Telegram Instant Messenger
Two-way messaging through the shared AgentPMT Telegram bot.
User Setup
The shared tool binds each budget to one Telegram user/chat via a short 6-digit OTP.
- Call any action (
send_message,send_photo,send_document, orget_updates) - The tool checks whether the budget is already bound
- If not bound, it returns
status: connection_requiredwithchat_url,otp_code, andstart_command - User opens
chat_urland sendsstart_commandexactly (example:/start 123456) - User sends any follow-up message in the same chat
- On every request while unbound, the tool checks Telegram updates for a matching
/start <otp_code>and binds immediately when found
Shared Bot Scope
For the shared AgentPMT bot, each budget is scoped to one Telegram chat.
chat_idis not accepted in shared-tool requests- Outbound actions automatically use the stored scoped chat from the budget binding
get_updatesautomatically filters to the bound chat/user once connected
Actions
send_message
Required: text
send_photo
Provide one of:
photo(URL, Telegram file_id, or base64)photo_file_id(AgentPMT File Manager file_id)
send_document
Provide one of:
document(URL, Telegram file_id, or base64)document_file_id(AgentPMT File Manager file_id)
If using base64 document, filename is required.
get_updates
Optional:
offset,limit(1-100),timeout(0-60),allowed_updatesunread_only,cursor_offset,mark_as_readingest_files_to_manager,ingest_max_files,ingest_expiration_days
When not yet connected, this action returns status: connection_required with chat_url, otp_code, and start_command.
File Manager Flows
- Send from File Manager: use
photo_file_idordocument_file_id - Save inbound Telegram media: set
ingest_files_to_manager: trueonget_updates - Ingested uploads are returned in
ingested_fileswith new File Managerfile_idvalues
Shared Optional Params (send actions)
parse_mode, caption, reply_markup, disable_notification, protect_content, message_thread_id






