Add Hermes as a third agent with a permission-free gateway setup#69
Open
robobryce wants to merge 3 commits into
Open
Add Hermes as a third agent with a permission-free gateway setup#69robobryce wants to merge 3 commits into
robobryce wants to merge 3 commits into
Conversation
Install NousResearch's Hermes alongside Claude Code and Codex and wire it up with the same unattended philosophy: a single arbitrary OpenAI-compatible inference gateway, approvals off, hooks auto-accepted, subagents auto-approved, xhigh effort with reasoning always shown, and the run-duration limits removed so it can run unattended for days. - install_hermes runs NousResearch's installer; install_base_deps gains xz-utils, which the installer needs to unpack its bundled Node runtime on bare images. - write_hermes_config emits ~/.hermes/config.yaml: the gateway as a custom_providers entry whose key_env points at AAB_HERMES_API_KEY (no secret in the world-readable file), the permission-free block, and no-limit settings (turn/iteration budgets at 999999 since 0 stops instantly, inactivity gateway timeouts at 0 = unlimited, auto-continue freshness disabled, tool-loop guardrails off). Per-operation timeouts are raised, not removed (shell 10 min, subagent stuck-detector 24 h), and delegated concurrency tracks AAB_CODEX_AGENT_MAX_THREADS. - _write_hermes_launcher / install_hermes_launcher add the hermes-gateway wrapper and hermes -> hermes-gateway symlink, handling both the ~/.local and the root FHS install layouts. The wrapper sets HERMES_YOLO_MODE and HERMES_ACCEPT_HOOKS rather than injecting a flag (Hermes has no --dangerously-skip-permissions, and its --yolo is chat-scoped). - install_hermes_plugins materializes AAB's marketplace plugins into ~/.hermes/plugins/<name>/ (synthesizing the plugin.yaml Hermes expects from each plugin's plugin.json) and enables them. - AAB_HERMES_* env vars are written to ~/.aab/.env; README and the unit / e2e / smoke suites cover the new agent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The curator is Hermes's "self-improvement" feature — a background auxiliary-model task that periodically reviews, prunes, and consolidates agent-created skills (curator.enabled, default true in Hermes). For predictable unattended runs, write_hermes_config now sets `curator.enabled: false`. Add AAB_HERMES_CURATOR (default false) to override. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The gateway base URL and model no longer default to an internal NVIDIA endpoint / model — exposing those in a public repo was wrong. Both are now unset by default: write_hermes_config warns (doesn't fail) when either is missing, leaving Hermes unconfigured until the operator fills them into ~/.aab/.env, exactly like the API key. As a convenience matching the documented gateway convention, the base URL is normalized to end in /v1: a trailing slash is trimmed and /v1 is appended only when absent, so both "https://host" and "https://host/v1" work. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
969d134 to
6d5af66
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Hermes (NousResearch) as a third agent alongside Claude Code and Codex, configured for unattended use in a safe sandbox with the same philosophy as the existing agents.
AAB_HERMES_BASE_URL/AAB_HERMES_API_KEY/AAB_HERMES_MODEL. There is no built-in default gateway or model (exposing an internal endpoint in a public repo would be wrong): both are unset by default,write_hermes_configwarns (does not fail) when either is missing, and the base URL is normalized to end in/v1(trailing slash trimmed,/v1appended only when absent). The gateway is declared as acustom_providersentry whosekey_envreferencesAAB_HERMES_API_KEY, so no secret is written into the world-readable~/.hermes/config.yaml.approvals.mode: off,cron_mode: approve,destructive_slash_confirm: false,hooks_auto_accept: true,delegation.subagent_auto_approve: true. The launcher also exportsHERMES_YOLO_MODE=1+HERMES_ACCEPT_HOOKS=1. (Hermes has no--dangerously-skip-permissions; its--yolois chat-scoped and would breakconfig/doctor, so the bypass lives in env vars + persisted config, not an injected flag. Hermes keeps an unconditional catastrophic-command floor in code that no config can disable.)agent.max_turns,goals.max_turns,delegation.max_iterations) set to999999— Hermes uses aused >= maxcheck, so0would stop instantly and a large number is the correct "unlimited". Inactivity gateway timeouts set to0(Hermes treats0as unlimited), the auto-continue freshness gate disabled, andtool_loop_guardrailsturned off. Per-operation timeouts are raised, not removed: shell-command timeout 10 min, subagent stuck-detector 24 h.xhigheffort, reasoning always shown (agent.reasoning_effort: xhigh,display.show_reasoning: true).delegation.max_concurrent_childrendefaults toAAB_CODEX_AGENT_MAX_THREADS(16)..claude-plugin/marketplace.json+ nestedplugins/<name>/), not Hermes-native single-plugin repos.install_hermes_pluginsbridges the formats: clone each marketplace once, materialize each plugin's subtree into~/.hermes/plugins/<name>/, synthesize theplugin.yamlHermes requires from the plugin'splugin.json, and enable it.curator.enabled: false;AAB_HERMES_CURATOR=truere-enables it.xz-utilsadded toinstall_base_deps— the Hermes installer unpacks a bundled Node runtime.tar.xz, and bareubuntu:22.04ships withoutxz.New env vars (all in
~/.aab/.env, documented in the README):AAB_HERMES_BASE_URL,AAB_HERMES_API_KEY,AAB_HERMES_MODEL,AAB_HERMES_API_MODE,AAB_HERMES_EFFORT,AAB_HERMES_SHELL_TIMEOUT,AAB_HERMES_CHILD_TIMEOUT,AAB_HERMES_MAX_CONCURRENCY,AAB_HERMES_CURATOR.Rebased onto
upstream/main, which had rearchitected the Claude launcher (native binary stays at~/.local/bin/claude, AAB entrypoint moved to~/.local/aab-bin) and added athird-party-nemotronClaude provider. The Hermes launcher follows the unchangedcodexsymlink pattern (~/.local/bin/hermes->hermes-gateway, withhermes-aab-realtracking the installed binary), and the_is_aab_launcher_symlink_targetallowlist now carries bothclaude-third-party-nemotronandhermes-gateway.Test plan
./test.bash(lint + unit) — shellcheck clean; bats1..123, allok,0failures (incl. the new Hermes cases):./test.bash --docker— full bootstrap on a freshubuntu:22.04, both idempotency passes green (All e2e assertions passed.×2,=== docker e2e passed ===), including the new Hermes config/wrapper/plugin assertions alongside the rebased Claude launcher assertions:./test.bash --secrets(gitleaks v8.18.4) —no leaks found.git diff --check upstream/main..HEAD— no whitespace/conflict errors; branch is 3 commits ahead, 0 behindupstream/main../test.bash --e2e— covered by--docker(same code path on a clean image); not re-run destructively on the host.🤖 Generated with Claude Code