Telegram
Lobu’s Telegram adapter supports direct messages, group chats, and interactive workflows. Under the hood, Lobu uses the Chat SDK Telegram adapter to handle DMs and group messaging.
- Open @BotFather in Telegram and send
/newbot. - Pick a name and a username for the bot, then copy the bot token BotFather returns (format
<digits>:<35+ char alphanumeric>). - Store the token as
TELEGRAM_BOT_TOKENin your project.envand reference it withsecret("TELEGRAM_BOT_TOKEN")(or let the config’sbotTokenfall back to the env var). - To let the bot see all group messages instead of just commands, message BotFather with
/setprivacyand disable privacy mode. - Use Agents → Connections in the web app to add Telegram, or declare a
telegramconnection inlobu.config.ts.
To skip the bot-token setup entirely, declare a telegram connection with credentialMode: "hosted" to use the hosted Lobu bot: lobu run prints a /lobu link <code> you redeem by DMing the hosted bot.
Configuration
Section titled “Configuration”| Field | Required | Type | Description |
|---|---|---|---|
botToken | No | string | Telegram bot token from BotFather (format '<digits>:<35+ char alphanumeric>'). Falls back to TELEGRAM_BOT_TOKEN env var. |
mode | No | auto | webhook | polling | Runtime mode: auto (default), webhook, or polling. |
secretToken | No | string | Webhook secret token for x-telegram-bot-api-secret-token verification. |
userName | No | string | Override bot username. |
apiBaseUrl | No | string | Custom Telegram API base URL. |
Features
Section titled “Features”- Direct messages and group chat mentions trigger the agent.
- Streaming responses with throttled message edits.
- Markdown formatting — agent responses render as Telegram-flavored markdown.
- Interactive elements — inline buttons for user prompts, permission grants, and configuration.
- Access control — restrict which users or groups can interact with the agent.
- Webhook or long-polling —
modeselects the runtime transport (autopicks one for you).
Typical Use Cases
Section titled “Typical Use Cases”- Personal assistant in a one-on-one Telegram DM.
- Team assistant in a Telegram group (engineering, support, knowledge base).
- Notification bot that pushes agent output to a channel or group.