With more than 250,000 GitHub stars under an MIT license, Nous Research's Python-based Hermes Agent has become one of the first repositories engineering teams inspect when asked to deploy a Nous Hermes Agent enterprise bot on Microsoft Teams, WhatsApp, or internal chat. One Python class backs a CLI, an editor protocol, an OpenAI-compatible server on port 8642, cron jobs, and a gateway for over twenty messaging platforms. Separating the genuinely clever harness ideas worth borrowing from the identity and memory risks that break enterprise governance saves months of security rework.
Four harness engineering ideas worth borrowing from Hermes Agent
Even if you never run Hermes in production, four mechanisms inside its repository complement the scripted RPC pattern we examined in MCP Code Mode in Claude Code and Cloudflare explained:
- Post-turn background skill review with a do-not-capture guard: after roughly ten tool iterations or at session end, a background reviewer patches existing skills following a strict "lessons, not logs" rule while blocking transient network errors or negative claims like "tool X is broken" that would otherwise harden into permanent refusals.
- Hard character budgets that force consolidation:
MEMORY.mdis capped at2,200characters andUSER.mdat1,375characters. Over-budget writes fail in-turn and force the model to prune stale entries instead of growing an unbounded prompt file. - Scripted RPC tool calls (execute_code): the model writes Python against generated tool stubs over a local socket with a
300-second,50-call, and50 KBoutput cap while secret-named environment variables are stripped. - Actionable MCP readOnlyHint behavior: on dropped HTTP sessions, tools annotated with
readOnlyHintreplay automatically while state-changing calls returnoutcome_uncertaininstead of double-posting an order.
Five blockers that prevent raw Hermes bots from touching ERP or HR data
- No per-user identity reaches MCP: Hermes's
identity_headeraccepts only a static value or the profile name resolved once at connection time, so downstream MCP servers cannot distinguish an intern from a finance director. - Shared bot memory leaks across colleagues: every employee messaging the same department bot shares one
MEMORY.mdand SQLitestate.dbunless external per-user memory is wired in, risking HR or margin leaks in group channels. - Terminal access ships enabled on messaging toolsets: unless explicitly stripped out, chat gateways inherit shell execution tools alongside messaging adapters, and profiles are directories rather than OS sandboxes.
- Enterprise messaging friction on Teams, M365, and WhatsApp: Teams adapters drop Excel and PDF attachments, Microsoft 365 email relies on legacy IMAP polling, and WhatsApp Cloud fails after 24 hours without approved message templates (error
131047). - Consumer subscription token relay restrictions: routing shared company bots through personal chat subscriptions violates major model provider terms, requiring metered enterprise API or cloud gateway keys.
How to govern department assistants safely over live business systems
If you pilot open-source chat gateways, remove terminal toolsets, turn off shared profile memory, and place an enterprise business ontology behind authenticated SSO so every query inherits per-user row-level permissions, canonical ERP definitions, and human-approved write gates.