Skip to main content

Server

Start the Agent Vault server. Default port is 14321. On a fresh install, generates a random data encryption key (DEK) and optionally wraps it with a master password.Password resolution order: AGENT_VAULT_MASTER_PASSWORD env var, then --password-stdin, then interactive prompt. If no password is provided, runs in passwordless mode (DEK stored unwrapped). The env var is unset from the process immediately after reading.Environment variables:
Stop a running server. Reads the PID from ~/.agent-vault/agent-vault.pid and sends SIGTERM.

Database migration

Copy all data from the current SQLite database to a PostgreSQL instance. The server must be stopped before running this command. The source SQLite database is not modified.After a successful migration, set DATABASE_URL (or --database-url on the server) and restart. See PostgreSQL for the full guide.

CA

Fetch the root CA certificate used by Agent Vault’s transparent MITM proxy, in PEM form. Install the output into your client trust store so HTTPS traffic routed through the proxy validates cleanly.The transparent proxy is enabled by default, so this command works out of the box. The endpoint is public — no authentication required. Returns an error only if the server was started with --mitm-port 0.Examples:

Authentication

Self-signup for a new account. The first user to register becomes the instance owner, is auto-activated, and is granted admin on the default vault. Subsequent users receive a 6-digit email verification code.
Authenticate with email and password. Prompts interactively by default. Rejects inactive (unverified) accounts.Sessions are long-lived: 1 year absolute, 30 days idle. Active operators effectively never have to log in again. A session that goes 30 days without making a request is automatically expired.
List active sessions for your account, with the device label, last IP, last activity, and expiry. The session being used for this request is marked with a checkmark in the Current column.
Revoke a specific session by id (from auth sessions list). Use this to invalidate a stolen ~/.agent-vault/session.json or to log out a forgotten device. Revoking your current session forces you to log in again on this device.

Account

Show current user and session info.
Change your own password. Prompts interactively for current password, new password, and confirmation. Invalidates all existing sessions and issues a new one.
Permanently delete your own account. Owners cannot delete themselves — transfer ownership first.

Vaults

Create a new vault. Name must be in slug format (lowercase alphanumeric and hyphens).Without flags the vault is “built-in”: credentials are stored locally and managed through Agent Vault. With --credential-store=infisical, Agent Vault probes Infisical with the supplied config, encrypts the snapshot, and commits the vault, credentials, and your admin grant atomically. If the probe fails nothing is persisted. See Credential stores.External-store vault creation requires instance-owner role. Non-owners receive 403 Owner role required to create external-store vaults because the broker’s configured machine identity, not the caller’s, authorizes the upstream fetch.
List vaults the current user has access to.
Delete a vault and all its credentials, services, and proposals. Requires vault admin or instance owner role. The default vault cannot be deleted.
Rename a vault. Requires vault admin or instance owner role. The default vault cannot be renamed.
Set the active vault for subsequent commands. When set, commands that accept --vault will default to this vault instead of default.
Show the active vault.
Print the vault’s credential-store kind, full config, poll interval, and last sync health. Prints Credential store: builtin for vaults with no external source; otherwise the kind name plus the Infisical project, environment, path, poll cadence, and last_sync_status / last_synced_at / last_sync_error. This command is read-only; use credential-store set to change the kind.
Switch the credential store backing an existing vault. Switching to builtin requires vault admin or instance owner role; switching to infisical requires instance-owner role (the broker’s machine identity authorizes the upstream fetch). Prompts for the vault name to confirm unless --yes is passed.Switching to infisical probes the source (same validation as create), then overwrites the vault’s built-in credentials with the fetched snapshot and starts polling. Switching to builtin disconnects the external source (polling stops) but keeps the last synced secrets in place as editable built-in credentials. See Credential stores.
Force an immediate refresh of an external-store vault and print the post-refresh credential-store summary. Available to any vault member. Returns an error if the vault is built-in (no external source), if Infisical is not configured on the server, or if another refresh is already in flight (409). The periodic syncer keeps the vault fresh on its own; use this when a secret has just been rotated upstream and you don’t want to wait for the next tick.
Bind the current directory to a vault by writing an agent-vault.json file. This file is meant to be committed to version control so the whole team shares the vault binding.Vault resolution priority: --vault flag > AGENT_VAULT_VAULT env var > agent-vault.json > user context > "default".Uses an interactive picker if multiple vaults are available. Use --vault to skip the picker.
Show available services and credentials for the current vault. Requires a vault-scoped session token or long-lived agent token (via agent-vault run or AGENT_VAULT_TOKEN + AGENT_VAULT_ADDR env vars). In agent mode (AGENT_VAULT_TOKEN set), AGENT_VAULT_VAULT (or --vault) is required — there is no project-file or interactive-picker fallback.
Wrap a process with Agent Vault environment variables. agent-vault run is the shorthand; agent-vault vault run is the long form. Both are identical in behavior and flags.The child process receives AGENT_VAULT_ADDR, AGENT_VAULT_TOKEN, and AGENT_VAULT_VAULT, plus HTTPS_PROXY / HTTP_PROXY / NO_PROXY / NODE_USE_ENV_PROXY / OPENCLAW_PROXY_URL and CA-trust variables (SSL_CERT_FILE, NODE_EXTRA_CA_CERTS, REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE, GIT_SSL_CAINFO, DENO_CERT) pointing at ~/.agent-vault/mitm-ca.pem, so standard HTTP and HTTPS clients transparently route through the broker. OPENCLAW_PROXY_URL feeds OpenClaw’s Proxyline managed proxy (OpenClaw requires this plus proxy.enabled: true in its config). HTTPS_PROXY and HTTP_PROXY both point at the same plain HTTP proxy URL — the listener handles CONNECT for https:// upstreams and absolute-form forward-proxy requests for http:// upstreams on the same port. If the server’s MITM proxy is unreachable, vault run aborts.Agent mode (containerized / unattended deployments). When AGENT_VAULT_TOKEN and AGENT_VAULT_ADDR are pre-set on the environment, vault run skips the admin-session login and uses the env-supplied token as the credential — --ttl is rejected in this mode since the token’s lifetime is fixed at mint time. The token is validated against the broker once at startup so bad/expired tokens fail fast with a clear error rather than producing 401s on every proxied call. See Deploy your agent in a container.
Mint a vault-scoped session token and print it to stdout. Useful when you need a scoped token without wrapping a child process via agent-vault run. Tokens are minted with vault role proxy.

