hermes-telegram-miniapp: Hermes Telegram Mini App: The Pocket Terminal That Turns a Self-Hosted Agent into an Operations Console

A fast, hardened Telegram Mini App for the Hermes agent. It does more than chat: it manages sessions, system status, cron jobs, and fork maintenance without losing the terminal feel.

8 min read • View on GitHub • More from clawvader-tech

A smartphone held in one hand shows a dense terminal-style Telegram Mini App with stacked command lines, a live status bar, small system gauges, and a cron control panel. Faint infrastructure lines sit behind the phone, suggesting tunnels, auth keys, and a running process. The image explains that Telegram is acting as the operating surface for a persistent agent, not just a chat wrapper.
Telegram becomes a pocket operations console for a living Hermes process.
Key Takeaways

Most Telegram bots answer messages. This one behaves like a console. The clawvader-tech/hermes-telegram-miniapp project turns Hermes into a mobile control plane with system gauges, cron management, session continuity, and a terminal-first interface that feels closer to operations software than chat.

That shift matters because it changes the unit of interaction. You are not sending isolated prompts into a black box. You are attaching to a long-running agent, watching its output buffer, and deciding when the turn is actually over.

Telegram as a Terminal, Not a Chat App

The product's first move is aesthetic, but not cosmetic. It borrows the visual language of a terminal, then places it inside Telegram Mini Apps so the interface stays mobile-native without becoming messenger-shaped. The result is a pocket shell for Hermes: quick status, command-driven interaction, and enough system visibility to make the agent feel present.

A close-up of a terminal buffer flowing into a prompt detector, with a long-lived agent process on the left, a magnified sentinel in the center, and the UI on the right waiting for completion. The buffer is drawn like a paper tape or conveyor belt to emphasize persistence. The image explains how the interface watches a living process rather than polling for a single response object.
The UI listens for the end of a process, not the end of a request.

A Telegram Mini App on top, a guarded backend in the middle, and a persistent Hermes process underneath.

The key idea is simple once you see it. The app does not ask, “what is the agent's reply?” It asks, “what is the current state of the terminal session, and has the prompt returned yet?”

The Agent Is Treated Like a Process

That process model is the technical center of gravity. In the frontend, the chat view keeps track of output length and slices new text from a persistent buffer. In the backend, Hermes is attached to a tmux session, which means the interface is observing a living shell, not spinning up a fresh request each time.

const hasPrompt = /\n[^|\n]*[>$#]\s*$/.test(outputTail)

if (!agentRunning) {
  await ensureAgent()
}

const delta = buffer.slice(lastOutputLen.current)
lastOutputLen.current = buffer.length

if (hasPrompt) {
  setTurnState('complete')
}

That prompt detection step is the subtle win. A regex looking for a terminal prompt is a blunt instrument, but it is the right kind of blunt here. It lets the UI infer that Hermes has finished speaking without demanding a brittle response wrapper from the agent itself.

The HMAC-SHA256 method (which uses the bot token as a secret key) has subtle encoding edge cases that cause validation failures in practice. Ed25519 uses Telegram's published public key — no bot token needed, no encoding ambiguities, and it just works.

A WSJ hedcut-style portrait of clawvader-tech based on the verified GitHub avatar. The portrait is used to attribute the maintainer quote and reinforce that the security choices come from the project author, not a generic brand voice.

Security Is Layered, Not Bolted On

This is a mobile interface into something sensitive, so the repo treats auth as a product feature. Telegram init data is validated, ephemeral session tokens gate destructive actions, and sensitive endpoints get targeted rate limiting. The point is not just to keep strangers out. It is to keep the control surface trustworthy enough to expose real operations.

LayerWhat it protectsWhy it matters
Telegram init-data validationWho opened the Mini AppPrevents forged clients from reaching the backend
Ephemeral session tokenDestructive actionsKeeps deletes and env changes scoped to the active session
Targeted rate limitingSensitive endpointsReduces brute-force pressure on secrets and admin paths

Why the Fork Survives Upstream Change

The second differentiator is less visible and more important than it looks. This repo is not just an app. It is a maintenance system for a fork that has to coexist with upstream Hermes changes. The deploy script and post-merge hook let the project rebuild its Mini App after syncs, while preserving local Telegram-specific behavior that upstream does not know about.

ProblemNaive forkThis repo
Upstream changes land oftenMerge conflict driftAutomated sync and rebuild flow
Local Telegram featuresEasy to overwriteKept isolated and re-applied],[

That is a real product problem, not just an ops detail. A great interface collapses if the maintenance path is fragile. Here, the maintenance path is part of the interface's credibility.