AI agent case

Hermes Agent: Self-Hosted AI Assistant with Persistent Memory and Telegram

A real setup of Hermes Agent on a VPS with Telegram as the interface. What it took to install, what broke along the way, what it actually costs, and when it makes sense over a managed tool like Claude Projects.

The problem

Claude Projects and ChatGPT Projects are useful, but they have a ceiling. Every session starts fresh unless you manually reload context. Claude Projects with a loaded .md file works, but you maintain that file manually. Hermes maintains its own memory autonomously. For a single question that is fine. For an assistant that handles recurring operational tasks across days and weeks, it means you spend time re-explaining the same things instead of just getting work done.

The other issue is availability. Managed tools run on someone else's schedule. Rate limits, outages, and interface changes are outside your control. If the assistant is part of your daily operations, that dependency matters.

An assistant that lives on your server remembers what it learns and works on your schedule, not a vendor's.

Hermes Agent is open source, MIT licensed, and runs on any VPS from about $5 per month.

Setup time About 15 minutes from curl to first Telegram message
Monthly cost $5-7 VPS + $2-5 LLM tokens
License MIT, Nous Research, first released May 2026

What Hermes actually is

Hermes Agent is an open-source autonomous AI agent built by Nous Research. It is not a chatbot wrapper and not a simple Telegram bot. It is a long-running process that lives on your server, remembers what it learns, runs tasks on a schedule, and gets more capable the longer you use it.

The key difference from Claude Projects or ChatGPT Projects: Hermes maintains its own memory autonomously. After you give it your business context once, it carries that forward across every session. You do not re-explain who you are, what you build, or what your stack looks like every time you open a chat.

Persistent memory

Hermes writes structured memories after each session. Next time you start, it already knows your business, your tools, your clients, and your preferences.

Skills layer

After completing a complex task, Hermes writes a reusable skill so it can handle the same task faster next time. The longer it runs, the more capable it becomes at your specific workflows.

Scheduled tasks

Cron-based task runner built in. Set a morning digest, a weekly report, or a daily status check. It runs without any trigger from you.

Tools selected at setup

Web search, browser automation, file operations, code execution, image generation, and cross-platform messaging can be enabled during setup. Keep the Telegram toolset as small as the actual job allows.

Bring your own model

Hermes supports Anthropic, OpenAI, Google Gemini, DeepSeek, OpenRouter, Nous Portal, local endpoints, and other compatible providers. The model can change without reinstalling the agent.

Local state, external inference

Hermes stores its sessions, memory, and skills on your server and does not add its own telemetry. Prompts and relevant tool context still go to the LLM provider you configure unless you use a local model.

The setup

Installation runs through a single curl command. The installer auto-detects dependencies, installs Python 3.11 and supporting tools if they are missing, and walks through provider selection, platform configuration, and tool enablement via interactive menus.

Hermes Agent installer terminal output on Ubuntu: auto-detecting Python, Git, Node.js, ripgrep, and ffmpeg dependencies
The installer detects Ubuntu, installs missing dependencies automatically, and handles Python version management without manual setup.
Hermes Agent provider selection menu showing 20-plus LLM providers including Anthropic, OpenAI, Google Gemini, DeepSeek, and OpenRouter
Over 20 LLM providers available at setup. Nous Portal is the default, bundling 300+ models with tool use included.
Hermes Agent platform selection menu showing Telegram, Slack, Discord, WhatsApp, Email, Signal, and 15 more messaging platforms
Platform selection covers Telegram, Slack, Discord, WhatsApp, email, Signal, and more. Telegram was the choice here for daily operational use.
Hermes Agent tools selection showing web search, browser automation, file operations, code execution, memory, cron jobs, and more
Tools enabled at setup: web search, file operations, code execution, persistent memory, cron jobs, cross-platform messaging, and task planning.
Hermes Agent TTS provider selection with Microsoft Edge TTS selected as free recommended option
TTS is optional. Microsoft Edge TTS is free and needs no API key, a reasonable default for voice message support.
Hermes Agent installation complete screen showing available commands: hermes, hermes setup, hermes config, hermes gateway install
Installation complete. File paths are redacted. The next step is running hermes gateway install to set up the Telegram service.
Hermes gateway installed as a systemd user service with linger enabled so it survives SSH logout
The gateway runs as a systemd user service. Linger is enabled automatically so Hermes keeps running after SSH logout. No screen or tmux needed.
Telegram userinfobot profile showing how to get your Telegram user ID for Hermes Agent setup
To lock Hermes to your account only, you need your Telegram user ID. @userinfobot gives it to you in one message.

Lock Telegram down before enabling server tools

The setup wizard asks for a numeric Telegram user ID. That value is the sender allowlist, and it is different from a chat or group allowlist. In current Hermes configuration, the important setting for a private bot is TELEGRAM_ALLOWED_USERS or its allow_from equivalent in the active profile.

