If you’re using Claude Code, Cursor, or another supported agent, see the Quickstart guides instead. Those agents handle the connection protocol automatically.
Prerequisites
- A running Agent Vault server
- A user account with vault access (member or admin)
Get connection credentials
- vault run (simplest)
- Agent invite
For local development, wrap your agent process directly:This sets
AGENT_VAULT_ADDR, AGENT_VAULT_SESSION_TOKEN, and AGENT_VAULT_VAULT in the child process automatically. No invite needed.Environment variables
Your agent needs these values to operate:| Variable | Required | Description |
|---|---|---|
AGENT_VAULT_ADDR | Yes | Base URL of the Agent Vault server (e.g. http://127.0.0.1:14321) |
AGENT_VAULT_SESSION_TOKEN | Yes | Bearer token for authenticating all requests to Agent Vault |
X-Vault header on every vault-scoped request. For vault-scoped sessions (from vault run), the vault is embedded in the session.
Make proxied requests
The core of Agent Vault is the proxy. Your agent makes HTTP requests to Agent Vault, which injects the real credentials and forwards to the target service over HTTPS. Your agent never sees or handles the actual API keys. The proxy URL format is:Authorization header. Agent Vault strips it before forwarding and replaces it with the real credentials from the vault’s services.
Authorization) are forwarded as-is.
Discover available services
Your agent can call/discover to check which hosts have credentials configured before making proxy requests.
Response
serviceslists the hosts your agent can route through the proxy.available_credentialslists credential key names in the vault (values are never exposed).- Requests to hosts not in this list should go direct, not through the proxy.
Handle errors
| Status | Meaning | What to do |
|---|---|---|
| 401 | Invalid or expired token | Re-authenticate. Contact the operator for a token rotation. |
| 403 | Host not allowed | The service isn’t configured in the vault. Create a proposal to request access, or ask the vault admin to add it. The response body includes a proposal_hint. |
| 429 | Too many pending proposals | Wait for existing proposals to be reviewed before creating new ones. |
| 502 | Missing credential or upstream error | A credential may need to be added to the vault. Inform the user. |
Next steps
Agent protocol
Full HTTP reference for sessions, discovery, proxy, and proposals.
Proposals
Request access to new services via the proposal API.
Credentials
Managing secrets in Agent Vault.
Agents overview
Agent lifecycle, vault access, and management.