Hermes Agent Bitwarden: Load API Keys and Logins From Your Vault

Share this post

Hermes Agent Bitwarden support lets your agent pull its API keys from Bitwarden instead of a plain .env file, and lets its browser fill website logins without the model ever seeing your passwords. There are two separate tools involved, and mixing them up is the most common mistake. Here’s how each one works, straight from the Hermes and Bitwarden docs.

Key takeaways

  • bws (Secrets Manager) loads API keys when Hermes starts.
  • bw (the password manager) fills website logins in the browser.
  • Setup wizard: hermes secrets bitwarden setup.
  • Bitwarden never blocks startup, and the agent never sees the token.
  • Want AI agents set up securely for your business? Get your Backlink Gameplan, or try Polar Rank free for 3 days.

Two Bitwarden tools, two jobs

According to the Hermes secrets docs, Hermes can load API keys from an external secret manager at startup. Bitwarden Secrets Manager is one of the supported sources, alongside 1Password and a command helper. Website logins are a different feature that uses Bitwarden’s password manager.

ToolWhat Hermes uses it forCommand
Bitwarden Secrets ManagerAPI keys loaded at every startupbws
Bitwarden password managerWebsite logins and 2FA codes in the browserbw

1. How the API key sync works

  • Create a Bitwarden machine account with read access to a project, and generate an access token.
  • Hermes stores that one token in ~/.hermes/.env as BWS_ACCESS_TOKEN.
  • Each time hermes, the gateway or a cron job starts, Hermes calls bws secret list <project_id>.
  • Each secret’s Name becomes the environment variable, for example OPENROUTER_API_KEY.

Bitwarden’s own Secrets Manager CLI docs confirm that bws signs in with a machine-account access token. Hermes only reads from the vault. It never writes back.

Want AI agents that keep your passwords safe? Inside the AI Profit Boardroom you get the Agent OS — Hermes, OpenClaw, OpenCode, Claude and Codex in one place — plus step-by-step Hermes training and four live coaching calls a week.

Want a plan for your business first? Get your Backlink Gameplan, or try Polar Rank free for 3 days.

Join the AI Profit Boardroom →Get Your Backlink Gameplan →Try Polar Rank Free for 3 Days →

2. Set it up with the wizard

hermes secrets bitwarden setup

The wizard installs bws if it’s missing, asks for the token with hidden input, asks for your region (US Cloud, EU Cloud or a self-hosted URL), lets you pick a project, test-fetches, and then turns on secrets.bitwarden.enabled. For scripts there’s a non-interactive form:

hermes secrets bitwarden setup --access-token "$BWS_ACCESS_TOKEN" \
  --server-url https://vault.bitwarden.eu --project-id <project-uuid>

Full steps are on the Bitwarden page of the Hermes docs.

3. Day-to-day commands

CommandWhat it does
hermes secrets bitwarden statusShows whether the sync is working
hermes secrets bitwarden tokenRotates the token, and only saves it if Bitwarden accepts it
hermes secrets bitwarden syncDry run of what would load
hermes secrets bitwarden sync --applyLoads the secrets now
hermes secrets bitwarden disableTurns the integration off

Setup flows and hermes model label each injected key “(from Bitwarden)”, so you can see where a key came from.

4. Settings worth knowing

  • override_existing is true by default, so Bitwarden values win over .env. Rotate a key in the Bitwarden web app and it takes effect on the next start. Set it to false if you want .env to win.
  • cache_ttl_seconds defaults to 300.
  • server_url must be https://. Plain http:// is refused except for localhost.
  • secrets.preserve_existing keeps chosen variables from .env per profile.

5. What keeps it safe

  • Bitwarden never blocks startup. If it fails, Hermes prints a one-line warning naming the fix command and carries on with the existing .env.
  • Hermes strips BWS_ACCESS_TOKEN from every process the agent spawns: the terminal, execute_code and cron scripts. env_passthrough can’t put it back.
  • Bitwarden can never overwrite the token itself.

6. Browser logins with the bw CLI

