Agent is any AI-powered process that connects to Agent Vault to proxy requests and raise proposals. Agents are instance-level entities (like users) with an instance-level role (owner or member) and can be granted access to multiple vaults with independent roles per vault.
There are two ways to connect an agent: wrapping a local process or inviting any agent via a prompt.
Wrapping with vault run
The simplest approach for local development. Wraps a local agent process with the environment variables it needs — no invite, no token management.
Inviting an agent
For agents you can’t wrap (cloud-hosted agents, existing sessions, CI pipelines), create an invite. The agent redeems the invite via HTTP and receives an agent token.Instance role
By default, invited agents are created with themember instance role. Use --role to set a different instance-level role:
Vault pre-assignments
Optionally pre-assign vault access at invite time using the--vault flag (repeatable):
vault_name:role where role is proxy, member, or admin (defaults to proxy if omitted).
Agent names must be 3-64 characters, lowercase alphanumeric and hyphens only, and globally unique across the instance.
Adding vaults after creation
You can also grant vault access after the agent has been created:Managing agents
Agents are managed at two levels: instance-level (the agent identity) and vault-level (per-vault access).Instance-level commands
Vault-level commands
Rotating an agent token
Managing invites
The X-Vault header
Instance-level agent tokens are not scoped to a single vault. Instead, agents select a vault per-request using theX-Vault header:
/discover, /proxy/..., /v1/proposals, and /v1/credentials.
Agents created via
agent-vault vault run receive vault-scoped sessions and do not need the X-Vault header — the vault is embedded in the session.Choosing the right approach
| Scenario | Approach | Why |
|---|---|---|
| Local dev with Claude Code or Cursor | agent-vault vault run | Simplest setup, no tokens to manage |
| Cloud-hosted agent (e.g. Devin) | agent-vault agent invite | Paste a prompt, agent connects itself |
| CI/CD pipeline | agent-vault agent invite | Named identity, survives restarts |
| Always-on assistant | agent-vault agent invite | Multi-vault access, session rotation |
What happens after connecting
Regardless of how an agent connects, it follows the same protocol:- Call
/discoverto learn which services are available - Route requests through the proxy at
/proxy/{host}/{path} - Raise proposals when access to a new service is needed