TELEGRAM_ALLOWED_USERS=123456789

Use your own numeric ID from /whoami or @userinfobot, never the placeholder above. An empty allowed_chats field by itself does not prove that the bot is open because it controls a different scope. Verify the effective sender allowlist instead: it should contain your ID, no wildcard, and no group IDs unless group access is intentional.

Live verification: this deployment has exactly one sender in TELEGRAM_ALLOWED_USERS, with no wildcard, guest mode, group allowlist, profile override, or systemd override. Its empty allowed_chats value therefore does not let other Telegram users control Hermes. It only means the approved sender can reach the bot from any chat the bot has joined. Keep sensitive commands in the private DM because replies sent in a group remain visible to that group.
Do not combine an Internet-reachable messaging bot with unrestricted NOPASSWD: ALL sudo. Hermes documentation recommends passwordless sudo only for specific commands when messaging access genuinely needs it. A safer production layout runs the Telegram gateway as a dedicated non-root user or uses a sandboxed terminal backend, while full administration stays in an authenticated SSH or local CLI session.

The live setup in this case was rechecked on Hermes Agent v0.18.2 on July 18, 2026. The official Telegram configuration guide documents TELEGRAM_ALLOWED_USERS, and the Hermes security and troubleshooting guide explains the safer sudo pattern.

What it does in practice

After setup, Hermes is reachable on Telegram. The first interaction is straightforward: send it your business context and it saves it to persistent memory.

Hermes Agent first Telegram message introducing itself as a self-hosted AI agent running on this machine
First response after gateway setup. Hermes confirms it is running on the machine and lists what it can do.
Hermes Agent saving business context to persistent memory in Telegram: name, business, stack, infrastructure, and client profile
Business context saved to memory on first session: name, business, tech stack, infrastructure, and client profile. This persists across all future sessions.
Hermes Agent recalling saved business context after a fresh Telegram session with a different model, remembering name, business, stack, and client profile
After deleting the chat and switching to a different model, Hermes recalled the full business context from memory on the first message. This is the key difference from a managed AI tool.
The memory-context screenshot above is the most important one. The chat was deleted, the model was changed, and Hermes came back knowing who the user is and what they build. That is persistent memory working as intended.

What did not work

DeepSeek was the first provider selected because of the low cost. It failed immediately with a provider error on every message. The gateway logs showed the API was returning empty responses. The actual reason turned out to be simple: the DeepSeek account balance was below $0.01, not enough to process even a test request.

The current deployment now uses deepseek-v4-pro through the direct DeepSeek API. With provider deepseek, the clean model identifier is deepseek-v4-pro; repeating the provider prefix as deepseek/deepseek-v4-pro can trigger a configuration warning even when requests still work.

Hermes Agent Telegram error: model provider failed after retries, check gateway logs for diagnostics
Provider failure message in Telegram. The error handling is clean: Hermes surfaces the problem without exposing raw API details in the chat.
DeepSeek API dashboard showing topped-up balance under one cent, the cause of provider failures
Root cause: less than $0.01 balance on the DeepSeek account. Switching to Google Gemini free tier resolved it immediately.

Two other things worth knowing before setup:

Cost

Hermes Agent

Free. MIT license, no subscription, no per-seat fee.

VPS

About $5-7 per month on Contabo or a comparable provider. The same server can run n8n alongside Hermes without conflict.

LLM tokens

DeepSeek V4 Pro is usage-based. On July 18, 2026, the official direct API price was $0.003625 per million cached input tokens, $0.435 per million uncached input tokens, and $0.87 per million output tokens. Actual monthly cost depends on context size, tool output, and usage. Prices may change.

Model cost is not the only limit. Long conversations, repeated tool output, and large memory context can use more tokens than the visible Telegram message suggests. Check provider usage and keep only the tools and context the task needs. Confirm current prices on the official DeepSeek pricing page before choosing a model.

If you are still deciding whether an AI agent is the right fit for your situation, the AI agents for business guide covers the difference between chatbots, automation workflows, and agents, and when each one makes sense.

When this makes sense vs Claude Projects

Use Hermes when

You want the assistant to remember your business context permanently, run scheduled tasks automatically, stay available 24/7 on your own infrastructure, and work through Telegram without opening a browser.

Use Claude Projects when

You need a capable reasoning assistant for occasional deep work, research, or writing tasks. Claude Projects is faster to start, requires no server, and is better suited for tasks where raw model quality matters more than persistence.

Run both

Hermes handles daily operations and scheduled tasks through Telegram. Claude Projects handles heavier analysis and writing work in the browser. They cover different parts of the workflow and do not overlap.

Want a similar setup for your business?

If you want a self-hosted AI agent running on your own server with Telegram access and persistent memory, this is a one-session setup. Send a short description of what you want the agent to handle and I will map the smallest practical version first.

Get a setup map