> ## Documentation Index
> Fetch the complete documentation index at: https://flow.engineer/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Telegram agent

> Connect a Telegram bot and try your Flow agent from your phone.

Telegram is a quick way to try your agent on a real phone. Flow Messaging delivers the bot's
messages; your tools and skills stay in the same Flow project.

## Try it from the starter

```sh Terminal
npx @flow-engineer/flow link --channel telegram
npm start
```

Open the Telegram link and send its join message. Ask “What's on the menu?”

**Check it worked:** the bot replies and the playground's **Debug** view shows `get_menu`.

## Use your own bot

Configure a Telegram sender in Flow Messaging, then set `FLOW_MESSAGING_KEY` and
`FLOW_MESSAGING_TELEGRAM_SENDER` in your runtime. The starter's `fm.channels()` includes Telegram.

For a custom entry point, pass `channels: [fm.telegram()]` to `buildAgent`, call
`await agent.resume()` and start `fm.start(agent, { cursorFile })`.
See the [adapter guide](https://github.com/flow-engineer/flow/blob/main/flow-messaging/README.md)
for the connection options.

## What changes on Telegram

* The agent writes Markdown; the adapter sends it as Telegram's HTML. Inline keyboards take up to
  ten buttons.
* Photos can carry captions and a keyboard. Telegram has no carousel, so a carousel goes as its
  text, then one message per card in order: the card's photo with its text as caption and its
  buttons under it. A card with buttons needs a text, or the carousel is refused before anything
  is sent.
* Bot read receipts are not available.
* The channel address is the Telegram user id, not a verified phone number.
* From Framework 0.8.1, traces name the platform: `chinwag.channel` is `telegram` (it was `web`).

Use [`resolve`](https://flow.engineer/docs/conversations#one-person-across-messaging-channels) if an authenticated Telegram
identity should map to an account in your product. Keep shared trial bots for testing;
use your own sender for customer conversations.
