---
title: Deploy to Telegram
description: "Run a text agent as a Telegram bot in direct messages, groups and channels, with a token from BotFather and nothing else to host."
---

<Badge variant="accent">Text agents</Badge>

A Telegram deployment runs a text agent as a Telegram bot: it *runs as a Telegram
bot in direct messages, groups and channels*. Each chat with the bot is one
conversation for the agent.

:::note[Before you start]
You need a published text agent and a bot created with **@BotFather** in
Telegram, which gives you the bot's token.
:::

## Create the deployment

1. **Start the wizard**

    Under **Launch AI Text** choose **New Deployment**, then **Telegram**. Picking it moves
    the wizard straight on to the agent.

2. **Pick the agent**

    Choose the text agent under **Agent**. **Next**.

3. **Name it**

    Accept or edit the **Display Name**, then **Create Deployment**. The
    deployment is listed as **Needs setup** with a **Webhook URL**.

![The agent step of New Deployment for Telegram.](/media/deploy/new-deployment-telegram.webp)

## Connect Telegram

Open the deployment from the list and enter the **bot token** BotFather issued.
Telegram delivers updates by webhook; the deployment registers its **Webhook URL**
with the token, so nothing else is needed on the Telegram side.

For groups, BotFather's `/setprivacy` decides whether the bot sees every message
or only commands and mentions. Leave privacy on if the bot should answer only when
addressed.

## Verify

- The deployment shows **Active**.
- Open the bot in Telegram and send `/start` or a message. The reply comes from
  the agent, and the exchange is listed under **Conversations** with the platform
  `telegram`.

## Troubleshooting

- **The bot never replies.** The token is wrong or was regenerated in BotFather.
  Paste the current one.
- **It answers in DMs but ignores a group.** Group privacy is on, so it only sees
  messages that mention it, or it was not added as a member. Mention it, or turn
  privacy off with `/setprivacy`.

## Related

- [Bot deployments overview](/deploy/bot-deployments/overview)
- [Conversations](/operate/conversations)
- [Quickstart: your first text agent](/get-started/quickstart-text-agent)
