hermes-agent

by Ankra

Helm chartv0.3.1App v2026.8.27Apache-2.0Verified publisher

Nous Research Hermes Agent on Kubernetes - digest-pinned, non-root, egress-restricted by default, with managed-secret and supply-chain guardrails.

About this chart

hermes-agent

Nous Research Hermes Agent on Kubernetes, packaged the way Ankra runs it: image pinned by digest, credentials that have to come from a Secret you already manage, and a NetworkPolicy that keeps the agent away from the cluster network and the cloud metadata endpoint.

Hermes is an agent that runs a shell and a browser. Treat it as untrusted workload that happens to hold your model provider keys, and the defaults in this chart make sense.

Chartoci://ghcr.io/ankraio/ankra-charts/hermes-agent
Helm repohelm repo add ankra https://ankraio.github.io/ankra-charts
Imagedocker.io/nousresearch/hermes-agent, digest-pinned in values.yaml
Upstream projectNousResearch/hermes-agent

Install

Hermes needs at least one model provider key. The chart will not accept it as a plain value, so create the Secret first:

kubectl create namespace hermes
kubectl -n hermes create secret generic hermes-credentials \
  --from-literal=OPENROUTER_API_KEY="$OPENROUTER_API_KEY"

helm install hermes oci://ghcr.io/ankraio/ankra-charts/hermes-agent \
  --version 0.1.1 -n hermes \
  --set secrets.existingSecret=hermes-credentials

Any environment variable Hermes reads can live in that Secret - every key is loaded with envFrom. The commonly used ones:

PurposeKeys
Model providersOPENROUTER_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, GEMINI_API_KEY, GROQ_API_KEY, MISTRAL_API_KEY, NOUS_API_KEY, HF_TOKEN
ToolsEXA_API_KEY, FIRECRAWL_API_KEY, FAL_KEY, BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID, GITHUB_TOKEN
Chat surfacesTELEGRAM_BOT_TOKEN, DISCORD_BOT_TOKEN, SLACK_BOT_TOKEN, SLACK_APP_TOKEN, SIGNAL_HTTP_URL
API serverAPI_SERVER_KEY

Overlays for the usual shapes live in values-examples/: minimal, production, air-gapped, multi-tenant, operator.

What the defaults enforce

Every rule below fails helm template/helm install with an explanation rather than shipping a weaker manifest. Each has a named waiver under hardening.*, so loosening one is a visible line in your values file.

RuleWaiver
The image is pinned by digest, not just by taghardening.allowMutableImageTag
API keys come from secrets.existingSecret or an ExternalSecret, never inline valueshardening.allowInlineSecrets
The agent drops to a non-root uid (env.HERMES_UID), read-only root filesystem, ALL capabilities dropped, no privilege escalation, no added capabilitieshardening.allowPrivilegedRuntime
runAsUser is not pinned, and runAsNonRoot: true is refused — see belowhardening.enabled: false
No ServiceAccount token mounted - Hermes never calls the Kubernetes APIhardening.allowPrivilegedRuntime
rbac.rules may not contain *hardening.allowWildcardRbac
A NetworkPolicy is presenthardening.allowUnrestrictedNetwork
Egress excludes 169.254.0.0/16 (cloud instance metadata)hardening.allowMetadataEndpointEgress
Egress excludes RFC1918 (10/8, 172.16/12, 192.168/16)hardening.allowClusterInternalEgress
apiServer.corsOrigins is not *none - list the origins
One replica and a Recreate rollout while persistence is onnone - HERMES_HOME is single-writer
npm packages install only when npm.enabled=true, and never run lifecycle scriptsnpm.ignoreScripts

hardening.enabled=false turns all of it off at once. It exists for local experiments and is not a supported way to run this chart.

Why the pod enters as root

The upstream image runs s6-overlay as PID 1, and its bootstrap refuses a pinned non-root UID outright:

[stage2] ERROR: container started with --user 1000 (an arbitrary, non-hermes UID).
... the baked /opt/hermes install tree is intentionally root-owned and
non-writable, so a pinned --user UID cannot repair startup state

Its supported model is the inverse: enter as root, remap the hermes user to HERMES_UID/HERMES_GID, chown the data volume, then drop to that user. So the chart sets env.HERMES_UID: "1000" and does not set runAsUser; the hardening guard checks that HERMES_UID is non-zero rather than asserting runAsNonRoot, and pinning a UID is refused at render time with this reason.

