Source: wiki synthesis: Hermes Architecture Explained, Hermes User Stories, Folder-as-Workspace Architecture, Claude Agent SDK — Agent Loop

Hermes and Claude Code both give you “a personal AI agent,” and both run a nearly identical loop — build context, call the model, run tools in a loop, respond. But they answer the question what is a personal agent in opposite shapes. Hermes is an always-on daemon: a gateway loop polls your messaging apps, every turn ends with a memory-update pass, and state accretes across days in markdown + SQLite. Claude Code is a session-based invocation: the loop runs when you call it, ends when the model stops asking for tools, and its durable state is the filesystem and a re-injected CLAUDE.md. Same skeleton, opposite persistence defaults — and knowing which shape a task wants (and how to compose the two) is the actual decision.

Key Takeaways

  • Same loop, opposite triggers. Hermes’ loop runs on every inbound gateway or cron message and is kept alive by an always-running asyncio poller; Claude Code’s loop runs per query() and ends when Claude emits no tool calls. Daemon vs invocation.
  • The memory-update pass is the fork in the road. Hermes ends every turn by analyzing the interaction and writing what it learned into memory/memory.md / memory/user.md — its “continuous learning” claim. Claude Code has no such step: its state is whatever lives in CLAUDE.md (re-injected each request) and the folder. Hermes learns by writing to itself; Claude Code “learns” only what you file into the workspace.
  • State lives in different places. Hermes: a markdown brain + a SQLite transcript store (rebuilt into context per inbound message, keyed by gateway + session ID) + optional external memory (Mem0 / Supermemory / Honcho), persisting across sessions and days. Claude Code: context accumulates within a session and auto-compacts near the limit, then must be explicitly resumed or forked by session_id — the durable layer is the folder, not the conversation.
  • Different surfaces, different cost shapes. Hermes reaches you through Telegram / Slack / WhatsApp / email / SMS (on-the-go execution) with a continuous token drip from crons + gateway — which is why its community obsesses over free-model rotation and $0 no_agent / wakeAgent cron gates. Claude Code lives in the terminal / IDE / folder as bursts of heavy work a subscription absorbs.
  • Different native jobs. “The Hermes value prop is stateful business agent, not coding agent” — inventory, sales outreach, email triage, ad-research crons, CMS publishing, Stripe disputes. Claude Code (folder-as-workspace) is the coding / agentic and folder-routed knowledge surface. The operator line: “anything content-wise, I do in Hermes; something that requires a lot more work, I do in Claude Code or Codex.”
  • They compose — and the seam is documented. The community pattern: install Claude Code on the box where Hermes runs, point it at .hermes, and use Claude Code as Hermes’ builder / doctor / advisor — the CC subscription absorbs the debug work while Hermes stays the autonomous executor. Two roles, two runtimes, one filesystem.

Two shapes of the same loop

Both runtimes run the same five-step skeleton; they diverge on what surrounds it. The table is this article’s synthesis, but every cell traces to a cited source. ^[inferred]

DimensionHermes (daemon)Claude Code (invocation)
TriggerInbound gateway message or cron tick() (always-on)A human query() / prompt
Loop endsAfter the memory-update pass; the process keeps runningWhen Claude emits no tool calls (ResultMessage)
“Learning”Memory-update pass writes to memory.md / user.md each turnNone — durable state is CLAUDE.md + the folder
State storeMarkdown brain + SQLite transcripts + external memory, across daysIn-session context + auto-compaction; resume / fork by session_id
SurfaceTelegram / Slack / WhatsApp / email / SMS + browser chatTerminal / IDE / folder (“the folder is the app”)
Cost shapeContinuous token drip (crons + gateway)Subscription bursts of heavy work
Native jobStateful business opsCoding / agentic / folder-routed knowledge work

The single cleanest distinction: Hermes runs a memory-update pass at the end of every turn; Claude Code does not. That is why Hermes is described as “continuously learning” while Claude Code’s continuity is whatever you deliberately write into CLAUDE.md and the three-layer folder. One agent persists by writing to itself; the other persists by you curating its workspace. ^[inferred]

How they compose

The two shapes are not competitors so much as different organs — and the sources document the seam directly:

  • Claude Code as Hermes’ builder / doctor. The r/hermesagent pattern: install Claude Code on the VPS or Mac mini where Hermes already runs, point it at the .hermes root, and ask it to fix the bugs — “it pretty much one shotted it.” Two operational wins: the CC subscription absorbs the builder / doctor tokens (none burned Hermes-side), and the autonomous-executor role (Hermes, where the gateway, skills, and API keys live) is cleanly separated from the builder role (Claude Code, editing on Hermes’ filesystem).
  • A shared wiki as the coordination layer. The four-component multi-agent stack (Mac Mini M4): Hermes does persistent operational work (crons, scheduled briefings, phone fetch-and-send) while Claude handles complex reasoning and long drafting — and both read/write a shared Obsidian wiki built on the Karpathy LLM-wiki pattern. The wiki is the synchronous handoff between the daemon and the invocation.
  • The division of labor maps to the surfaces decision framework: Hermes for stateful ops + content + light builds; Claude Code / Codex for heavy code with long thinking windows and standards-aware project structure.

Not the same as two neighbors

This synthesis deliberately sits beside two existing connection articles, on a different axis than either: ^[inferred]

  • Not Sovereign Agent Runtimes. That axis is ownership and privacy — runtime, model, data path, and who carries the security burden — and it contrasts Hermes with OpenClaw and Venice (both self-hosted). This axis is the persistence shape and native job of the agent, contrasting Hermes with Claude Code.
  • Not Running the Agentic Loop. That axis is state durability and crash recovery — in-process vs durable vs hosted. This axis is always-on daemon vs session invocation, and how the two compose. A single Hermes agent is a daemon (this article), self-hosted-and-sovereign (the sovereignty article), and self-durable (the loop article) all at once — three orthogonal questions, each needing its own answer.

Try It

  1. Classify the task by persistence, not vibes. If it must run when you are not there — a daily briefing, an inbox sweep, an ad-research cron — that is Hermes’ always-on shape. If it is a heavy burst you drive and verify — a refactor, a build, a folder-routed research pass — that is Claude Code’s invocation shape.
  2. Compose them on one box. Install Claude Code where Hermes runs, point it at .hermes, and let CC be the builder / doctor so Hermes’ own tokens aren’t spent debugging itself.
  3. Use a shared wiki as the coordination layer if you run both — the Karpathy-pattern folder both agents read and write is the documented way to keep a daemon and an invocation in sync.
  4. Match the cost control to the surface. On Hermes, gate crons with no_agent / wakeAgent so the always-on loop spends tokens only on judgment that needs it; on Claude Code, use subagents + max_budget_usd / max_turns so a burst stays bounded.

Open Questions

  • Where is the crossover point between “file it into the folder” and “let the agent write its own memory”? Claude Code’s curated-workspace model and Hermes’ auto-memory-update model are rarely benchmarked head-to-head for recall quality on the same task. ^[inferred]
  • Does composing them create a memory-of-record problem? When Hermes writes to its own memory.md and both agents share a Karpathy-pattern wiki, which is canonical when they disagree is unaddressed in the sources — the multi-agent stack keeps the human as arbiter, but the daemon’s self-written memory is a second source of truth. ^[inferred]