The most reliable way to use Hermes Agent with Telegram is to create a bot with BotFather first, and then run the hermes gateway setup. The official Telegram documentation recommends an interactive configuration, which will let you fill in the bot token and the user ID allowed to access.
Basic steps
- Search for
BotFatheron Telegram. - Send
/newbot, create a bot and get a token. - To get your Telegram user ID, you can use
get_id_bot. - Run
hermes gateway setupand select Telegram. - Start the
hermes gatewayand send a message to the bot for testing.
Why do you need to fill in allowed users?
Because after the bot token is leaked, someone else may control your bot. TELEGRAM_ALLOWED_USERS can limit who can talk to the Hermes Agent. Add multiple IDs as needed as your team uses them.
In a word: BotFather takes the token, get_id_bot takes the user ID, and hermes gateway setup writes the configuration.
Official open source address: https://github.com/NousResearch/hermes-agent; Official document entry: https://hermes-agent.nousresearch.com/.