Credential is a sensitive value stored in a vault that Agent Vault attaches to proxied requests. This can be an API key, database credential, password, OAuth token, or any other sensitive material.
Each credential has:
- Key: An
UPPER_SNAKE_CASEname (e.g.STRIPE_KEY,GITHUB_TOKEN) for the credential. This is used to reference the credential in services. - Type: Either
static(default) oroauth. Static credentials are simple encrypted values. OAuth credentials store access and refresh tokens with automatic token refresh. - Value: The credential material, encrypted at rest with AES-256-GCM. Values are only decrypted in memory at proxy time.
Credential values are encrypted at rest and only decrypted in memory when
needed. Vault members and admins can read credential values via
vault credential get or vault credential list --reveal. Agents with the
proxy role cannot read credential values — they are only injected at proxy
time.- Automatically: When an agent needs access to a new service, it can raise a proposal that includes the credential slots it needs. You review the proposal, provide the credential values, and approve. This is the recommended workflow for working with Agent Vault.
- Manually: You can set credentials directly via the CLI before inviting agents. This is useful for pre-configuring a vault with known service credentials.
Vaults backed by an external credential store (e.g., Infisical) are read-only from Agent Vault; manage their credentials upstream instead.
OAuth credentials
OAuth credentials let Agent Vault manage OAuth 2.0 tokens that are automatically refreshed when they expire. The proxy injects the access token as a Bearer header, just like a static credential, but handles the refresh lifecycle transparently. There are two ways to set up an OAuth credential:Connect with provider
You register an OAuth app with the provider (e.g., GitHub, Google), enter the client ID and secret in Agent Vault, and click “Connect.” Agent Vault handles the browser redirect, consent flow, and token exchange using Authorization Code + PKCE. The URL fields suggest popular providers (GitHub, Google, Slack, Microsoft, and others) as you type; picking one prefills the authorization URL, token URL, and token auth method. Any other provider works too: just paste its URLs directly. The scopes field shows provider-specific suggestions when a provider is selected; you can also type custom scopes. After connecting, Agent Vault stores the access token, refresh token, and expiry. When the access token nears expiry (within 5 minutes), the proxy automatically refreshes it before injecting.Paste tokens
If you already have OAuth tokens (e.g., from a CLI tool like Claude Code), you can paste them directly. If you provide a refresh token, Agent Vault validates it immediately by performing a refresh against the provider’s token endpoint. If the refresh fails, the upload is rejected. This mode is useful for:- Tokens obtained from CLI tools with localhost-only OAuth flows
- Tokens from IT/admin that were pre-provisioned
- Migrating tokens from another system
OAuth credentials appear in the credentials list with type
OAuth. The proxy
injects them identically to static credentials — services reference them by key
name and don’t need to know the credential is OAuth-managed.Store a credential
vault credential command (alias: vault creds) uses KEY=VALUE format. Multiple credentials can be set at once (e.g. agent-vault vault credential set A=1 B=2). If STRIPE_KEY already exists, it is overwritten.
Delete a credential
Credentials via proposals
Credentials via proposals
Agents can propose new credentials through proposals
without ever handling the actual values. There are two flows:Agent needs a credential from you: The agent creates a proposal with a
credential slot (key name, description, and optionally an Agent generated a credential: If the agent created an API key or
received a token during a workflow, it can include the Each credential slot has an
obtain URL with
instructions). You receive a browser link, enter the value, and click
“Allow”. The credential is stored encrypted on approval.value field in the
proposal. You review the proposal and confirm the value is correct before it
is stored.action field: set (add or replace) or delete
(remove). Approval atomically applies all credential changes in a single
transaction.OAuth credentials via proposals
OAuth credentials via proposals
Agents can propose OAuth credentials by setting When you approve, no credential value is required for OAuth slots. You
complete the connection by entering client credentials and clicking
Connect (or pasting tokens) on the approval page.
type: "oauth" and
including an oauth config object with the provider’s token URL. The
authorization_url determines the mode: if present, the approval page
shows a “Connect” button; if omitted, it shows token paste fields.Deleting credentials via proposals
Deleting credentials via proposals
Agents can also propose removing credentials they no longer need:Delete-action slots only require the
key field. The credential is removed
when you approve the proposal.
