Sources#
Summary#
Hermes Agent is an open-source CLI coding/research agent from Nous Research, positioned as a parallel ecosystem to Claude Code with a stronger emphasis on multi-platform messaging deployment. The CLI provides an interactive REPL with tool access (terminal, file editing, web search, code execution); the Hermes Gateway is a long-running daemon that exposes the same agent through Telegram, Discord, Slack, and WhatsApp with per-user sessions, allowlist + DM-pairing authorization, scheduled cron jobs, and configurable container backends. Hermes is provider-agnostic (works with OpenAI, Anthropic, and other LLM APIs) and uses a context-file convention closer to OpenAI's AGENTS.md than Anthropic's CLAUDE.md, plus a separate SOUL.md for personality.
Details#
Architecture (Two Surfaces)#
| Surface | Purpose | Lifecycle |
|---|---|---|
| Hermes CLI | Interactive REPL, similar role to Claude Code | Per-invocation, resumable (hermes -c, hermes -r "title") |
| Hermes Gateway | Long-running daemon exposing the agent over messaging platforms | systemd (Linux user/system service) or launchd (macOS); persists across reboots |
The Gateway is the architecturally interesting half — it's parallel in spirit to Symphony's always-on daemon model, but with per-user rather than per-issue tenancy.
Context Files#
Hermes uses three layered configuration files, with explicit role separation:
| File | Scope | Purpose |
|---|---|---|
AGENTS.md | Project (cwd) | Project context, conventions, stack — auto-loaded each session |
~/.hermes/SOUL.md (or $HERMES_HOME/SOUL.md) | Global personality | Stable default voice/style across all sessions |
.cursorrules / .cursor/rules/*.mdc | Project | Compatibility-loaded from cwd; no need to duplicate |
Subdirectory AGENTS.md files are lazily discovered during tool calls (via subdirectory_hints.py) and injected into tool results — they aren't loaded upfront. This is a deliberate context-budget choice: only the top-level project context goes into the system prompt; nested context is paid for only when relevant.
The separation of AGENTS.md (project) and SOUL.md (personality) is sharper than Anthropic's CLAUDE.md convention and worth comparing — the same role split is implicit in CLAUDE.md files in practice but not separately filed. (Will be expanded in a forthcoming Agent Context Files concept page.)
Memory System#
Hermes implements a hard-bounded memory system:
MEMORY.md: ~2,200 character cap.USER.md: ~1,375 character cap.- When memory fills, the agent consolidates entries (compresses older notes).
A specific gotcha called out in the docs:
"Memory is a frozen snapshot — changes made during a session don't appear in the system prompt until the next session starts. The agent writes to disk immediately, but the prompt cache isn't invalidated mid-session."
This is the cleanest articulation of why memory edits feel "delayed" in any caching agent — and it's a constraint Claude Code and other agents share but rarely document.
The Memory vs. Skills split:
- Memory = facts (environment, preferences, project locations).
- Skills = procedures (multi-step workflows, reusable recipes).
- "Memory for what, skills for how."
Token-Economy Tooling#
Direct user-facing controls — operationally these are exactly the levers AgentOpt formalizes, but exposed as CLI commands:
| Command | Effect |
|---|---|
/compress | Summarize conversation history; preserves key context, drops tokens |
/usage | Token consumption status |
/insights | 30-day usage patterns |
/model | Switch model mid-session (frontier for hard reasoning, fast for boilerplate) |
delegate_task | Spawn parallel subagents with isolated contexts; only summaries return |
The cache-discipline note is sharp:
"Most LLM providers cache the system prompt prefix. If you keep your system prompt stable (same context files, same memory), subsequent messages in a session get cache hits that are significantly cheaper. Avoid changing the model or system prompt mid-session."
CLI Ergonomics#
| Input | Behavior |
|---|---|
Alt+Enter / Ctrl+J | Multi-line input without sending |
| Multi-line paste | Auto-detected, buffered as one message |
Ctrl+C (once) | Interrupt mid-response, redirect with new message |
Ctrl+C (twice within 2s) | Force exit |
Ctrl+V | Paste image from clipboard (vision) |
/ + Tab | Slash command autocomplete |
/verbose | Cycle tool-output modes: off → new → all → verbose |
Hermes Gateway: Multi-User Daemon Pattern#
The Gateway exposes the agent through messaging platforms:
- Per-user sessions — each authorized user gets their own conversation context.
- Home channel (
/sethome) — designated chat that receives cron output and proactive messages. - Two authorization models:
- Static allowlist:
TELEGRAM_ALLOWED_USERS=123,456in.env. Restart required to add users. - DM pairing: unauthorized DMs receive a one-time code; admin runs
hermes pairing approve telegram XKGH5N7P. No restart needed.
- Pairing security: codes expire 1 hour, cryptographic randomness, rate-limited (1 request/user/10min, max 3 pending/platform), 5 failed approvals → 1-hour platform lockout, all data stored at
chmod 0600.
Service installation:
hermes gateway install # Default: user-level systemd (Linux) / launchd (macOS)
sudo hermes gateway install --system # Linux: boot-time system service
sudo loginctl enable-linger $USER # Linux: keep running after SSH logoutCron Jobs#
Scheduled work delivered to the home channel:
- Created from chat: "Every weekday at 9am, check the GitHub repo for…"
- Definitions stored at
~/.hermes/cron/jobs.json; output at~/.hermes/cron/output/{job_id}/{timestamp}.md. - Critical caveat: cron prompts run in completely fresh sessions with no memory. Each prompt must contain all needed context — file paths, URLs, server addresses, instructions.
This parallels Symphony's daemon-driven dispatch model — both are cases of agents being pulled to work asynchronously on a schedule rather than driven interactively.
Container Safety Model (Worth Flagging)#
Hermes supports multiple terminal backends:
TERMINAL_BACKEND=docker
TERMINAL_DOCKER_IMAGE=hermes-sandbox:latestSupported: Docker, Singularity, Modal, Daytona.
Important security shift: when running in a container backend, dangerous-command checks are skipped — the rationale being "the container is the security boundary." This means:
- Locked-down container image quality becomes load-bearing.
- Approval-prompt UX trades for image-discipline UX.
- Trust shifts from "every command is reviewed" to "the container can't escape."
Worth noting because it's a meaningfully different security posture from Claude Code's per-command auto-mode classifier.
Comparison to Claude Code#
| Capability | Claude Code | Hermes |
|---|---|---|
| Project context | CLAUDE.md | AGENTS.md (project) + SOUL.md (personality, separate) |
| Cursor compat | n/a | .cursorrules / .cursor/rules/*.mdc auto-loaded |
| Session compaction | /compact | /compress |
| Mid-session model switch | /model | /model |
| Parallel subagents | Subagents in .claude/agents/ | delegate_task tool |
| Permission gating | auto mode classifier | Per-pattern approvals (once/session/always/deny); skipped in containers |
| Memory model | n/a (relies on conversation + CLAUDE.md) | Bounded MEMORY.md + USER.md with auto-consolidation |
| Multi-user deployment | claude -p per user/session | Hermes Gateway with allowlist or DM pairing |
| Cron / scheduled work | n/a (rely on external cron) | Built-in cron with home-channel delivery |
The most significant architectural difference is the Gateway: Claude Code is session-first; Hermes is daemon-first when deployed at team scale.
Development Pace, Measured from Outside (July 2026)#
OpenHands' twelve-month GitHub analysis (Coding Agents and Technical Debt, case-study, competitor-authored) includes NousResearch/hermes-agent and makes it the outlier in both directions. In the year to 2026-07-08: 7,736 merged PRs — the most of the four harnesses compared — ~3.0M lines changed, and ~1.75M lines of current code, the largest codebase in the comparison. The growth curve is the steepest too: from "a nearly empty repo to roughly 2,000 merged PRs a month within months of getting serious."
Its 68% bug-fix share (5,288 PRs) is nominally the highest by a wide margin — the other three sit at 16–40% — but the author flags it as probably an artifact of Hermes' labeling conventions rather than a quality signal, and says the classification is heuristic across all four projects. Do not cite the 68% without that caveat. Context and the fork/build-vs-buy argument these numbers serve: Harness Build-vs-Buy.
Operational Notes#
- VPS sizing: $5/month is sufficient for the Gateway itself — LLM API calls are the cost driver.
- macOS launchd PATH gotcha: the plist captures shell PATH at install time. After installing new tools (Node, ffmpeg), re-run
hermes gateway installto refresh. - Session auto-reset: messaging sessions reset after idle (default 24h) or daily at 4am.
- Self-update:
/updatefrom chat pulls latest version and restarts.
Memory defenses under a carryover attack (October 2026)#
CarryoverBench (arXiv 2610.28425, empirical) re-ran 36 memory-poisoning tasks on Hermes with three production memory defenses active: a content-pattern scanner (_MEMORY_THREAT_PATTERNS), a periodic memory-review pipeline, and tool-mediated state writes. In each task, an injected email or web page gets the agent to append a standing instruction to MEMORY.md, which then fires in later sessions. Latent attack success fell compared with the authors' Nanobot harness (Qwen3-235B 52.8% → 27.8%, Claude-Sonnet-4.6 22.2% → 5.6%, GLM-5 11.1% → 8.3%, GPT-5.4 8.3% → 2.8%) but reached zero on no model. None of the three defenses caused the fall. The scanner matched 0 of 89 payload files, the review pipeline never invoked remove or replace, and the review's trigger resets each session, which is exactly the boundary the attack crosses. The authors credit the richer tool catalog with surfacing model-side caution. Where per-round firing decayed, the cause was the agent reading its own earlier outputs and deciding the task was already done, while the planted note stayed in place. Two caveats from the source. (1) Its App. A.1 says the main harness already delegates its tool loop to Hermes and bypasses Hermes' native memory module, so the "runtime swap" is not clean. (2) Its description of MEMORY.md as prepended every turn differs from the frozen-per-session snapshot documented above, which makes no difference to a cross-session attack. The paper also notes that a poisoned cron entry dispatches as a fresh sub-agent with no host agent in the loop, so it "can re-fire indefinitely without any opportunity for the host agent to reread or revise it". That is argued from the architecture and not measured, because the heartbeat-channel tasks were not ported to Hermes.
Skill-install scanning (August 2026)#
Nous Research piloted SkillSpector (NVIDIA/SkillSpector) as an optional advisory scan in the Hermes Agent skill-install flow: PII, Unicode smuggling, script linting, license and security checks, with file-line findings surfaced before installation. 29 passing tests; ~1.4–1.5 seconds per skill scan. Advisory, not blocking — but it is the first case in this wiki of a skill registry running static analysis inside the install path, and it pairs with the Skill Lift pipeline's Tier 1 as the security half of a skill-verification gate.
Connections#
- Claude Code Best Practices — Hermes is the closest parallel ecosystem; many concepts map directly (
/compress↔/compact,delegate_task↔ subagents,AGENTS.md↔CLAUDE.md); the differences highlight design choices each made - Symphony — both are always-on agent daemons; Symphony tenancy unit is the issue, Hermes tenancy unit is the user. Both prefer container backends for safety. Cron + home-channel parallels Symphony's polling + tracker-write
- Client-Side Agent Optimization — Hermes's
/model,/compress,delegate_task, and prompt-cache discipline are the user-facing surface of exactly the levers AgentOpt formalizes - Agent Harness Engineering —
AGENTS.mdfollows OpenAI's "table of contents, not encyclopedia" principle; bounded memory files are a harness-level constraint analogous to JSON feature lists - Scale-Dependent Prompt Sensitivity —
/verbosemodes and bounded memory both implicitly limit output length; the brevity-constraint findings would predict gains - Claude Code Auto Mode — Hermes's per-pattern approval model (
once/session/always/deny) and container-disables-approvals model are points of comparison with the classifier-based auto mode - Agentic Misalignment (AM) — Hermes daemon mode (long-context, tool-using, container-as-security-boundary, weak per-action human oversight) sits squarely in the AM threat surface; container isolation reduces blast radius but doesn't address model-side misalignment
- Ticket-Driven Agent Orchestration — Hermes's cron jobs + home-channel delivery are a lighter analogue: self-dispatched scheduled deliverables filed back to a chat instead of a ticket
- Harness Build-vs-Buy — Hermes as the high end of the measured maintenance load: 7,736 merged PRs and ~1.75M lines in twelve months, and the 68% bug-fix-label outlier the source itself discounts
- OpenHands — the open-source peer harness that published the comparison
- Carryover Attacks (CarryoverBench) — the second runtime in CarryoverBench. Its memory scanner and review pipeline caught none of the planted standing instructions, and memory-channel attack success fell without reaching zero
Open Questions#
- The container backend disabling dangerous-command checks is a defensible design but a meaningful security-model shift. What's the empirical track record? Have lockdown failures in popular images (Daytona,
nikolaik/python-nodejs) caused incidents? Settler (2026-10-21): incident reports or CVEs naming a Hermes container deployment. - How do bounded memory files (~2,200 chars
MEMORY.md) hold up over long-term use? Auto-consolidation is mentioned but not specified — what's the consolidation algorithm and how lossy is it? Settler (2026-10-21): the Hermes memory-consolidation source and docs, then a long-run lossiness test. - Hermes's DM-pairing flow is a clean security primitive. Why hasn't this pattern been adopted by Claude Code or Cursor for shared/team deployments?
- The split between
AGENTS.md(project) andSOUL.md(personality) is explicit in Hermes but implicit in Claude Code'sCLAUDE.md. Does the split materially improve outcomes, or is it a documentation choice without empirical backing? Settler (2026-10-21): an A/B of split versus single instruction file on the same agent tasks. - Cron jobs in fresh sessions with no memory — how do teams structure the "context the agent needs" without it bloating every cron prompt? Is there a standard pattern?
Sources#
- Tips & Best Practices — practical CLI usage, context files, memory, performance/cost levers, security patterns
- After the Attacker Leaves: Benchmarking Carryover Attacks on LLM Agents — Xu, Wang et al., arXiv 2610.28425,
empirical. Cited for §5.3, Table 6 and App. E Table 12 (the Hermes Latent re-run and its three defenses) and App. A.1 (cron sub-agent dispatch, and the delegation caveat) - Tutorial: Team Telegram Assistant — Gateway deployment, BotFather setup, allowlists vs. DM pairing, cron scheduling, production operation
- Coding Agents and Technical Debt — Rajiv Shah, OpenHands, 2026-07-28 (
case-study, competitor-authored): third-party GitHub activity data forNousResearch/hermes-agent
Cited by 28
- Agent Control Plane Patterns: Tickets, Loops, Specs, and Memory Files×4
Backlog-draining loops answer some of this by using markdown issue files. Cron loops answer less:…
- Carryover Attacks (CarryoverBench)×3
Source-internal tension on what was swapped: §5.3 presents Hermes as a second runtime with a…
- Where Does Agent Harness Work Remain Durable as Models Improve?×3
Across Agent Harness Engineering, Claude Code Best Practices, and Hermes Agent, the stable work is:
- Symphony×3
Hermes Agent — parallel "always-on agent daemon" architecture, with per-user instead of per-issue…
- Agent Context Files×2
Hermes Agent — the sharpest role split (AGENTS.md project vs. SOUL.md personality) plus lazy…
- Agent Harness Engineering×2
Hermes Agent — parallel daemon-first agent ecosystem; per-user instead of per-issue isolation, with…
- Agentic Misalignment (AM)×2
This describes Cowork, Claude Code in agent mode (especially --dangerously-skip-permissions),…
- Claude Code Auto Mode×2
Compared to OS-level sandboxing (mentioned in Claude Code Best Practices alongside auto mode),…
- Claude Code Best Practices×2
Claude Code is one of several converging coding-agent ecosystems. Capability parallels with Hermes…
- Client-Side Agent Optimization×2
The client-side levers AgentOpt formalizes (model assignment, budget, caching, batching) appear as…
- Harness Build-vs-Buy×2
Every organization that decides it needs "our own coding agent" is making a make-or-buy decision,…
- Orchestration Sets Token Economics×2
Hermes Agent is credited as genuinely model-agnostic with isolated sub-agents, but the design-time…
- Ticket-Driven Agent Orchestration×2
Hermes Agent — Hermes's cron jobs and home-channel delivery are a lighter analogue: scheduled…
- Agent Identity Management System (AIMS)
Hermes Agent — a shipped contrast: Hermes secures multi-user agent access with an ad-hoc DM-pairing…
- Agent-Native Infrastructure
Hermes Agent — a concrete agent-native daemon (AGENTS.md context, gateway connectors) bridging chat…
- Classifier Gates vs OS Sandboxing: The Defense-in-Depth Story for Auto Mode and Cowork
Sandbox-only is a legitimate design point when the workload is fully containable: Hermes Agent…
- Continuous Self-Modification Under Review
Terminal-Bench 2.1 · Grok 4.5 · 84.94% audited · Cursor: 79.3%; Hermes: 77.53%
- Harness Shrinkage as Models Improve
Every measurement above is taken on the system prompt. OpenHands' July 2026 GitHub analysis…
- LLM-as-Compiler Knowledge Base
The schema layer (Karpathy's term) is the same artifact category as SPEC.md/WORKFLOW.md —…
- MCP and Computer Use
Hermes Agent — third-party agent product that consumes MCP (mentioned in cross-tool capability…
- Entities — People, Orgs, Tools & Projects
Hermes Agent — Nous Research's CLI agent + Gateway daemon (Telegram/Discord/Slack/WhatsApp);…
- NVIDIA
NVIDIA SkillEvaluator turns a with/without-skill ablation into a publication gate for its own 300+…
- Open Questions Backlog
Hermes Agent ×5 (oldest 34d) — The container backend disabling dangerous-command checks is a…
- OpenClaw
Hermes Agent — sibling personal-agent CLI (Nous Research); the two share the…
- OpenHands
Hermes Agent — the other open agent in the same comparison (7,736 merged PRs, ~1.75M lines)
- Prompt-Cache Economics
"Keep the prefix stable and you get cheap cache hits" is true only above the threshold. Agent…
- Scale-Dependent Prompt Sensitivity
Hermes Agent — /verbose modes and bounded memory implicitly cap output length; the…
- Skill Lift
Nous Research's Hermes Agent tested it as an optional advisory scan at install time — SkillSpector…
Related articles
- Agent Harness Engineering
Patterns for scaffolding long-running LLM agents: environment design, progressive context disclosure, mechanical archit…
- Agent Context Files
The cross-vendor markdown-as-control-plane pattern: repo-versioned plaintext (CLAUDE.md / AGENTS.md / SOUL.md / WORKFLO…
- Claude Code Best Practices
Anthropic's guide to effective Claude Code usage: context management, verification-driven development, explore→plan→cod…
- MCP and Computer Use
Anthropic's two complementary connector mechanisms: MCP for structured programmatic access (Salesforce/Drive/Gmail/Slac…
- Agent Loop Pattern
`/loop` (cron-scheduled) and Ralph Wiggum (backlog-draining) loops as next-generation agent primitive; AFK execution, p…