Two consequences:

  • The namespace needs PodSecurity baseline, not restricted.
  • The root filesystem still stays read-only. s6-overlay only needs a writable /run, which the chart mounts as an emptyDir with S6_READ_ONLY_ROOT=1.
  • Four capabilities are added back on top of drop: [ALL]: CHOWN, DAC_OVERRIDE, SETGID, SETUID. s6-overlay needs them to chown its service directories and setuid into the hermes user. Without them the agent is dead but the pod still reports Ready, because s6 keeps PID 1 alive. Verified minimal against the image; the guard rejects anything beyond these four.

The network default, concretely

egress:
  - to: [{ namespaceSelector: { matchLabels: { kubernetes.io/metadata.name: kube-system } } }]
    ports: [{ protocol: UDP, port: 53 }, { protocol: TCP, port: 53 }]
  - to:
      - ipBlock:
          cidr: 0.0.0.0/0
          except: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, 100.64.0.0/10, 127.0.0.0/8]
    ports: [{ protocol: TCP, port: 443 }]

DNS, and HTTPS to public addresses. That is enough to reach OpenRouter, Anthropic, OpenAI and the usual tool APIs, and not enough to reach your in-cluster Postgres, another tenant's pods, or the instance metadata service that hands out node IAM credentials.

Ingress is denied unless a Service is exposed, in which case only the release namespace (plus networkPolicy.ingress.allowedNamespaces) reaches the exposed ports.

Two things to know:

  • This is only real if your CNI enforces NetworkPolicy. Cilium, Calico and Antrea do; some managed CNIs and plain flannel do not. On a CNI that ignores policies the manifest is decoration.
  • Egress to an in-cluster model gateway needs an explicit rule, because RFC1918 is excluded. See values-examples/air-gapped.yaml. The chart refuses to render a model endpoint on a .svc, .cluster.local or private address until networkPolicy.egress.extra has a rule for it, so this cannot fail silently at runtime.

Configuration

config.values is rendered to HERMES_HOME/config.yaml by an init container, soul.text to SOUL.md. bootstrap.overwrite=true (the default) makes Helm the source of truth on every restart; set it to false to seed once and let the agent own the file afterwards. config.raw takes a templated YAML string when the structured form is not enough.

Two defaults differ from the Hermes sample configuration on purpose:

SettingHereWhy
security.tirith_fail_openfalseUpstream fails open: if the policy engine errors, the request proceeds unchecked.
browser.allow_private_urlsfalseSecond line of defence behind the NetworkPolicy - the browser tool should not fetch cluster-internal URLs.

Several model endpoints: switchable, with failover

config.values.model is the main model, and on its own it holds exactly one endpoint. To keep two or more available at once - a hosted API and an in-cluster gateway, say - declare each as a named entry under config.values.providers and pick the main one by name:

config:
  values:
    model:
      provider: salad
      default: qwen3.6-35b-a3b
      base_url: ""            # the endpoint comes from providers.salad
    providers:
      salad:
        api: https://ai.salad.cloud/v1
        key_env: SALAD_API_KEY
        discover_models: false
        models: [qwen3.6-35b-a3b]
      claude-code:
        api: http://claude-code-openai-wrapper.claude.svc:8000/v1
        key_env: CLAUDE_CODE_WRAPPER_API_KEY
        discover_models: false
        models: [claude-sonnet-4-6]
    fallback_providers:
      - provider: claude-code
        model: claude-sonnet-4-6

Every named provider is selectable: /model in Telegram, Discord or the dashboard chat switches the current session between them, and the dashboard's Models page lists each one with its models. fallback_providers is the ordered chain Hermes moves to, mid-conversation, when the main model answers 429, 5xx, 401/403 or 404 - for the rest of that turn, then it retries the primary on the next message. Swapping which endpoint is primary is a one-word edit to model.provider (and a restart, since bootstrap.overwrite=true re-seeds config.yaml). A fallback entry can also spell out provider: custom with its own base_url and key_env instead of naming a provider.

Credentials never go in values: key_env names a key of the Secret the pod mounts (secrets.existingSecret, the ExternalSecret target, or extraEnvFrom), one per provider, and the chart refuses an inline api_key anywhere on a model endpoint unless hardening.allowInlineSecrets=true. It also refuses a key_env that nothing in the release puts on the pod, a fallback entry missing provider or model (Hermes would drop it without a word), a model.base_url that contradicts the named provider, and an in-cluster endpoint with no networkPolicy.egress.extra rule. values-examples/multi-provider.yaml is the complete version of the snippet above, egress rule included.

Giving the agent a browser

The image enables a browser toolset that attaches to a Chromium over the DevTools Protocol at http://127.0.0.1:9222, and ships no browser binary. Until something listens there the toolset is enabled with nothing behind it.

helm upgrade hermes oci://ghcr.io/ankraio/ankra-charts/hermes-agent \
  -n hermes --version 0.1.4 \
  --set secrets.existingSecret=hermes-credentials \
  --set browser.cdp.enabled=true

That runs a digest-pinned chromedp/headless-shell beside the agent in the same pod: the debugger binds loopback, so the agent reaches it and the cluster cannot. The container is non-root, unprivileged, read-only-root and drops every capability; Chromium's own sandbox needs privileges this chart will not grant, so --no-sandbox is passed and the container hardening carries the weight instead.

For browsers the built-in toolset cannot drive, use MCP. Camoufox - a hardened Firefox whose fingerprint and input timing read as a person rather than a headless robot - speaks Playwright, not CDP, so it cannot back the built-in toolset and comes in as an MCP server instead (the other way to get Camoufox is the REST-wrapped sidecar in Camofox below, which replaces the built-in browser tools wholesale):

mcp:
  servers:
    camoufox:
      command: npx
      args: ["-y", "@playwright/mcp@latest", "--browser=firefox", "--isolated"]
      env:
        PLAYWRIGHT_FIREFOX_EXECUTABLE_PATH: /opt/data/camoufox/camoufox

mcp.servers is rendered to mcp.json in the agent home by the same bootstrap init container that seeds config.yaml and SOUL.md, in the exact shape the agent validates ($schema and mcpServers, nothing else), so the server is live on start and no hermes mcp add has to be run inside the pod. Its tools arrive namespaced under the server name (camoufox:browser_navigate) and can be toggled with hermes tools enable|disable. Both halves together are values-examples/browser-stealth.yaml.

Egress still goes through the NetworkPolicy, and browser.allow_private_urls stays false: a browser in the pod does not become a way into the cluster.

Exposing the API server

helm upgrade hermes oci://ghcr.io/ankraio/ankra-charts/hermes-agent \
  -n hermes --version 0.1.1 \
  --set secrets.existingSecret=hermes-credentials \
  --set apiServer.enabled=true \
  --set service.enabled=true

apiServer.enabled=true requires an API_SERVER_KEY in the Secret - the OpenAI-compatible endpoint is unauthenticated without it. The Service, the container port and the NetworkPolicy ingress rule are all derived from the enabled listeners, so there is nothing else to keep in step. Enabling it also installs tcpSocket liveness/readiness/startup probes; set probes.* to replace them.

ingress.enabled=true and virtualService.enabled=true (Istio) route to the first exposed port unless you set servicePortNumber.

Storage

HERMES_HOME (/opt/data) holds conversation state, the seeded config and any npm packages, on a ReadWriteOnce PVC. That makes the workload single-writer: the chart refuses replicaCount > 1 and refuses RollingUpdate while persistence is on. For more agents, install more releases - one per agent, or one per tenant with values-examples/multi-tenant.yaml.

Set persistence.enabled=false for a stateless gateway; the volume becomes an emptyDir and the single-writer rules no longer apply.

Camofox: the anti-detection browser

Hermes ships its own browser tools, driven by agent-browser (Chrome). Sites that fingerprint their visitors see that for what it is. Upstream's answer is Camofox: Camoufox, a Firefox fork that spoofs its fingerprint in C++ rather than with JS shims, wrapped in a REST API. Setting CAMOFOX_URL makes Hermes route every one of its browser tools through it, in place of agent-browser and Browserbase.

camofox:
  enabled: true
  image:
    digest: sha256:...   # required; see below

That runs Camofox as a second container in the same pod and points the agent at http://localhost:9377. It is a sidecar rather than something inside the agent container for two reasons: Camoufox needs GTK3, Mesa and Xvfb, none of which the agent image ships, and it wants a writable home for profiles, cookies and traces. Same pod also means loopback — no

Deploy hermes-agent with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has hermes-agent on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charthermes-agent is pinned at v0.3.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply