Skip to content

Connect AI Agent to Telegram

Eidos allows you to connect your AI agent directly to external messaging platforms. This provides a two-way interactive experience: you can chat with your agent, ask questions about your data, and trigger tools—all from your favorite messaging app.

The Telegram channel allows you to interact with your agent through a private Telegram bot.

First, you need to create your own bot on Telegram to get an API Token.

  1. Open Telegram and search for @BotFather.
  2. Send /newbot and follow the instructions to give your bot a name and a username.
  3. Once created, copy the HTTP API token. It looks like 123456789:ABCDefgh....

Now, connect the bot to your Eidos installation.

  1. Open Eidos Desktop and go to Settings → AI.
  2. Scroll down to the Channels section.
  3. In the Telegram card, toggle the Enabled switch to ON.
  4. Paste your Bot Token into the input field.
  5. Select a Default Space that the bot will use for context.
  6. Select a Default Model for the bot to respond with.
  7. Restart Eidos Desktop to start the bot service.

Open your new bot in Telegram and tap Start. You can now:

  • Chat directly: Ask questions or give tasks to your agent.
  • Switch Space: Use the /space command to switch between your Eidos spaces.
  • Manage Sessions: Each Telegram chat creates a persistent session in Eidos.

When the Telegram channel is enabled, Eidos Desktop starts a “long polling” process. It constantly checks for new messages from your bot. When a message arrives:

  1. Eidos identifies the chat and retrieves the corresponding session state.
  2. It constructs the AI context using your selected Space and Model.
  3. The agent processes the message (and any tool calls) and sends the response back to Telegram.

All of this happens locally on your machine—Eidos doesn’t use any middle-man servers for the chat logic, ensuring your data context remains private.

By default, any user who knows your bot’s username can talk to it and access your data. To prevent unauthorized access, you should enable Telegram’s native bot access control.

Telegram allows you to restrict who can interact with your bot directly in the Telegram app settings.

  1. Open the Telegram app and find your bot.
  2. Tap on the bot’s name to open the Bot Info profile.
  3. Tap Edit (or go to Settings / Privacy depending on your Telegram client).
  4. Look for a section called Access or Privacy.
  5. Toggle Restrict bot usage to ON.
  6. Ensure your own account is in the Allowed users list.

When enabled, only you and users you explicitly select can interact with the bot. This ensures your Eidos data context remains private even if someone else discovers your bot.