Skip to content

feat: Hermes Agent harness — non-interactive CLI + messaging gateway modes #141

@c-h-

Description

@c-h-

Summary

Add Hermes Agent (NousResearch) as a new agentctl harness with two distinct adapters:

  1. hermes adapter — non-interactive CLI mode via hermes chat -q
  2. hermes-gateway adapter — messaging gateway mode (persistent agent with API)

These are meaningfully different execution models and warrant separate adapters.

Why

Hermes Agent is a hybrid CLI + platform agent from NousResearch (MIT, launched Feb 2026). It has unique capabilities:

  • Auto-managed persistent memory (MEMORY.md + USER.md)
  • Autonomous skill creation at runtime
  • Multi-model runtime switching (live, not just config)
  • 6 terminal backends including serverless (Daytona, Modal)
  • FTS5 full-text session search across all sessions

Adapter 1: hermes (CLI mode)

Non-interactive coding agent, analogous to Claude Code --print or Slate -q.

agentctl launch hermes --worktree ~/personal/orgloop --branch fix/foo -p "fix the bug"

Implementation:

  • Launch: hermes chat -q <prompt> (non-interactive)
  • Need to test: streaming output format, exit codes, session ID scheme
  • Persistent memory carries across sessions (unique vs other harnesses)
  • Skills accumulate over time (agent gets better at repeated task types)
  • hermes chat --resume <id> for session continuation

Key unknowns (test during implementation):

  • Does hermes chat -q produce streaming JSONL or plain text?
  • Exit code conventions (0 = success, non-zero = error?)
  • Can we pass workspace directory? (check --workspace or --cwd flag)
  • Does it support --dangerously-set-permissions equivalent?

Adapter 2: hermes-gateway (messaging gateway mode)

Long-running agent with an API endpoint, analogous to an OpenClaw actor.

agentctl launch hermes-gateway --port 7878 --workspace ~/personal/orgloop

Implementation:

  • Launch: start Hermes messaging gateway (persistent process)
  • Send tasks via API (HTTP POST to gateway endpoint)
  • Receive results via webhook callback or polling
  • Agent maintains memory/skills across tasks
  • Multiple tasks can be sent to the same running agent

This mode is more like a managed service than an ephemeral CLI. agentctl would:

  • Start/stop the gateway process
  • Track which gateway is serving which workspace
  • Route tasks to the right gateway instance

Key unknowns:

  • Gateway API format (REST? WebSocket? gRPC?)
  • How to send tasks programmatically
  • Callback/webhook support for task completion
  • Can multiple workspaces share one gateway?

Shared concerns

  • Installation: pip install hermes-agent (Python 3.11+) — first Python harness
  • Config: Hermes uses its own config format (not slate.json style)
  • Memory persistence: Hermes auto-manages MEMORY.md — this may conflict with worktree isolation (agent remembers things from other tasks). Could be a feature or a bug depending on use case.

Implementation plan

  1. Install Hermes, test hermes chat -q output format and behavior
  2. Build src/adapters/hermes.ts (CLI mode first — simpler, known pattern)
  3. Test with real tasks in worktrees
  4. Investigate gateway API, build src/adapters/hermes-gateway.ts if API is suitable
  5. Document the two modes and when to use each

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions