[hermes_squid] Default memory provider for hermes-gateway #24

Open
opened 2026-08-30 19:55:31 +02:00 by hermes · 0 comments
Contributor

Default memory provider for hermes-gateway

After flipping the agent's memory backend to holographic in a previous session (see config.yaml → memory.provider: holographic), the stack currently relies on the value living in the mounted volume hermes_gateway_data:/opt/data. That works today, but the setting isn't reproducible from the repo:

  • A fresh hermes_infra deploy (empty volume) starts with whatever the upstream image ships, which has no memory.provider set.
  • There is no env var that overrides the provider at container start — Hermes reads memory.provider from config.yaml only (verified across agent/memory_manager.py, agent/memory_provider.py, plugins/memory/*; no os.environ lookup for the provider name).
  • A redeploy that wipes or rebuilds the volume silently drops the user's choice.

Goal

Make holographic (or whichever provider is selected) the default for hermes-gateway without requiring the user to manually edit config.yaml after every fresh deploy.

Constraints / facts already established

  • admin/ansible/hermes_squid/ is the canonical source for the hermes_infra stack.
  • hermes-gateway-entrypoint.sh runs before gateway run and currently only sets STT_* defaults — extending it to seed the memory section is one option.
  • Mounted volume: hermes_gateway_data:/opt/data (read-write). The config.yaml inside that volume is what the agent actually reads.
  • No HERMES_MEMORY_PROVIDER env hook exists in the agent code today.
  • Other "default"-style settings in this repo (e.g. STT_PROVIDER: local) are baked into the entrypoint, not the compose env block — same pattern is the natural fit here.

Open questions to resolve before implementation

  • Where to seed the default? Three options, none chosen yet:
    1. Extend hermes-gateway-entrypoint.sh to inject memory.provider into config.yaml when missing.
    2. Ship a baseline config.yaml in hermes_squid/ and bind-mount it over the volume (overwrites user edits — risky).
    3. Document a one-shot post-deploy step in README.md and stop there.
  • How to override per-agent? If we go with option 1, the env-var approach requires a small Hermes change (the agent doesn't currently read any env var for the provider name) — should this PR include a Hermes patch, or stay within admin/ansible only?
  • Other memory.* defaults? flush_min_turns, nudge_interval, memory_char_limit, user_char_limit are currently tuned manually too — same default-or-not question applies.

Acceptance criteria

  • A fresh hermes_infra deploy (empty hermes_gateway_data volume) starts with the intended default memory provider active, verifiable by inspecting the running container's config.yaml and/or a session-start probe.
  • An explicit user override in config.yaml (or future env var) is not clobbered.
  • Single-purpose PR in admin/ansible. No drive-by edits to squid/brencher.
## Default memory provider for hermes-gateway After flipping the agent's memory backend to `holographic` in a previous session (see `config.yaml` → `memory.provider: holographic`), the stack currently relies on the value living in the mounted volume `hermes_gateway_data:/opt/data`. That works today, but the setting isn't reproducible from the repo: - A fresh `hermes_infra` deploy (empty volume) starts with whatever the upstream image ships, which has no `memory.provider` set. - There is no env var that overrides the provider at container start — Hermes reads `memory.provider` from `config.yaml` only (verified across `agent/memory_manager.py`, `agent/memory_provider.py`, `plugins/memory/*`; no `os.environ` lookup for the provider name). - A redeploy that wipes or rebuilds the volume silently drops the user's choice. ### Goal Make `holographic` (or whichever provider is selected) the **default** for hermes-gateway without requiring the user to manually edit `config.yaml` after every fresh deploy. ### Constraints / facts already established - `admin/ansible/hermes_squid/` is the canonical source for the `hermes_infra` stack. - `hermes-gateway-entrypoint.sh` runs before `gateway run` and currently only sets `STT_*` defaults — extending it to seed the memory section is one option. - Mounted volume: `hermes_gateway_data:/opt/data` (read-write). The `config.yaml` inside that volume is what the agent actually reads. - No `HERMES_MEMORY_PROVIDER` env hook exists in the agent code today. - Other "default"-style settings in this repo (e.g. `STT_PROVIDER: local`) are baked into the entrypoint, not the compose env block — same pattern is the natural fit here. ### Open questions to resolve before implementation - **Where to seed the default?** Three options, none chosen yet: 1. Extend `hermes-gateway-entrypoint.sh` to inject `memory.provider` into `config.yaml` when missing. 2. Ship a baseline `config.yaml` in `hermes_squid/` and bind-mount it over the volume (overwrites user edits — risky). 3. Document a one-shot post-deploy step in `README.md` and stop there. - **How to override per-agent?** If we go with option 1, the env-var approach requires a small Hermes change (the agent doesn't currently read any env var for the provider name) — should this PR include a Hermes patch, or stay within `admin/ansible` only? - **Other `memory.*` defaults?** `flush_min_turns`, `nudge_interval`, `memory_char_limit`, `user_char_limit` are currently tuned manually too — same default-or-not question applies. ### Acceptance criteria - A fresh `hermes_infra` deploy (empty `hermes_gateway_data` volume) starts with the intended default memory provider active, verifiable by inspecting the running container's `config.yaml` and/or a session-start probe. - An explicit user override in `config.yaml` (or future env var) is not clobbered. - Single-purpose PR in `admin/ansible`. No drive-by edits to squid/brencher.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/ansible#24