All posts

AI · · 10 min read

Telegram AI Agent: How I Run Hermes on My Home Server

An agent on a small server at home, and Telegram as the front door.

A Telegram AI agent is an AI agent that runs on a server and talks to you through a Telegram bot, so you can ask it to do real work from your phone. Mine is Hermes Agent, an open-source agent from Nous Research, running on a small server at home. I talk to it in Telegram, and it checks my servers, sends me a morning brief and answers questions from my personal wiki.

If you searched for this, you have probably found many no-code templates that connect a Telegram bot to a chat model. Those are a good start, but they mostly answer messages. I wanted something that also does things when I am not asking: checks my sites, updates itself and tells me what needs me. That needed a real agent, not only a bot.

In this guide, I will explain the difference between a bot and an agent, and how my setup works from phone to server. I will show what the agent does every day, how I query my wiki from my phone and why I later built a small app next to Telegram. At the end, I will share the limits I hit.

What Is a Telegram AI Agent?

A normal Telegram bot answers fixed commands and forgets each chat. An AI agent understands plain language, keeps memory, has skills and runs tools on a real machine. It can also start a conversation, for example when a site goes down.

Two columns. On the left, a bot: fixed commands, replies only when asked, forgets each chat, cannot touch servers. On the right, an agent: plain language, scheduled jobs, memory and skills, tools on a real machine.
Fig. 01 · A bot answers. An agent does the work.

Telegram is only the front door. The agent itself lives on a server, and Telegram carries the messages between you and it.

Why I Chose Hermes Agent

I did not build the agent. Hermes Agent is an open-source project by Nous Research, released under the MIT licence. I chose it because it already does the parts I did not want to build myself:

  • One gateway for many chat apps: One process handles Telegram, and also Discord, Slack, WhatsApp and Signal if you want them.
  • A built-in schedule: It runs jobs at set times and sends the result to a chat.
  • Memory and skills: It keeps notes about me and my servers, and it loads skills, which are written instructions for specific jobs.
  • Any model: I can choose which model it uses and change it later.

What I built are the pieces around it: the skills it uses, the jobs it runs, its access to my wiki and a small phone app.

Two columns. On the left, what Hermes Agent gives: one gateway for chat apps, a schedule, memory and skills, any model. On the right, what I built around it: skills, jobs, wiki access and a phone app.
Fig. 02 · The agent is open source. The work it does is mine.

How My Setup Works

The setup has five parts. Only Telegram and the model run outside my home:

Five boxes from left to right: Telegram on my phone, a bot made with BotFather, Hermes on my home server, Claude as the model, and my tools such as the wiki copy, servers and monitoring. Hermes is highlighted.
Fig. 03 · From my phone to my tools. Everything except Telegram and the model runs at home.
  • The bot: I made a Telegram bot with BotFather and gave its token to Hermes.
  • The gateway: Hermes runs as a background service on a small home server that also runs my other apps. It restarts on its own.
  • The model: Since October 2026, it uses Claude as its model. Before that, I used other providers.
  • The skills: Every hour, it pulls my skills from two of my own git repositories. 43 skills were active when I last checked.
  • Updates: It updates itself every morning at 04:00 and tells me when it did.

One problem took me a while to find. About one in five new connections to Telegram was being reset. The cause was a newer, larger TLS setting in the agent's Python, which something on my home internet connection did not like. The fix was a small OpenSSL file that limits it to the classic key groups:

openssl_conf = openssl_init

[openssl_init]
providers = provider_sect
ssl_conf = ssl_sect

[provider_sect]
default = default_sect

[default_sect]
activate = 1

[ssl_sect]
system_default = system_default_sect

[system_default_sect]
Groups = x25519:secp256r1:secp384r1:x448

A small change to the service loads it through the OPENSSL_CONF setting. If any Python program on your network has random connection resets, this is worth checking.

What I Use It For Every Day

Most of what the agent does happens without me asking:

Four boxes: at 04:00 it updates itself, in the morning it sends a brief of what needs me plus work news on weekdays, every two hours from 08:00 to 22:00 it checks my monitoring, and at any time it relays alerts. The morning brief is highlighted.
Fig. 04 · A normal day. Skills sync every hour in the background.
  • A morning brief: What needs my answer today, and a short summary of work news on weekdays.
  • Monitoring: Every two hours from 08:00 to 22:00, it checks my error tracker and alerts, and files new issues as tasks I can approve.
  • Alerts: When a site or server has a problem, the alert reaches me in a Telegram topic for monitoring.
  • Server chores: When I ask, it handles small server tasks. For example, it removed an old site from my monitoring after the site was retired, and updated the dashboard to match.
  • Files to my phone: It can send a file or an image straight to my Telegram chat.