Vault users

Add an existing instance user to a vault (direct grant, no invite needed).
List members of a vault. Includes pending invite pre-assignments with “pending” status.
Remove a user from a vault.
Change a user’s vault-level role.

Users

List all users in the instance. Owners see vault memberships; members see email, role, and creation date.
Invite a user to the Agent Vault instance. Sends an HTML email with an acceptance link if SMTP is configured; always returns the invite_link in the response. Any authenticated user can create invites. Invites optionally pre-assign vault access.
List user invites. Owners see all invites; others see invites they created or with pre-assignments to vaults they admin.
Revoke a pending user invite by the last 8 or more characters of the token.

Services

Print the current vault services as YAML.
Set the vault services. Without -f, launches an interactive builder that prompts for services, auth configs, and credentials (requires TTY). With -f, replaces the services from a YAML file.
Add or update a single service (upsert by name). Use -f to upsert services from a YAML file non-destructively (unlike set -f, which replaces all).The passthrough auth type accepts no credential flags; Agent Vault allowlists the host but does not store or inject a credential. See Header forwarding for the rules that apply across every auth type — passthrough simply has no auth slot to override.New services are enabled by default. Pass --disabled to create the service in a disabled state, or use agent-vault vault service disable <name-or-host> after creation.To layer two credentials on the same host, give them different inline paths in --host (e.g. Slack with slack.com/api/* for the Bot token and slack.com/api/apps.connections.* for Socket Mode). The matcher resolves overlapping rules deterministically — see Matching priority.URL substitutions are file-only — there are no flags. Configure them under the substitutions: block of a service entry in a YAML file passed via -f.
Enable a service so proxy traffic resumes. The argument is matched against service names first, then host. When more than one service shares the host, the server returns 409 with the candidate names — retry with the specific name. Idempotent.
Disable a service while preserving its configuration. Agents proxying to it receive 403 with error code service_disabled until re-enabled. The argument is matched against service names first, then host (with the same 409-on-ambiguity behavior as enable). Idempotent.
Remove a specific service. The argument is matched against service names first, then host (409 on ambiguity). Prompts for confirmation unless --yes is passed.
Remove all vault services. Prompts for confirmation unless --yes is passed.

Credentials

List credential keys in a vault. Alias: agent-vault vault creds list. In agent mode (AGENT_VAULT_TOKEN set), AGENT_VAULT_VAULT (or --vault) is required — there is no project-file or interactive-picker fallback.
Print the decrypted value of a single credential to stdout. Pipe-friendly. Requires member+ role. Alias: agent-vault vault creds get. In agent mode (AGENT_VAULT_TOKEN set), AGENT_VAULT_VAULT (or --vault) is required — there is no project-file or interactive-picker fallback.
Store one or more credentials using KEY=VALUE format. Alias: agent-vault vault creds set. In agent mode (AGENT_VAULT_TOKEN set), AGENT_VAULT_VAULT (or --vault) is required — there is no project-file or interactive-picker fallback.
Delete one or more credentials. Alias: agent-vault vault creds delete. In agent mode (AGENT_VAULT_TOKEN set), AGENT_VAULT_VAULT (or --vault) is required — there is no project-file or interactive-picker fallback.

Proposals

List proposals for a vault.
Show details of a proposal.
Create a proposal to request services or credentials. Supports two modes: flag-driven (for simple single-service proposals) and JSON file (for complex or multi-service proposals). In agent mode (AGENT_VAULT_TOKEN set), AGENT_VAULT_VAULT (or --vault) is required — there is no project-file or interactive-picker fallback.
URL substitutions are JSON-only — there are no flags. Add a substitutions array under the relevant services[] entry in the file passed via -f.OAuth credentials are JSON-only. Set type: "oauth" on the credential slot and include an oauth config object:
See OAuth credentials for field details.
Approve and apply a proposal. Requires an active login session. Pass credential values as KEY=VALUE arguments or the command will prompt for any missing credentials.
Reject a pending proposal. Requires an active login session.
Interactively walk through all pending proposals. For each proposal you can approve, reject, skip, or quit. Requires an active login session.

Agents (instance-level)

Create a new instance-level agent and print its token (copies to clipboard). Supply the token to the agent’s runtime via AGENT_VAULT_TOKEN.
List all agents across the instance.
Show agent details including vaults, status, and active session count.
Revoke an agent and invalidate all its tokens. The agent remains visible with a “revoked” status but can no longer authenticate. Rotate its token to reactivate it.
Permanently delete an agent, its tokens, and all vault grants. Works on both active and revoked agents.
Invalidate the agent’s existing token and print a new one. If the agent is revoked, rotation also reactivates it. Update AGENT_VAULT_TOKEN wherever the agent runs.
Rename an agent. Keeps the same vault access.
Change an agent’s instance-level role. The last owner (across both users and agents) cannot be demoted.

Agents (vault-level)

List agents in a specific vault.
Add an existing instance agent to a vault.
Remove an agent from a vault.
Change an agent’s vault role.

Owner — users

List all users on the instance. Owner only.
View user info and vault memberships. If no email is provided, shows your own info. Owner can view any user; members can only view themselves.
Remove a user from the instance. Owner only.
Change a user’s instance-level role. The last owner cannot be demoted. Owner only.

Owner — vaults

List all vaults on the instance. Owner only.
Join a vault as admin. Useful for recovering orphaned vaults. Owner only. Returns 409 if already a member.
Delete a vault. Owner only.

Owner — config

Show current instance settings including invite_only and allowed_email_domains. Owner only.
Update instance settings. Owner only.

Master password

Manage the master password that wraps the data encryption key (DEK). All commands require the server to be stopped. When DATABASE_URL is set, these commands require --force because multiple instances may share the database - stop all instances first. Password changes only re-wrap the encryption key (one database row). No credentials are re-encrypted and no data is lost. If an instance restarts before the secret store is updated, it will fail to start with “wrong password” — update the secret and restart to resolve.
Set a master password on a passwordless instance. Wraps the existing DEK under a new KEK derived from the password. No credentials are re-encrypted.
Change the master password. Re-wraps the DEK under a new KEK. No credentials are re-encrypted.
Remove the master password, switching to passwordless mode. The DEK is stored in plaintext — security depends on filesystem access controls.

Utilities

Browse built-in service templates. No authentication required.
Send a test email to verify SMTP configuration. Owner only.
Permanently delete all data and reset the instance to a fresh state. Requires a running server for role verification. Auto-stops the server before wiping data. Owner only.
Print the version and build information.

Installer

The install.sh script (curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fsSL https://get.agent-vault.dev | sh) is not part of the agent-vault binary but reads one environment variable: