Connect Telegram to Hermes Agent in 5 Minutes
Connect Hermes to Telegram for 24/7 AI assistance through your favorite chat app.
Telegram is the most popular way to interact with Hermes on the go — create a private bot, connect it to your agent, and you have 24/7 AI assistance in your pocket from any device.
Before you start:
- ☑Hermes Agent installed and running
- ☑A Telegram account
- ☑Your Telegram user ID (get it from @userinfobot on Telegram)
Steps
- 1
Create a bot
Message @BotFather on Telegram and create a new bot
- 2
Get the token
Copy the bot token from BotFather
- 3
Configure Hermes
Add the token to your config.yaml under telegram: token:
- 4
Restart Hermes
hermes restart
Pro Tips
- 💡Set 'allowed_user_ids' in your Telegram config to your own user ID — this prevents anyone else from messaging your bot
- 💡Enable webhook mode instead of polling for faster response times on VPS deployments: set 'telegram: mode: webhook'
- 💡Hermes can respond in Telegram groups when @mentioned — useful for team setups
Troubleshooting
❌ Bot not responding after setup
✅ Check that your Telegram user ID is listed in 'allowed_user_ids' in config.yaml. If this list is set and your ID isn't in it, Hermes silently ignores messages from unauthorized users.
❌ BotFather token not working
✅ Copy the full token including the number prefix (e.g. '123456:ABCDEF...'). Avoid any trailing spaces when pasting into config.yaml.
❌ Bot responds in groups to everyone
✅ Set 'telegram: groupMentionOnly: true' so the bot only responds when directly @mentioned in group chats.