Problem or Use Case
Feature Request: 1Password as a Hermes secret source
Context
Hermes currently supports Bitwarden Secrets Manager (BWS) as an external secret source, documented at:
https://hermes-agent.nousresearch.com/docs/user-guide/secrets/
The docs also mention:
"More backends (Vault, AWS Secrets Manager, 1Password CLI) are easy to add behind the same interface — the lift is one module in agent/secret_sources/ and one CLI handler. File a request if you have a specific one in mind."
1Password is one of the most widely used password managers, and its official op CLI supports both interactive desktop sessions and non-interactive service-account tokens — making it a natural fit for programmatic credential access in Hermes startup.
What 1Password / the op CLI offers
op://vault/item/field secret references — a stable, human-readable URI scheme for individual credentials
- Service-account tokens for headless/CI workloads (
OP_SERVICE_ACCOUNT_TOKEN) with scoped vault read access
- Desktop/interactive session auth (
OP_SESSION_*) for laptop/developer use — no extra setup beyond signing in to the app
- Audit logs for every credential access in the 1Password web console
- End-to-end encryption — the standard 1Password security model
- Available on the individual, team, and business plans; the developer plan covers most personal uses
This is functionally equivalent to what Bitwarden Secrets Manager provides for Hermes' use case, with the additional benefit that many teams already have 1Password for Business.
Proposed Solution
Proposed implementation
A new backend module agent/secret_sources/onepassword.py that:
- Reads an
env mapping of ENV_VAR_NAME → op://vault/item/field references from secrets.onepassword.env in config.yaml
- Resolves each reference with a single
op read -- <reference> call at startup (after .env loads)
- Injects resolved values into
os.environ, matching the existing Bitwarden startup hook
- Supports
OP_SERVICE_ACCOUNT_TOKEN for service-account auth and OP_SESSION_* for desktop sessions — op handles auth entirely; Hermes shells out to an already-authenticated CLI
- Caches successful pulls in-process and on disk (
<hermes_home>/cache/op_cache.json, mode 0600) so back-to-back invocations don't re-shell op for every reference
- Is startup-safe and fail-open: a missing binary, expired session, bad reference, or empty value each emit a one-line warning and fall through to whatever credentials
.env already had
Also adds hermes secrets onepassword {setup,status,set,remove,sync,disable} CLI commands (aliases op, 1password) for managing the configuration interactively.
Why this matters
1Password is already the credential store for a large number of individual developers and engineering teams. Adding it as a Hermes secret source lets them rotate provider API keys centrally in 1Password rather than maintaining plaintext .env files across multiple machines or gateway deployments.
Alternatives Considered
Bitwarden Secrets Manager is already supported. 1Password differs in that it uses per-field op:// references rather than a project-level bulk sync, and its CLI supports both service-account and interactive session auth natively without Hermes needing to manage binary download or installation.
Feature Type
New tool
Scope
Medium (new agent/secret_sources/onepassword.py + hermes_cli/onepassword_secrets_cli.py + env_loader wiring + tests + docs)
Contribution
Related PR: #36896
Problem or Use Case
Feature Request: 1Password as a Hermes secret source
Context
Hermes currently supports Bitwarden Secrets Manager (BWS) as an external secret source, documented at:
https://hermes-agent.nousresearch.com/docs/user-guide/secrets/
The docs also mention:
1Password is one of the most widely used password managers, and its official
opCLI supports both interactive desktop sessions and non-interactive service-account tokens — making it a natural fit for programmatic credential access in Hermes startup.What 1Password / the
opCLI offersop://vault/item/fieldsecret references — a stable, human-readable URI scheme for individual credentialsOP_SERVICE_ACCOUNT_TOKEN) with scoped vault read accessOP_SESSION_*) for laptop/developer use — no extra setup beyond signing in to the appThis is functionally equivalent to what Bitwarden Secrets Manager provides for Hermes' use case, with the additional benefit that many teams already have 1Password for Business.
Proposed Solution
Proposed implementation
A new backend module
agent/secret_sources/onepassword.pythat:envmapping ofENV_VAR_NAME → op://vault/item/fieldreferences fromsecrets.onepassword.envin config.yamlop read -- <reference>call at startup (after.envloads)os.environ, matching the existing Bitwarden startup hookOP_SERVICE_ACCOUNT_TOKENfor service-account auth andOP_SESSION_*for desktop sessions —ophandles auth entirely; Hermes shells out to an already-authenticated CLI<hermes_home>/cache/op_cache.json, mode0600) so back-to-back invocations don't re-shellopfor every reference.envalready hadAlso adds
hermes secrets onepassword {setup,status,set,remove,sync,disable}CLI commands (aliasesop,1password) for managing the configuration interactively.Why this matters
1Password is already the credential store for a large number of individual developers and engineering teams. Adding it as a Hermes secret source lets them rotate provider API keys centrally in 1Password rather than maintaining plaintext
.envfiles across multiple machines or gateway deployments.Alternatives Considered
Bitwarden Secrets Manager is already supported. 1Password differs in that it uses per-field
op://references rather than a project-level bulk sync, and its CLI supports both service-account and interactive session auth natively without Hermes needing to manage binary download or installation.Feature Type
New tool
Scope
Medium (new
agent/secret_sources/onepassword.py+hermes_cli/onepassword_secrets_cli.py+ env_loader wiring + tests + docs)Contribution
Related PR: #36896