If the Bitwarden password-manager CLI bw is installed and signed in, Hermes picks it up automatically. The credential vault docs explain the flow:

  • The first time it needs a login, Hermes asks for your master password in a masked prompt.
  • Unlock lasts for the session, with a 30-minute idle timeout.
  • The browser_vault tool can list, fill, save_login, enter_code and unlock.
  • It refuses a fill unless the page matches the saved item’s site, and the model never sees the password.
  • Items with a TOTP seed let Hermes enter 2FA codes for you.
  • In cron, webhooks and the API server, a locked vault reports unavailable_in_this_session.

To stop using it, run hermes vault sources --disable bitwarden.

My verdict

If you already keep your keys in Bitwarden, this is the cleanest setup: one machine-account token in .env, every other key in the vault, and rotation that just works on the next restart. Add the bw CLI if you want the browser to log in for you. Hermes Agent Bitwarden keeps your keys and passwords out of the agent’s reach.

About Julian Goldie

I’m Julian Goldie — founder of Goldie Agency and the AI Profit Boardroom. I test new AI agents almost every day for 432K+ YouTube subscribers and run Hermes, OpenClaw, OpenCode, Claude and Codex side by side in my own Agent OS. Get your Backlink Gameplan, try Polar Rank free for 3 days, or join the AI Profit Boardroom.

Want another angle? Read the AI Profit Boardroom guide to Hermes Agent Bitwarden.

FAQ: hermes agent bitwarden

How do I connect Bitwarden to Hermes Agent?

Run hermes secrets bitwarden setup. Paste a machine-account access token, pick your region and project, and Hermes turns the integration on.

Where does Hermes store the Bitwarden token?

In ~/.hermes/.env as BWS_ACCESS_TOKEN. The project id and region go in config.yaml under secrets.bitwarden.

Does Bitwarden override the keys in my .env file?

Yes, by default, because override_existing is true. Set it to false if you want .env to win.

What happens if Bitwarden is down when Hermes starts?

Hermes still starts. It prints a one-line warning with a fix command and uses the keys already in .env.

Can Hermes log into websites with my Bitwarden logins?

Yes, if the bw CLI is installed and signed in. Hermes asks you to unlock it once per session, then fills logins on the matching site without the model seeing the password.

How do I rotate an expired Bitwarden token in Hermes?

Run hermes secrets bitwarden token. Hermes checks the new token first and only saves it if Bitwarden accepts it.

Ready to put Hermes to work in your business? Join the AI Profit Boardroom for the Agent OS, setup training and daily updates.

Or get your Backlink Gameplan and we’ll map out your setup, or try Polar Rank free for 3 days.

Starting from zero? Get the free AI course and community.

Join the AI Profit Boardroom →Get Your Backlink Gameplan →Try Polar Rank Free for 3 Days →Get the FREE AI Course + Community →

Related reading

Last updated November 2026. This page is a living guide to hermes agent bitwarden — the facts here move fast and it is updated as they do.

Polar Rank: AI SEO software from Julian Goldie

Get more customers from Google and ChatGPT, without doing the SEO yourself

Polar Rank is a team of AI helpers that work on your website every day. They write new articles and build links to your site, so more people find you on Google and in ChatGPT, and more of them buy from you. One of our own new websites went from 0 to 1,435 Google visitors a day in 7 months.

Try Polar Rank free for 3 daysThen $99 a month, or save 30% with yearly ($69 a month). More traffic in 90 days or your money back.

Table of contents

Related Articles

The best SEO company for plumbers gets your business into Google Maps, local search and AI answers. Compare 10 plumbing SEO companies before you hire.
The best SEO agency for dentists fills chairs from Google and AI search while keeping ads truthful and tracking HIPAA-safe. Compare 10 dental SEO agencies.
The best SEO agency for contractors gets you into Google Maps, local search and AI answers so the phone rings. Compare 10 contractor SEO agencies here.
The best SEO agency for healthcare grows patient bookings while meeting Google’s YMYL bar and HIPAA tracking rules. Compare 10 healthcare SEO agencies.