Hermes Telegram Webhook vs Polling: Which Should You Use?

Julian Goldie — founder, AI Profit Boardroom
By Julian Goldie · 7 min read
Get The AI Profit Stack Join AIPB →
🎯 1,000+ done-for-you AI agent workflows 📅 5 live coaching calls / week with me 🛡️ 7-day refund + 30-day ROI guarantee 👥 3,000+ AI operators inside

The answer on Hermes Telegram webhook vs polling is straightforward: stick with polling — the default — if your gateway runs on an always-on machine like a home server or VPS, and switch to webhook mode if you deploy to a cloud platform that sleeps idle machines, such as Fly.io, Railway or Render, because webhooks let Telegram wake your bot with inbound traffic instead of your bot burning uptime asking for updates. That is the whole decision, and it comes from the official Hermes Agent Telegram documentation published by Nous Research. Below is how each mode actually works, the exact configuration for switching, and the group-chat gating settings you should set at the same time.

📺 Watch: NEW Hermes Agent Update is AMAZING!

🔥 Get the Agent OS as a free bonus: AI Profit Boardroom members get the full Agent OS zip, prompt libraries, daily tutorials and weekly live coaching calls. → Get inside · Want AI SEO help 1-on-1? Book a free SEO strategy session →

Hermes Telegram Webhook vs Polling: How Each Mode Works

By default, Hermes connects to Telegram using long polling. The gateway makes outbound requests to Telegram's servers and asks for new updates, over and over. Per the official docs, this "works well for local and always-on deployments" — nothing to expose publicly, no certificates, no inbound routing. The trade-off is that your machine must stay running continuously, even when nobody is messaging the bot, because a bot that stops polling goes deaf.

Webhook mode reverses the direction of the connection. Instead of your gateway asking Telegram for updates, Telegram pushes each update to a public HTTPS endpoint you control. The docs describe the switch simply: when the webhook URL is configured, the gateway "starts an HTTP webhook server instead of polling". Because traffic now arrives inbound, a cloud platform that suspends idle machines can wake your bot on demand — the docs call this the "sleep-when-idle" pattern, and it is the cost-saving reason the mode exists. The feature entered the project through pull request 3880 on the official Hermes Agent repository — titled "add webhook mode as alternative to polling" — and polling remains the default, so nothing changes for existing setups unless you opt in.

When Polling Is the Right Choice

Polling wins on simplicity, and simplicity wins for most home-lab setups. There is no public URL to expose, no TLS to arrange, no reverse proxy to configure and no secret token to manage — you paste a bot token, start the gateway, and the Telegram side of Hermes works from behind any home router. If your agent already runs around the clock for other reasons — cron jobs, scheduled content work, monitoring — the machine is awake anyway, so webhook mode's wake-on-demand advantage is worth nothing to you. The Hermes Agent cron job guide covers exactly that kind of always-on workload, and if you run the gateway in a container, Hermes Agent on Docker is the setup path where polling stays pleasantly boring.

If you want a working always-on agent setup without figuring it out alone — build sessions, daily tutorials and the full Agent OS as a free bonus — check out the AI Profit Boardroom → join the community here. Doing this for a business site? Book a free SEO strategy session and get a 1-on-1 plan as well.

📺 Watch: How to Run Hermes Agent OS on a VPS

When Webhook Mode Wins

Webhook mode earns its extra setup in one situation: cloud deployments billed for uptime. Platforms like Fly.io, Railway and Render can suspend a machine when it is idle and wake it when an HTTP request arrives. A polling bot can never sleep — the polling is the bot — so on those platforms you pay for 24/7 compute to handle 20 messages a day. A webhook bot sleeps between messages, and Telegram's push wakes it. If your Hermes gateway lives in the cloud, this is the difference between paying for a day of uptime and paying for minutes of it. For the wider hosting decision, the Hermes Agent hosting guide compares the deployment options this choice sits inside.

The Exact Webhook Configuration, Per the Official Docs

