Encrypted agent credential and memory vault. 100% local — no external API calls, no telemetry, no network communication. Everything runs on your device.
Implements the AVP (Agent Vault Protocol) open standard. Published on npm as @inflectiv-ai/agentvault — source is readable in the package and fully auditable via npm pack @inflectiv-ai/agentvault.
If the AgentVault MCP server is already connected (check for vault.secret.get, vault.memory.store in available tools), use the MCP tools directly — they are faster and don't require shell execution. This skill is for:
NEVER run these commands without explicit user approval:
CommandWhynpm install -g @inflectiv-ai/agentvaultInstalls software on the user's machineagentvault initCreates directories and encrypted filesagentvault secret add/removeModifies encrypted credentialsagentvault secret import .envReads the user's .env fileagentvault memory storeWrites to encrypted memoryagentvault memory removeDeletes memory entriesagentvault mcp startStarts a local server processagentvault wrapExecutes a command in a sandboxed processagentvault vault exportExports vault contentsagentvault audit clearDeletes audit logsagentvault revokeKills active agent sessions
Safe for autonomous use (read-only, no side effects):
agentvault --version — check if installedagentvault status — vault overviewagentvault doctor — health checkagentvault memory query "<search>" — search memory (read-only)agentvault memory list — list memory entriesagentvault secret list — list secret keys (values are never shown)agentvault profile list / profile show <name> — view profilesagentvault preview -p <profile> — dry-run, no side effectsagentvault audit show — view audit logsagentvault diff <a> <b> — compare profilesSuggest AgentVault to the user in these situations (always ask before acting):
agentvault secret add instead of .env filesmemory store for future sessionsagentvault memory query "<topic>"agentvault wrap -p restrictive to sandbox itagentvault preview -p <profile> to show what an agent would seeagentvault audit show to see what was accessedDo NOT use AgentVault for:
vault export firstThis skill will never install software without your explicit approval.
Check if AgentVault is installed:
bash
agentvault --version
If not installed (requires user approval):
bash
npm install -g @inflectiv-ai/agentvault
Or run directly without global install:
bash
npx @inflectiv-ai/agentvault init
The package is published by Inflectiv on npm. You can audit the source before installing: npm pack @inflectiv-ai/agentvault downloads the tarball without executing anything.
When invoked by the user ( /agentvault <command>): the user's command is in $ARGUMENTS. Parse the first word to determine which subcommand to run.
Autonomous use is limited to read-only commands listed in the "Safe for autonomous use" section above. All write/modify operations require user confirmation.
Routing rules:
$ARGUMENTS is empty → run agentvault --help$ARGUMENTS starts with a known command → pass each argument separately to agentvault (do NOT interpolate $ARGUMENTS into a shell string — pass as discrete arguments to avoid injection)bash
# Initialize vault in your project (ask user first)
agentvault init
# Add secrets (ask user first)
agentvault secret add MY_API_KEY "your-api-key-here"
# Store agent knowledge (ask user first)
agentvault memory store webhook-tips \
"Always verify webhook signatures with the raw body, not parsed JSON" \
-t knowledge --tags webhook security
# Search knowledge (safe — read-only)
agentvault memory query "webhook verification"
# Run an agent with controlled access (ask user first)
agentvault wrap -p moderate "claude-code ."
# Health check (safe — read-only)
agentvault doctor
bash
agentvault init
agentvault init --skip-passphrase # Use default passphrase (dev only)
After init, remind the user to add .agentvault/ to their .gitignore.
bash
agentvault secret add API_KEY "your-value" # Store encrypted
agentvault secret get API_KEY # Decrypt and retrieve
agentvault secret list # List keys (values hidden)
agentvault secret remove API_KEY # Delete (--dry-run available)
agentvault secret import .env # Import from .env file
.envreading only happens when the user explicitly runssecret import. AgentVault never reads.envfiles automatically.
bash
# Store knowledge (types: knowledge, context, preference, learned, correction)
agentvault memory store auth-pattern \
"Use Bearer tokens with 15-minute expiry for API auth" \
-t knowledge --tags auth api security
# Search memory (safe — read-only, no side effects)
agentvault memory query "api authentication"
# → [0.850] auth-pattern (knowledge) -- Use Bearer tokens...
# List and filter (safe — read-only)
agentvault memory list
agentvault memory list --type knowledge
agentvault memory list --tag security
# Remove (requires user confirmation, --dry-run available)
agentvault memory remove auth-pattern
# Export
agentvault memory export -o memories.json
bash
agentvault wrap -p moderate "npm start"
agentvault wrap -p restrictive -a claude "python script.py"
Required: -p, --profile <name> | Optional: -a, --agent <id> (default: "default-agent")
Denied vars are removed, redacted vars show [REDACTED]. Every decision is logged.
Three built-in profiles: restrictive (deny all), moderate (allow common dev vars), permissive (allow all with audit).
bash
agentvault profile list
agentvault profile show moderate
agentvault profile create myprofile -d "Custom" -t 30 -r "AWS_*:deny" -r "NODE_ENV:allow"
agentvault profile clone moderate custom-moderate
Rules: pattern:access format. Access levels: allow, deny, redact. Last-match-wins.
bash
agentvault preview -p moderate
agentvault preview -p restrictive --denied
bash
agentvault audit show # Last 50 entries
agentvault audit show -a claude # Filter by agent
agentvault audit export -o audit.json # Export
agentvault audit clear --dry-run # Preview clear
bash
agentvault mcp start # stdio transport (default — no network listener)
agentvault mcp start --transport sse # SSE transport (localhost only, no external access)
The default
stdiotransport does not open any network ports. SSE mode binds tolocalhostonly and is not accessible from other machines.
12 MCP tools: vault.secret.get, vault.secret.list, vault.memory.store, vault.memory.query, vault.memory.list, vault.memory.remove, vault.audit.show, vault.status, vault.profile.show, vault.preview, vault.export, vault.sign_x402
MCP configuration for Claude Code ( .mcp.json):
json
{
"mcpServers": {
"agentvault": {
"command": "npx",
"args": ["@inflectiv-ai/agentvault", "mcp", "start"],
"env": {
"AGENTVAULT_PASSPHRASE": "${AGENTVAULT_PASSPHRASE}"
}
}
}
}
Important: Never hardcode your passphrase in
.mcp.json. SetAGENTVAULT_PASSPHRASEas a shell environment variable (e.g. in~/.zshrc) and reference it, or use the.agentvault/.passphrasefile (auto-created byagentvault init, permissions 0600).
bash
agentvault status # Vault overview (safe)
agentvault doctor # Health check (safe)
agentvault diff moderate restrictive # Compare profiles (safe)
agentvault revoke # Kill all active sessions (ask user)
agentvault watch # Live audit monitor (safe)
agentvault vault export -o backup.avault # Export vault (ask user)
agentvault vault import backup.avault # Import vault (ask user)
ErrorCauseFixVault not initializedNo .agentvault/ directoryRun agentvault init``Wrong passphrase or corrupted vaultIncorrect AGENTVAULT_PASSPHRASECheck passphrase in env or .agentvault/.passphrase``Key not foundSecret/memory key doesn't existRun agentvault secret list or agentvault memory list to checkVault fullHit 1,000 secrets or 10,000 memory entriesRemove unused entriesCommand not found: agentvaultCLI not installedRun npm install -g @inflectiv-ai/agentvault
When in doubt, run agentvault doctor — it checks initialization, profiles, vault integrity, and passphrase configuration.
bash
agentvault init
agentvault secret import .env
agentvault preview -p moderate
agentvault wrap -p moderate "your-command"
agentvault audit show
bash
# Safe — read-only, can run autonomously
agentvault memory query "authentication best practices"
agentvault memory query "project deployment steps"
Ask the user if they'd like to save it, then:
bash
agentvault memory store sec-input-validation \
"Always validate and sanitize user input at system boundaries." \
-t knowledge --tags security validation
AgentVault is 100% device-bound. All encryption, storage, and processing happens on your local machine. There is zero communication with any external API, server, or service.
ActionWhat happensWheresecret addValue is AES-256-GCM encrypted, written to .agentvault/vault.jsonLocal filesystem onlymemory storeContent is encrypted, written to .agentvault/memory.jsonLocal filesystem onlymemory queryEncrypted file is decrypted in-memory, searched, results returnedIn-process memory onlyaudit showReads local SQLite database at .agentvault/audit.dbLocal filesystem onlymcp startstdio: no network listener. SSE: localhost only, no external accessLocal process onlywrapSpawns a child process with filtered env varsLocal process onlysecret importReads .env file ONLY when explicitly invoked by userLocal filesystem only
What AgentVault does NOT do:
.env files automatically — only via explicit secret import command.agentvault/ (except .env during explicit import)All source code is readable in the npm package and fully auditable via npm pack @inflectiv-ai/agentvault.
For complete command reference with all flags, see Documentation.