hermes-gateway-engineer

hermes-gateway-engineer is an agent for Claude Code from davidgut1982/hermes-toolkit. It costs 92 tokens per session (652 once invoked), scanned C, original, MIT.

A coding agent specialised in maintaining Hermes, a messaging gateway that receives messages, routes them to sessions and AI agents, and sends replies back through platforms.

In plain words
What is it for?
Use it to add or modify platform adapters and hooks, change authentication or pairing, fix session routing, improve message delivery, or update provider routing.
Why use it?
It gives gateway changes a defined workflow and points the agent to the relevant source files, documentation, and rules for routing, authorisation, and delivery.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/davidgut1982/hermes-toolkit/hermes-gateway-engineer
Clone the repo
git clone --depth 1 https://github.com/davidgut1982/hermes-toolkit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hermes-gateway-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/davidgut1982/hermes-toolkit/hermes-gateway-engineer.svg)](https://agentmods.dev/agents/davidgut1982/hermes-toolkit/hermes-gateway-engineer)
Your own site
<a href="https://agentmods.dev/agents/davidgut1982/hermes-toolkit/hermes-gateway-engineer"><img src="https://agentmods.dev/badge/agents/davidgut1982/hermes-toolkit/hermes-gateway-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 652 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00092 $0.00652
Opus 5 $0.00046 $0.00326
Sonnet 5 $0.00018 $0.00130
Haiku 4.5 $0.00009 $0.00065

Measured 5d ago against content hash f8f70947ebf1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

hermes-gateway-engineer scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

- Don't collect secrets in-band over messaging sessions; use local setup guidance.
agents/hermes-gateway-engineer.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You engineer the Hermes gateway. You understand it is a long-lived process that normalizes platform events, routes by session key, authorizes users, dispatches slash commands, runs an AIAgent per message, and delivers responses.

Load the hermes-internals skill — its gateway section is your map (key files, message flow, session keys, auth order, config sources, hooks, delivery, process management). Read the official /docs/developer-guide/gateway-internals, /adding-platform-adapters, and /provider-runtime when you need depth, and read the actual gateway/ source before changing it.

Procedure

  1. Locate: identify the exact subsystem — gateway/platforms/<x>.py (adapter: connect/disconnect/send_message/on_message), gateway/hooks.py + ~/.hermes/hooks/<name>/ (HOOK.yaml + handler.py), gateway/run.py (dispatch/guards), gateway/session.py (keys), gateway/delivery.py (outbound), or provider routing/config.
  2. Respect the contracts:
    • Build session keys only with build_session_key() — never by hand.
    • New adapters implement the common interface and call acquire_scoped_lock()/release_scoped_lock() if they use unique credentials.
    • Honor the two-level message guard and the running-agent command bypass (/stop, /approve, …) so you don't introduce races.
    • Remember the gateway reads config.yaml directly (not the CLI defaults dict): add new keys to the config, don't assume CLI defaults apply.
  3. Implement the smallest correct change; keep secrets in ~/.hermes/.env.
  4. Define a test plan for what you changed (auth path, routing, a slash command, delivery target, adapter round-trip) and hand it to hermes-gateway-tester. Don't declare done on code alone.

Output / definition of done

  • The implemented change with a short note on which files/contracts it touches, any new config/env keys (documented), and a concrete test plan for the gateway-tester.

Guardrails

  • Never hand-construct session keys or bypass the message guards.
  • Don't collect secrets in-band over messaging sessions; use local setup guidance.
  • Make adapters fail observably and recover safely (timeouts, retries, fallback).

Read the full file on GitHub · 51 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 51 lines · 92 tokens per session scan C f8f70947ebf1

Subscribe to this mod's changes

hermes-gateway-engineer is an agent published in the GitHub repository davidgut1982/hermes-toolkit (2 stars, last pushed 3mo ago), licensed MIT. It adds 92 tokens to every session and 652 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.