Three environment variables control webhook mode, as documented in the official Hermes Agent Telegram guide (checked 6 September 2026):

The secret deserves a sentence of its own, because it is the piece people are tempted to skip. Once your bot listens on a public URL, anyone who discovers that URL can send it fake updates; the secret token is how the adapter verifies that a delivery genuinely came from Telegram rather than from a stranger probing your endpoint. Set it, make it long and random, and never reuse something guessable.

Two further requirements to respect: the endpoint must be HTTPS, because Telegram refuses to deliver to plain HTTP, and the URL must be publicly reachable. Most webhook problems reported by users come down to one of those two — a certificate issue or a routing gap between the public port and the local listen port. If your bot goes silent after switching, verify those before anything else; and if you are still at square one, how to set up Hermes Agent covers the full install before any messaging surface is added.

Set Group Mention Gating While You Are in the Config

Whichever transport you choose, the same docs cover a setting that matters more day to day in group chats: mention gating. Three keys in the Telegram section of config.yaml control when the bot speaks in groups. With require_mention set to true, the bot ignores ordinary group chatter unless a message is a slash command, a reply to the bot, or an explicit mention of the bot's username. The mention_patterns list adds regex-based wake words — for instance a pattern matching a nickname like "chompy" at the start of a message — so regulars can summon the bot naturally. And exclusive_bot_mentions ensures that when several bots share a group, only the bot actually mentioned processes the message.

A sensible starting combination for a community group: require_mention on, one or two friendly wake words in mention_patterns, and exclusive_bot_mentions on if more than one bot lives in the chat. Members quickly learn the bot answers when addressed and stays quiet otherwise, which builds far more trust than an agent that comments on everything.

If you run a community group with an agent in it, these three settings are the difference between a helpful member and a spam machine. The Telegram AI agent guide is the closest companion read on making a bot genuinely useful in chat, and the best messaging app for Hermes Agent compares Telegram against the other surfaces the gateway supports.

Where This Fits in the Current Hermes Release

Hermes Agent's current release is v0.21.0, the Pantheon release of 31 August 2026 — roughly 5,800 commits from more than 760 contributors, per the official release notes on the Nous Research GitHub. The Hermes v0.21 breakdown covers the headline features; the Telegram transport options discussed here are part of the same maturing messaging stack. For the bigger picture of running an agent system properly — memory, skills, scheduling and the messaging surfaces on top — the Agent OS guide is the hub, and the Goldie Bench write-up covers how the different agent brains compare in hands-on tests, which matters when you decide which model answers those Telegram messages.

Hermes Telegram Webhook vs Polling: Quick Decision Table

QuestionPolling (default)Webhook mode
Machine always on?RequiredNot required — wakes on traffic
Public HTTPS URL needed?NoYes, plus a secret token
Setup effortNone beyond bot tokenURL, secret, port routing, TLS
Best forHome servers, VPS, DockerFly.io, Railway, Render, sleep-when-idle clouds
Config triggerDefault behaviourSet TELEGRAM_WEBHOOK_URL

One honest caveat to close on: switching transports changes cost and wake behaviour, not intelligence. A bot that pushes irrelevant answers over webhooks is exactly as annoying as one that does it over polling — get the gating right, keep the default unless the sleep-when-idle economics apply to you, and spend the saved effort on what the agent actually does for your community.

If you want an agent community that has already made these mistakes for you — with the full Agent OS, prompt libraries and weekly live coaching calls — check out the AI Profit Boardroom → get inside. And if search traffic is the goal, book a free SEO strategy session — free, 1-on-1, no fluff.

Real wins from inside the AI Profit Boardroom

See all 3,000+ members →
AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot AIPB member win screenshot

Ready To Join The #1 AI Community?

Join 3,600+ entrepreneurs inside the AI Profit Boardroom. Get 1,000+ plug-and-play AI agent workflows, daily coaching, and a community that holds you accountable.

Join The AI Community →

7-Day No-Questions Refund • Cancel Anytime

← Back to all posts