infra-lead c2c55d4f83
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (push) Skipped
Secret scan / Scan diff for credential-shaped strings (push) Successful in 3s
meta-ci-advisory / meta (advisory) (push) Successful in 4s
CI / Template validation (static) (push) Successful in 16s
verify-providers-projection / Regenerate projection, fail on drift, assert registry ⊆ template (push) Successful in 15s
publish-image / Resolve runtime version (push) Successful in 3s
publish-image / Classify change (decouple publish from promote) (push) Successful in 3s
CI / Adapter-socket conformance (push) Successful in 36s
CI / Shell unit tests (push) Successful in 40s
CI / Gateway live round-trip (pinned hermes) (push) Successful in 1m6s
CI / Template validation (runtime) (push) Successful in 5m49s
CI / T4 tier-4 conformance (live) (push) Successful in 5m59s
CI / validate (push) Successful in 2s
CI / all-required (push) Successful in 1s
publish-image / Build & push workspace-template-hermes image (push) Successful in 6m56s
publish-image / Promote runtime_image_pins (CP admin) (staging-api.moleculesai.app, staging) (push) Successful in 2s
publish-image / Verify runtime_image_pins moved (fail-loud) (staging-api.moleculesai.app, staging) (push) Successful in 4s
Merge pull request 'feat(hermes): session-reset, memory and skill-review knobs; bundled node on PATH (#383)' (#385) from feat/hermes-session-memory-node-knobs into main
2026-10-13 02:44:19 +00:00

Molecule AI workspace template — Hermes

This repository builds the hermes workspace image used by Molecule AI. It runs Nous Research's upstream hermes-agent gateway behind the common Molecule A2A runtime.

The canonical source is this Gitea repository. Create workspaces through the canvas runtime picker; the old URL-based community-install examples are not a supported installation path.

Runtime shape

Molecule A2A (:8000)
        |
        v
HermesAgentProxyExecutor
        |
        v
hermes-agent gateway (127.0.0.1:8642)
  • start.sh prepares the container, starts hermes gateway, waits for its health endpoint, then executes molecule-runtime as the agent user.
  • adapter.py provides HermesAgentAdapter and platform/plugin hooks.
  • executor.py proxies A2A turns to the loopback Hermes gateway.
  • config.yaml is the template's model/provider source. The files under internal/providers/ are a CI-checked registry projection.

install.sh remains as a tested compatibility hook for downstream host installers. It is not the current Molecule production delivery path; the published container uses Dockerfile and start.sh.

Configuration

Select a model through the workspace configuration and provide the credential declared for that provider. start.sh renders the effective Hermes model and provider configuration and forwards only the supported credential variables. See docs/CONFIGURATION.md for the current matrix, including the optional session-reset (HERMES_SESSION_RESET_*, HERMES_SESSION_IDLE_MINUTES), memory (HERMES_MEMORY_CHAR_LIMIT, HERMES_USER_CHAR_LIMIT), and background-review (HERMES_MEMORY_NUDGE_INTERVAL, HERMES_SKILL_NUDGE_INTERVAL) knobs.

The current container renders Hermes state under /tmp/.hermes; platform history is reattached when a fresh gateway has no local transcript. Do not claim a different home-directory mount is the active persistence contract.

Important files

Path Purpose
Dockerfile Builds the published workspace image
start.sh Supported container entrypoint
adapter.py Adapter and runtime integration
executor.py A2A-to-Hermes gateway bridge
config.yaml Template metadata, providers, models, and bridge settings
scripts/ Provider/config helpers and their shell tests
tests/ Adapter, release, provenance, and documentation contracts

The current file contains template_schema_version: 1; change it only with a corresponding platform contract change and validation.

Upstream freshness

The effective hermes engine is stock upstream, installed from a pinned git commit: ARG HERMES_COMMIT in the Dockerfile. That ARG is the whole reproducibility story, and it is a commit rather than a version for a reason worth knowing before you touch this: ~/.local/bin/hermes is not the venv console script, it is a wrapper that execs $HERMES_ROOT/hermes, which puts the git checkout at sys.path[0] ahead of site-packages. The gateway runs the checkout. A wheel pin in site-packages is inert — which is what it was until 2026-09-03, while the checkout silently tracked whatever upstream main happened to be on build day.

The upstream installer that clones and pins that checkout is vendored at vendor/hermes-agent/install.sh (a byte copy of scripts/install.sh at HERMES_COMMIT, checked by sha256 at build time) rather than downloaded, so a build does not depend on raw.githubusercontent.com. Moving HERMES_COMMIT means refreshing that copy; vendor/hermes-agent/README.md has the steps.

The pin is currently an unreleased upstream ref, taken with owner authorisation: PyPI's newest hermes-agent is still 0.19.0 (2026-07-20) and the context-compaction and unattended-approval fixes the fleet needs exist only as git refs. ARG HERMES_PYPI_FLOOR records the lowest published release that would carry them, and the plan is to return to a tagged release once one exists.

The Molecule A2A integration lives entirely in the hermes-platform-molecule-a2a plugin, which registers through upstream's ctx.register_platform(...) socket (NousResearch #17751). There is no patched fork — the interim molecule-ai/hermes-agent fork was retired on 2026-07-22 (#294) once the plugin migrated to the upstream API.

A daily bot (.gitea/workflows/upstream-sync.yml, 06:17 UTC + manual dispatch) compares PyPI's latest hermes-agent against HERMES_PYPI_FLOOR. Below the floor it does nothing; at or above it, it files an issue with the checklist for returning to a published release. It deliberately does not auto-bump HERMES_COMMIT to newer git refs — every such bump is unreviewed third-party code entering a customer image, so the pin moves when someone decides it should. The bot only surfaces work; it never gates or lands anything.

Development and delivery

See runbooks/local-dev-setup.md for commands that mirror CI. Pull requests run static, shell, adapter-conformance, and image checks. A push to main invokes publish-image, which publishes to the Gitea OCI registry and runs the configured pin verification. Do not use a manual registry script or direct-main-push release procedure.

License

Business Source License 1.1 — © Molecule AI. The upstream hermes-agent project is installed under its own license.

S
Description
No description provided
Readme
1.5 MiB
Languages
Python 64.2%
Shell 32.9%
Dockerfile 2.9%