Skip to content

Deploy Agent to Telegram#

Beta Feature

Deployments are experimental and currently in private beta. If you're interested in testing it now, please reach out to the devs on [Discord](https://discord.com/invite/4dSYwDT).

Users who have been granted access to the deployment beta will notice a "Deployments" section in each Agent's settings. Through this interface, you can deploy your agent to either Telegram or Discord.

To deploy an agent to Telegram, follow these steps:

  1. Message BotFather in Telegram.
  2. Send the message /newbot to create a new bot, and give your bot a display name and username which ends with _bot.
  3. Copy the token and save it somewhere safe. You will need it in the next step.
  4. In order to let the bot receive messages in groups, you need to disable privacy mode. You can do this with the command /setprivacy and then enter "Disable" when prompted.
  5. Once your bot is created, you'll receive a token.

Creating a new bot in Telegram

Additionally, use the command /setuserpic to upload the bot's profile picture.

Now go to your agent's deployment settings, select Telegram, and paste the token into the "Token" field.

Enter the token and click 'Deploy'

Lastly, you need to specify the "Allowed Channels" field, which is all of the channels the bot is permitted to chat. These are called "groups" or "topics" in Telegram.

To get the ID of a topic or group, you have to visit the channel in Telegram web and then inspect the url when you've selected the group.

If the group does not have topics

Inspect the link in the browser, and copy everything after the last slash and #. It should look something like -some_number. Here it is -4656194598.

Inspect the link in the browser, and copy everything after the last slash and #. It should look something like -some_number.

If the group has topics

Inspect the link in the browser, and copy everything after the last slash and #. The group ID should look something like -100 + some_number + _some_string. If your URL doesn't look like this and your URL has a /k/, try changing it to /a/ instead. Here it is -1002429164874_30.

Inspect the link in the browser, and copy everything after the last slash. The group ID should look something like -100 + some_number + _some_string.

Copy these IDs and paste them into the "Allowed Channels" field for each channel you want your bot to post to.

Once you're done, click "Deploy." You will be alerted that the deployment is starting. Once it's done, the deployments page will show the status of the deployment. If it is successful, you should now be able to interact with your agent in Telegram. Try mentioning it in a message.

Deployment Timing

The deployment may show as "successful" a couple minutes before it is actually ready. If it is successful but not responding, please wait a few more minutes.

Troubleshooting#

Bot Not Responding#

  • Check that the bot token is correct and hasn't been reset
  • Verify the bot has proper permissions in the Telegram group
  • Ensure the group ID is correctly formatted in "Allowed Channels"
  • Check that the bot is active and not blocked

Permission Issues#

  • Make sure privacy mode is disabled for group chats
  • Verify the bot has proper permissions in your Telegram group
  • Check that the bot role has the necessary permissions

Deployment Failures#

  • Verify your Telegram bot is properly configured
  • Check that the bot token is valid and not expired
  • Ensure all required settings are saved in BotFather

Best Practices#

Security#

  • Keep your bot token secure and don't share it publicly
  • Use the minimum required permissions for your bot
  • Regularly rotate your bot token if needed

Channel Management#

  • Start with a few test channels before deploying widely
  • Use descriptive labels for channel IDs in Eden
  • Monitor bot activity to ensure appropriate behavior

User Experience#

  • Set clear expectations for what your bot can do
  • Provide helpful error messages when things go wrong
  • Consider rate limiting to prevent spam

Next Steps#

Once your Telegram bot is working:

  1. Test Basic Functionality - Ensure your agent responds appropriately
  2. Configure Advanced Settings - Set up custom behaviors and responses
  3. Monitor Performance - Track usage and identify areas for improvement