Hermes Patches
shali10/hermes-patches
Non-intrusive patches for Hermes Agent: token metrics, CJK Telegram tables, DB guards and more
Hermes Patches is a set of non-intrusive patches and extension plugins for Hermes Agent, aimed mainly at Telegram gateway users. It adds a detailed token footer, native Telegram tables for CJK text, SQLite protections and other fixes.
What Hermes Patches does
Hermes Patches modifies a Hermes Agent install through non-intrusive, AST-level code injection rather than a fork. A systemd ExecStartPre check runs before the gateway starts, so the patches are re-applied after Hermes source updates or hermes update. The README also says it validates config.yaml and restarts the hermes-gateway service automatically after installation.
Most changes target the Telegram gateway and long-running use. The reply footer shows prompt tokens, cache hits, output tokens, elapsed time and context usage. Markdown pipe tables render natively for CJK text, the Telegram command menu is translated into Chinese, and messages over 4096 characters are split at paragraph boundaries. On the reliability side it adds a SQLite busy timeout, foreign-key repair, a guard against deleting the live state.db, and a fallback when a working directory has been removed. The README is bilingual, in Chinese and English.
Key features
- Footer showing prompt total, cache hits, output tokens, elapsed time and context usage
- Native Telegram pipe-table rendering for CJK text
- Chinese localization of the Telegram command menu
- SQLite busy_timeout=5000 with automatic foreign-key repair
- Guard that blocks rm, truncate and similar commands from deleting the live state.db
- Optional quiet streaming with display.streaming: false to avoid Telegram 429 limits
When to use it
- Running Hermes on Telegram with Chinese-language chats and tables
- Keeping an always-on gateway from losing sessions to a locked or deleted database
- Checking prompt cache hit rates and token use on each reply
Who it is for: Hermes Agent operators, especially Telegram and Chinese-language users, who want production-oriented fixes without forking Hermes.
How it fits with Hermes Agent
Built for Hermes Agent: it patches the installed Hermes source and gateway, and a systemd hook re-applies the patches after updates.
FAQ
What is Hermes Patches?
Hermes Patches is a collection of patches and extension plugins for Hermes Agent. It adds token metrics, Telegram table support for CJK text, a Chinese command menu, SQLite safeguards and message-splitting fixes.
Do Hermes Patches survive Hermes updates?
Yes, according to the README. A systemd ExecStartPre hook re-applies the patches after Hermes source updates or hermes update.
Is Hermes Patches free and open source?
Yes. The repository is released under the MIT license.
Similar plugins for Hermes Agent
All pluginsUnofficial Grafana Agent Observability plugin for Hermes Agent that emits OTel traces and metrics
FahrenheitResearch Hermes Weather PluginHermes Agent weather plugin with 13 tools for forecasts, alerts, radar, model imagery and soundings
pingchesu Hermes Curator EvolverEvidence-driven skill evolution plugin for Hermes Agent with dry-run proposals and guarded apply
SGavrl Obscura Browser PluginHermes plugin that runs browser tasks on the Obscura headless browser instead of Chrome
Elevatormusic Hermes Warm CompactionHermes Agent context engine where the main model writes the compaction handoff on its cached prompt prefix
Bergschloss Refine Cycle for Hermes AgentSelf-improvement plugin for Hermes Agent: spots repeated failures, saves the smallest skill or memory fix
Related guides: How to install Hermes Agent · How to run Hermes Agent securely