In August 2026, I also used it to write code from my phone. Today I use it for my servers and my own operations, not for coding. Coding happens on my desktop, where I can see the changes properly.

How I Query My Wiki from My Phone

I keep a personal wiki that all my AI agents read and write. I wrote about it in my post on an LLM wiki for coding agents. Hermes is one of those agents.

Five boxes: the wiki on my desktop, a git sync every 15 minutes, a copy on the server next to Hermes, a search skill, and the answer in Telegram. The answer is highlighted.
Fig. 05 · The wiki follows me to my phone. Hermes reads the same pages as my coding agents.

This is how it works:

  1. A copy on the server: The server keeps a git copy of the wiki. Every 15 minutes, it pulls new pages and pushes the agent's new notes back.
  2. The same rules: Hermes has a skill with the same rules as my coding agents. It searches the wiki before answering, and it writes a short note when it learns something new.
  3. An answer with a source: When I ask about a project or a past decision from my phone, it answers with the page the answer came from. This is a small LLM RAG pipeline: find the right pages first, then answer from them.

This is the feature I value most. I can check what was decided about a project while I am away from my desk, without opening a laptop.

Why I Built a Small App Next to Telegram

After a few weeks, Telegram became noisy. My chats with the agent sat between group chats and monitoring alerts, so I started to avoid opening it. On 22 November 2026, I built Natsu, a small private web app for my iPhone that talks to the same agent.

Two phone screens from the design: a new chat with suggested questions such as "Are there pull requests waiting for me?", and an empty inbox that shows the agent's next scheduled jobs.
Fig. 06 · Two screens from the Natsu design. The interface is in Indonesian, my everyday language.

What it does:

  • An inbox: The agent posts cards for things that need my answer, ideas it suggests and news. I can answer a card with one tap.
  • Private chats: Several separate chats with the agent, each with its own history.
  • An activity log: What the agent did and what it cost, updated every 15 minutes.
  • A task board: The agent's task board, where I approve or reject new tasks.

It is small on purpose. The first load is about 46 KB compressed, and it signs in with a six-digit PIN that stays valid for a year on each device. It talks to Hermes through the agent's own API, so the memory and skills are the same as in Telegram.

What Is Not Finished Yet?

A table of five problems and fixes: noise in Telegram, network resets, an expired Google sign-in, iPhone notifications without buttons, and replies that were too long.
Fig. 07 · What went wrong. None of these were model problems.
  • Sign-ins expire: My Google sign-in for the calendar was in test mode, which expires after seven days. The calendar stopped working until I moved the app to production.
  • iPhone notifications are limited: A web app on iPhone cannot show buttons in a notification. Tapping it opens the card instead.
  • Long answers do not fit a phone: Step-by-step lists were too much on a small screen. I asked the agent to keep replies short.
  • It has real access: The agent can reach my servers. That is why it is useful, and also why I keep its access narrow and never paste passwords into the chat.
  • Most of my plans are still plans: An evening check, reminders I can snooze and a weekly review are not built yet.

What I Would Do Again

  • Use an existing agent: Hermes gave me the gateway, the schedule and memory on day one. My time went into the skills.
  • Run it on its own machine: An agent with server access should not live on my work laptop.
  • Give it the wiki: Answers with a source are worth more than clever answers.
  • Keep Telegram for alerts, a small app for conversations: Each one does its own job better.

A Telegram AI agent is most useful when it works while you are not looking, and tells you only what needs you.

FAQs

How do I set up Hermes Agent on Telegram?

Create a bot with BotFather in Telegram and copy its token. Add the token to Hermes and start its gateway. On Linux, the gateway can run as a background service so it starts again after a reboot.

Can I build a Telegram AI agent with n8n?

Yes. n8n has templates that pass Telegram messages to a model and send the reply back. That works well for answering messages. For scheduled jobs, memory and access to your own servers, a full agent such as Hermes does more out of the box.

Is Hermes Agent free?

The software is open source under the MIT licence, so you can run it yourself. You still pay for the model you connect, and for the machine it runs on.

Can a Telegram bot use Claude?

Yes. The bot only carries messages, and the agent behind it can use any model you choose. My agent uses Claude.

Is it safe to give an AI agent access to my server?

Only with care. Run it on a separate machine, give it the narrowest access it needs and keep passwords out of the chat. Review what it changes, at least until you trust each kind of task.

Next post