# How to Publish an Agent to a Telegram Channel?

You can create an agent and publish it to Telegram to chat in private or group.

## Get the Telegram Bot Token

1. **Open the Telegram App**  
   Launch the Telegram app on your device.

2. **Search for [BotFather](https://t.me/BotFather)**  
   Use the search bar to find BotFather (verified with a blue checkmark) and start a chat with it.

3. **Create a New Bot**  
   In the BotFather chat, type the command `/newbot` and send it.

4. **Set a Name for Your Bot**  
   Follow the instructions provided by BotFather to name your bot.

5. **Copy the Bot Token**  
   After naming your bot, BotFather will generate a unique token for your bot. Copy this token.  
   **Tip:** You’ll need this token to link your Telegram bot with the agent in Tate-A-Tate.

## Add a Telegram channel in Tate-A-Tate

1. **Select an agent**  
   Go to the “Agents” page and select the agent you want to configure.

2. **Choose Publish tab**  
   In the agent’s configure page, click the **Publish** tab at the top.

3. **Click Add platform button**  
   Click the **Add platform** button in the top-right corner to add a new channel.

4. **Enter a channel name**  
   In the pop-up window, enter a recognizable channel name (e.g., “Telegram Bot”).

5. **Choose Channel type Telegram**  
   From the **Channel type** list, select **Telegram**.

6. **Click Create button**  
   Once the information is complete, click **Create** to set up the Telegram channel.

7. **Enter the Telegram Bot Token**  
   In the configuration window, paste the **Bot Token** you obtained from Telegram (via BotFather). Then click **Submit** to proceed.  
   **Tip:** The connection process may take some time. Once the connection is successful, the page will refresh automatically. You don’t need to stay on the page.

8. **Publish and Start Chatting**  
   Once the publication is complete and the status changes to Online, click the Chat in Telegram button to begin interacting with your bot in Telegram.

9. **Reconnect if Offline**  
   If the agent shows an Offline status:
   - Click the Re-connect button to reactivate it.
   - **Note:** The Telegram channel may automatically go offline if there are no interactions for more than 3 days. In this case, simply click Re-connect to bring it back online.
