This guide will walk you through connecting your Telegram bot to your Hermes AI agent. Once integrated, you can interact with your AI directly from Telegram.

Prerequisites

Before you begin, ensure you have:

  • An active Hermes VPS
  • A Telegram account
  • Your Hermes agent already set up (if not, complete the Hermes Agent Setup Guide first)

If you're new to Hermes, feel free to check out this guideline.

Step 1 : Create a Telegram Bot via BotFather

  1. Open Telegram and search for @BotFather.
    Screenshot for How to Integrate Telegram with Hermes

  2. Send the command /newbot to start creating a new bot.
    Screenshot for How to Integrate Telegram with Hermes

  3. Choose a name for your bot (e.g., My Assistant AI).
    Screenshot for How to Integrate Telegram with Hermes

  4. Choose a username for your bot. Important: The username must end with the word bot (e.g., my_assistanceAI_bot).
    Screenshot for How to Integrate Telegram with Hermes

  5. Save your bot token. BotFather will send you a message with your bot's token (e.g., 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz). Keep this token secure, you'll need it in Step 3.
    Screenshot for How to Integrate Telegram with Hermes

Tip: Click the bot link BotFather provides (e.g., t.me/my_assistantAI_bot) to open your bot and send it a test message later.

Step 2 : Get Your Numeric Telegram ID

To ensure only you can control your Hermes agent, you need your personal numeric Telegram User ID:

  1. Search for @userinfobot in Telegram.
    Screenshot for How to Integrate Telegram with Hermes

  2. Send any message to receive your exact numeric ID (e.g., 987654321). Then, copy your numeric ID.
    Screenshot for How to Integrate Telegram with Hermes

Step 3 : Configure Hermes on Your VPS

  1. SSH into your Hermes VPS.

  2. Run setup command: hermes gateway setup

  3. When prompted, select platform and choose Telegram from the list.
    Screenshot for How to Integrate Telegram with Hermes

  4. Enter bot token and paste the token you saved from @BotFather.
    Screenshot for How to Integrate Telegram with Hermes

  5. Enter your user ID and paste the numeric ID you got from @userinfobot.
    Screenshot for How to Integrate Telegram with Hermes

  6. Continue through the remaining prompts, configure other settings according to your preferences.

Important: Telegram bot will not respond until this configuration is successfully completed.

Step 4 : Test Your Connection

  1. Open Telegram and find your bot (use the link from BotFather or search its username).
    Screenshot for How to Integrate Telegram with Hermes

  2. Send /start or send any message to the bot. Wait for a response. If everything is configured correctly, your Hermes agent will reply.
    Screenshot for How to Integrate Telegram with Hermes

You have successfully integrate Telegram with Hermes.


Need Further Assistance?

If you need help with this guide, our support team is ready to assist you.

¿Le ha resultado útil esta respuesta? 0 Los usuarios encontraron esto útil (0 Votos)