You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agent-Vault is a security layer that prevents AI agents from seeing or transmitting sensitive information to LLM provider servers. It replaces real secrets with placeholders like <agent-vault:key> during agent file I/O, so the agent can read and write configuration files containing API keys, tokens, and passwords without ever seeing their actual values.
This is complementary to #363 (file tool redaction gap). While #363 addresses the defensive/passive layer (masking secrets the agent stumbles upon), this issue proposes an active secret management workflow — the agent intentionally works with vaulted secrets using placeholder syntax, enabling it to write config files, set up services, and manage credentials safely.
The idea comes from evaluating botiverse/agent-vault (Apache-2.0, TypeScript, v0.4.0).
Research Findings
How Agent-Vault Works
Agent-vault acts as a bidirectional redaction layer between the agent and disk:
Bigram False-Positive Prevention — ~110 common English bigrams; if ≥30% of character pairs match, the string is classified as "word-like" and skipped (prevents masking "moonshot" or "development")
UNVAULTED Detection: Unknown secrets are replaced with <agent-vault:UNVAULTED:sha256:XXXXXXXX> where XXXXXXXX is a hash prefix. On write-back, the original value is restored by matching against the existing file on disk.
Security:
AES-256-GCM per-value encryption in ~/.agent-vault/vault.json
Master key in ~/.agent-vault/vault.key with 0600 permissions
TTY guards prevent agents from calling set/get --reveal even via prompt injection
Storage is outside the project tree (prevents accidental Git commits)
Agent-vault has the best fit for our use case because it enables productive secret handling (the agent can write config files with real secrets via placeholders) rather than just blocking access.
Current State in Hermes Agent
What we have:
agent/redact.py — Regex-based redaction for logs and terminal output (passive, pattern-only)
tools/approval.py — Dangerous command detection
tools/file_operations.py — Write deny-list for sensitive paths (~/.ssh/*, ~/.aws/*, ~/.hermes/.env)
tools/code_execution_tool.py — Strips API keys from child process environment
The gap: No mechanism for the agent to safely write config files that need real secrets. Currently:
Agent can't read the secret (it's in .env or masked)
Agent asks user to paste the secret → it enters the LLM context
Agent writes the secret to the config file → it's in the conversation history
With agent-vault, the flow becomes:
User runs agent-vault set my-api-key in their terminal (masked input)
The real value is on disk but never entered the LLM context ✓
Implementation Plan
Skill vs. Tool Classification
This should be a skill because:
The capability is expressed as CLI commands via terminal
It wraps an external CLI tool (@botiverse/agent-vault, installable via npm/npx)
No custom Python integration or API key management needed in the harness
The agent's behavior is guided by instructions (when to use vault read/write vs. regular file ops)
Bundled or Skills Hub? This should be bundled — secret handling is a broadly useful security concern that benefits most users, especially those using Hermes for DevOps, service setup, or any task involving credentials.
What We'd Need
agent-vault installed via npm install -g @botiverse/agent-vault or invoked via npx
A skill that teaches the agent when and how to use agent-vault commands
Integration with the existing read_file/write_file workflow (the skill should instruct the agent to prefer agent-vault read/write for files that may contain secrets)
Phased Rollout
Phase 1: Basic Skill (CLI wrapper)
Create skill with instructions for using agent-vault read/write/has/list
Trigger conditions: user mentions secrets, credentials, API keys, .env files, config setup
Agent guidelines: prefer agent-vault read over read_file for config/env files
If vault not initialized, instruct user to run agent-vault init and agent-vault set <key>
Helper script to check if agent-vault is installed, install via npm if needed
User retains control: Only the user can add/remove secrets via TTY-guarded commands
Cons / Risks
Node.js dependency: Requires npm/Node.js 18+, which may not be present on all systems
Extra workflow step: Users must agent-vault set secrets before the agent can use them
Tool switching complexity: Agent must decide when to use agent-vault read vs read_file — could cause confusion
Vault key management: If ~/.agent-vault/vault.key is lost, all secrets are unrecoverable
Young project: v0.4.0, relatively new (Feb 2026) — may have undiscovered issues
Not Hermes-specific: The agent-vault skill format is designed for generic agents; our skill would need to adapt its instructions
Open Questions
Should Phase 1 require npm install -g or use npx for zero-install? (npx adds ~3s startup overhead per call)
Should the skill auto-detect when agent-vault is useful, or only activate when the user explicitly asks about secrets?
For Phase 3: should vault-aware file ops be a config option or always-on when agent-vault is installed?
Should we eventually build a Python-native equivalent to avoid the Node.js dependency? (The vault.ts core is ~200 lines of AES-256-GCM + entropy detection — portable to Python)
How should this interact with the existing write deny-list? (Currently blocks writing to ~/.hermes/.env but doesn't offer an alternative for setting credentials)
Overview
Agent-Vault is a security layer that prevents AI agents from seeing or transmitting sensitive information to LLM provider servers. It replaces real secrets with placeholders like
<agent-vault:key>during agent file I/O, so the agent can read and write configuration files containing API keys, tokens, and passwords without ever seeing their actual values.This is complementary to #363 (file tool redaction gap). While #363 addresses the defensive/passive layer (masking secrets the agent stumbles upon), this issue proposes an active secret management workflow — the agent intentionally works with vaulted secrets using placeholder syntax, enabling it to write config files, set up services, and manage credentials safely.
The idea comes from evaluating botiverse/agent-vault (Apache-2.0, TypeScript, v0.4.0).
Research Findings
How Agent-Vault Works
Agent-vault acts as a bidirectional redaction layer between the agent and disk:
Safe Commands (agent-accessible, never expose secrets):
agent-vault read <file>— Returns file content with secrets replaced by placeholdersagent-vault write <file> --content '...'— Writes file, restoring placeholders to real valuesagent-vault has <key>— Check if a secret existsagent-vault list— List all stored key namesSensitive Commands (TTY-guarded, human-only):
agent-vault set <key>— Store a secret (masked input, requires interactive TTY)agent-vault get <key>— View metadata (--reveal for value, cannot be piped)agent-vault import <file>— Bulk import from .env filesagent-vault scan <file>— Audit a file for unvaulted secretsKey Technical Features
3-Layer Secret Detection:
UNVAULTED Detection: Unknown secrets are replaced with
<agent-vault:UNVAULTED:sha256:XXXXXXXX>where XXXXXXXX is a hash prefix. On write-back, the original value is restored by matching against the existing file on disk.Security:
~/.agent-vault/vault.json~/.agent-vault/vault.keywith 0600 permissionsset/get --revealeven via prompt injectionAlternatives Considered
Agent-vault has the best fit for our use case because it enables productive secret handling (the agent can write config files with real secrets via placeholders) rather than just blocking access.
Current State in Hermes Agent
What we have:
agent/redact.py— Regex-based redaction for logs and terminal output (passive, pattern-only)tools/approval.py— Dangerous command detectiontools/file_operations.py— Write deny-list for sensitive paths (~/.ssh/*,~/.aws/*,~/.hermes/.env)tools/code_execution_tool.py— Strips API keys from child process environmentThe gap: No mechanism for the agent to safely write config files that need real secrets. Currently:
With agent-vault, the flow becomes:
agent-vault set my-api-keyin their terminal (masked input)agent-vault write config.yaml --content 'key: <agent-vault:my-api-key>'Implementation Plan
Skill vs. Tool Classification
This should be a skill because:
terminal@botiverse/agent-vault, installable via npm/npx)Bundled or Skills Hub? This should be bundled — secret handling is a broadly useful security concern that benefits most users, especially those using Hermes for DevOps, service setup, or any task involving credentials.
What We'd Need
agent-vaultinstalled vianpm install -g @botiverse/agent-vaultor invoked vianpxread_file/write_fileworkflow (the skill should instruct the agent to preferagent-vault read/writefor files that may contain secrets)Phased Rollout
Phase 1: Basic Skill (CLI wrapper)
agent-vault readoverread_filefor config/env filesagent-vault initandagent-vault set <key>Phase 2: Auto-Detection Integration
read_filereturns content with redacted placeholders (from Security: File Tool Output Redaction Gap — Secrets Exposed via read_file but Masked via Terminal #363)Phase 3: Vault-Aware File Operations
vault_aware_file_ops: trueread_fileautomatically runs content throughagent-vault readredactionwrite_fileautomatically restores placeholders before writingPros & Cons
Pros
Cons / Risks
agent-vault setsecrets before the agent can use themagent-vault readvsread_file— could cause confusion~/.agent-vault/vault.keyis lost, all secrets are unrecoverableOpen Questions
npm install -gor usenpxfor zero-install? (npx adds ~3s startup overhead per call)References