Skip to content

feat(agents): add NousResearch Hermes adapter #38

@rolldav

Description

@rolldav

Context

gortex install / gortex init auto-configure 15 coding agents, but NousResearch Hermes (https://github.com/NousResearch/hermes-agent) is not among them. Hermes is a CLI agent-orchestrator that consumes MCP servers and is increasingly used as a front-end to Gortex's daemon. Today Hermes users must wire the gortex mcp server by hand and hand-author any usage guidance — there is no adapter, and the binary carries no hermes references.

Hermes specifics (for the adapter)

  • Config: ~/.hermes/config.yaml, top-level mcp_servers: (global). Profiles live at ~/.hermes/profiles/<name>/config.yaml and merge the global mcp_servers (verified: a profile's resolved server set includes the global entries). → a single global stanza reaches every profile.
  • User-level skills surface: ~/.hermes/skills/**/SKILL.md with YAML frontmatter (name, description, metadata.hermes.tags, category). Hermes therefore has a user-level instructions surface, like Claude Code and Antigravity.
  • CLI: hermes (pip console-script).

Proposal

Add internal/agents/hermes/, user mode (same shape as openclaw / antigravity):

  • Detect(env)~/.hermes/config.yaml present, or hermes on PATH.
  • Apply(env, opts) via gortex install — idempotently upsert a global gortex: server into mcp_servers: (command: <gortex>, args: [mcp]). No per-profile writes are needed because profiles merge the global block.
  • Tool-usage teaching — because Hermes exposes a user-level skills surface, install one user-level Hermes skill (tool surface + multi-repo scoping via set_active_project/repo/project), mirroring the Claude Code / Antigravity treatment, rather than relying solely on MCP tool descriptions.

Implementation notes

  • A MergeYAML helper is required (only MergeJSON / MergeTOML exist today). Hermes config is comment-rich, so a comment-preserving merge is preferable; otherwise a minimal-footprint stanza insert with a .bak sibling on malformed input, consistent with the existing write helpers.
  • User mode only — Hermes is not repo-scoped the way IDE adapters are; the daemon's multi-repo workspace + per-query scoping covers multiple repos from one global server.
  • Honour the Adapter contract (Name/DocsURL/Detect/Plan/Apply) and the atomic write/backup helpers.

Acceptance

  • gortex install detects Hermes and writes the global gortex: MCP entry; gortex init doctor reports it.
  • All Hermes profiles resolve the gortex tools without per-profile edits.
  • (Optional) a user-level Hermes gortex skill is installed.

Happy to help test against a real ~/.hermes setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions