Add AI to chats: guest bots, streaming and chat automation
What it is
Since May 2026, anyone can call a Guest Mode bot into any private or group chat by tagging its @username, even if it isn't a member. Streaming shows the answer as it's generated; chat automation lets people connect your bot to their profile to reply for them.
How to do it
- In @BotFather's Mini App, open your bot's settings and enable Guest Mode;
getMethen showssupports_guest_queries. - A tag, or a reply to the bot, brings a
guest_messageupdate withguest_query_idand any replied-to message. - Reply once with
answerGuestQuery, passing theguest_query_idand aresultshaped like an inline result; it returns aSentGuestMessage. - Streaming, in private chats: repeat
sendMessageDraftwith onedraft_idas text grows (empty text shows "Thinking…"), then send the finalsendMessage. Withcan_stop, a Stop tap bringsstopped_message_generation. - Chat automation: enable Secretary Mode in @BotFather; people connect the bot in Settings › Chat Automation and choose its chats.
Watch out
- A guest bot sees only the message that tags it and replies to it: no history, no member list, nothing more until it's tagged or replied to again.
- One reply per interaction; up to 3 guest bots per message.
- A draft is a temporary 30-second preview, up to 4,096 characters; only
sendMessagekeeps the answer. - Developer Terms, Section 4.3, prohibit collecting data for datasets, machine-learning models or AI products, such as scraping groups and channels.
With Gem
Gem doesn't offer guest mode, streaming or chat automation for your bot. Nearby: @gembot answers in your project's groups, and Gem apps get the gem library (gem.ask, gem.kb, gem.event; docs at apps.gem.bot/docs).
Sources
- https://core.telegram.org/bots/features#guest-bots
- https://core.telegram.org/bots/api#answerguestquery
- https://telegram.org/blog/ai-bot-revolution-11-new-features
- https://telegram.org/tos/bot-developers