Turn Hermes Agent Into Your Personal AI Assistant
Hermes Agent becomes much more useful once you connect it to OpenRouter and expose it through Telegram.
Turn Hermes Agent Into Your Personal AI Assistant
Hermes Agent becomes much more useful once you connect it to OpenRouter and expose it through Telegram.
With this setup, you can:
- run Hermes using OpenRouter models
- switch between different AI models anytime
- experiment with available free models
- create your own private Telegram AI bot
- access your Hermes Agent directly from Telegram
The overall flow is pretty simple:
Hermes Agent → OpenRouter → AI Model → Telegram Bot
This guide walks through the entire setup from scratch.
1. Install Hermes Agent
Start by downloading and installing Hermes Agent from the official website:
Hermes Agent
https://hermes-agent.nousresearch.com/
Follow the installation instructions for your operating system and complete the initial setup.
Once Hermes is running, you will be asked to configure an AI provider.
For this guide, we will use OpenRouter.
2. Create an OpenRouter Account
Go to:
OpenRouter
https://openrouter.ai/
Create an account or sign in if you already have one.
OpenRouter acts as a gateway to multiple AI providers and models, which means Hermes does not need to be tied to only one AI company.
Instead, you can switch models whenever you want.
Connecting OpenRouter to Hermes
3. Generate Your OpenRouter API Key
After signing in to OpenRouter:
- Open your Profile
- Go to Workspace
- Select API Keys
- Click New Key
- Give the key a recognizable name, for example:
Hermes Agent
- Create the key
- Copy it somewhere temporarily
Important: Treat your API key like a password. Never publish it on GitHub, screenshots, blog posts, or public configuration files.
4. Add the API Key to Hermes
Return to Hermes Agent.
During the initial setup:
- Select OpenRouter as your provider
- Paste your OpenRouter API key
- Complete the authorization process
Hermes should now be able to access models available through your OpenRouter account.
Changing AI Providers
One of the useful things about Hermes is that you are not permanently locked into a single provider.
To switch providers:
Hermes Agent
└── Settings
└── Providers
└── Account
Then:
- Click Select Provider
- Choose the provider you want
- Click Authorize
- Complete the required authentication
This makes it easy to experiment with different AI providers without rebuilding your entire Hermes setup.
Using Free Models
If you are just experimenting with Hermes, you may not want to immediately spend money on API usage.
OpenRouter usually exposes several models with free-access variants.
To find them inside Hermes:
- Go to the Hermes prompt bar
- Open the Model dropdown
- Search:
free
- Select one of the available models
That's it.
You can now test Hermes without committing to a paid model immediately.
Free-model availability can change over time, so the exact models available in your list may be different.
Turning Hermes Into a Telegram AI Bot
Now for the interesting part.
Instead of opening Hermes every time you want to talk to your agent, you can connect Hermes to Telegram.
Your Telegram bot essentially becomes another interface for your Hermes Agent.
You
↓
Telegram
↓
Your Bot
↓
Hermes Agent
↓
OpenRouter
↓
AI Model
5. Enable Telegram Messaging in Hermes
Inside Hermes:
- Click Messaging
- Select Telegram
Hermes will ask for information such as:
Bot Token
Allowed User ID
We will generate both next.
Creating Your Telegram Bot
6. Open BotFather
Open Telegram and search for:
@BotFather
Make sure you are using the official verified BotFather account.
You should see the verified badge next to the account.
Open the chat and create a new bot.
You can usually start the process using:
/newbot
BotFather will ask you for:
- your bot's display name
- your bot's username
For example:
Name:
My Hermes Assistant
Username:
my_hermes_assistant_bot
Telegram bot usernames normally need to end with:
bot
Once the bot is created, BotFather will provide a bot token.
It will look something like:
123456789:AAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Copy that token.
Never share your Telegram bot token publicly. Anyone with this token may be able to control your bot.
7. Add the Bot Token to Hermes
Return to:
Hermes
└── Messaging
└── Telegram
Paste the token into:
Bot Token
Do not save the configuration just yet.
We still need to tell Hermes which Telegram account is allowed to communicate with the agent.
Find Your Telegram User ID
8. Get Your Telegram ID
Open Telegram and go to:
Click Start.
The bot will return information about your Telegram account, including your numeric user ID.
For example:
Id: 123456789
Copy that number.
9. Add Your Allowed User ID
Return to the Telegram configuration inside Hermes.
Paste your Telegram ID into:
Allowed User ID
This is an important security step.
Instead of allowing random Telegram users to interact with your Hermes Agent, Hermes can restrict access to the Telegram account IDs you explicitly authorize.
Your configuration should now roughly look like:
Telegram
Bot Token:
<YOUR_TELEGRAM_BOT_TOKEN>
Allowed User ID:
<YOUR_TELEGRAM_USER_ID>
Save the configuration.
Restart the Hermes Gateway
The Telegram integration may not become active until the Hermes gateway is restarted.
Look at the bottom-left corner of Hermes.
Find the pulse / gateway icon and select:
Restart Gateway
Wait for the gateway to come back online.
Then open Telegram and send a message to the bot you created.
For example:
Hello!
If everything is configured correctly, your Hermes Agent should reply through Telegram.
Final Architecture
You have now effectively built your own Telegram-based AI agent.
┌─────────────────┐
│ You │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Telegram │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Telegram Bot │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Hermes Agent │
└────────┬────────┘
│
▼
┌─────────────────┐
│ OpenRouter │
└────────┬────────┘
│
▼
┌─────────────────┐
│ AI Model │
└─────────────────┘
The nice part about this architecture is that each layer can be changed independently.
Want another AI model?
Change the model.
Want another provider?
Change the provider.
Want to interact with Hermes through Telegram?
Your bot is already there.
Quick Setup Checklist
- Install Hermes Agent
- Create an OpenRouter account
- Generate an OpenRouter API key
- Select OpenRouter as the Hermes provider
- Add the API key to Hermes
- Select an AI model
- Search for
freeif you want to test free models - Open Messaging → Telegram
- Create a bot using
@BotFather - Copy the Telegram bot token
- Add the bot token to Hermes
- Get your Telegram user ID
- Add it under Allowed User ID
- Save the configuration
- Restart the Hermes Gateway
- Send your bot a message
Done 🎉
You now have a personal AI agent accessible directly from Telegram, powered by Hermes Agent and whichever OpenRouter model you choose.
What started as a locally configured AI agent can now behave more like your own personal assistant — available from your phone, desktop, or anywhere you have Telegram.
And because Hermes sits between the messaging platform and your model provider, you still have the flexibility to swap models and providers later without rebuilding the entire bot.
Discussion
0 comments
Be the first to comment.