# Connect an agent to Telegram

Source: https://agenta.ai/docs/guides/connect-telegram

Connect an agent to Telegram, and you can chat with it from your phone. A Telegram chat is one conversation, so the agent remembers earlier messages. In groups, it answers only when it is addressed.

There are two ways to connect. The Agenta bot needs no setup. Your own bot answers under its own name.

## Connect with the Agenta bot

1. Open the agent and go to **Channels** in its sidebar. Under **Add a channel**, choose **Telegram**.
2. Choose **Agenta bot**, then click **Get link**.
3. Scan the QR code with your phone, or open the link, and press **Start** in Telegram.

The chat is now linked to the agent. If the link expires before you open it, click **Get a new link**.

On a self-hosted deployment, the operator sets up the Agenta bot first. See [Set up the hosted Telegram bot](https://agenta.ai/docs/self-host/channels/telegram-hosted-bot.md). Without it, connect your own bot.

## Connect your own bot

1. In Telegram, open @BotFather. Send `/newbot`, then pick a name and a username that ends in `bot`. BotFather replies with a token.
2. In Agenta, open the agent, go to **Channels**, and choose **Telegram**.
3. Choose **Your own bot**, paste the token, and click **Connect bot**. Agenta checks the token with Telegram, then keeps it masked.

Your bot answers only as this agent. Other bots stay connected.

## Next

- [Connect Slack](https://agenta.ai/docs/guides/connect-slack.md), [Connect Discord](https://agenta.ai/docs/guides/connect-discord.md) and [Connect WhatsApp](https://agenta.ai/docs/guides/connect-whatsapp.md) publish the same agent in other channels.
- [Share agents and chats](https://agenta.ai/docs/guides/share-agents-and-chats.md) explains who can see the conversations.
