> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent-loadout.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Vault: Encrypted Credential Storage for Your Agents

> Store logins, API keys, and TOTP secrets in the agent vault. Control access with scopes and per-credential permissions, and audit every read.

The vault is where an agent keeps the secrets it accumulates over time: the login it created when signing up for a service, the API key it uses to update a CRM, the TOTP secret for a portal that requires two-factor authentication. Lists return metadata only. Authorized reveal calls return values to the client, and generated passwords are returned when created or rotated. Your client must keep those values out of chat transcripts and logs. Every reveal is recorded.

## Credential types and authenticator secrets

The credential kinds are `login` and `api_key`. Either kind can also hold a TOTP authenticator secret in its `totp` field.

> [card] Login
>
> A username and password pair. The agent can generate a strong password at creation time; the generated value is returned once from the create call and stored encrypted. Use `get_credential` to retrieve it later.

> [card] API Key
>
> A single secret string, such as a service token or bearer credential. Stored and retrieved the same way as a login, but without a username field.

> [card] TOTP Secret
>
> An authenticator seed attached to a login or API key. The `get_totp_code` tool returns the current code and its remaining lifetime without exposing the seed. Code length and timing follow the stored authenticator settings.

## Access scopes

Vault access is gated by three distinct scopes. Issue only what the client actually needs.

| Scope | What it allows |
| - | - |
| `vault:metadata` | List credentials with names and types, but no values |
| `vault:use` | Read the value of credentials explicitly marked agent-readable, and retrieve TOTP codes |
| `vault:write` | Create new credentials and update existing ones owned by the agent |

A token with only `vault:metadata` can tell the agent what accounts exist without revealing a password. Add `vault:use` when the agent needs to read a secret to log in. Add `vault:write` when it needs to create credentials or rotate a stored secret. Both use and write include the metadata scope.

## Working with credentials

> [tab] MCP tools
>
> ```
> # List all credentials (vault:metadata)
> list_credentials
>
> # Read a specific credential's value (vault:use)
> get_credential { "credential_id": "cred_abc123" }
>
> # Get the current TOTP code without seeing the secret (vault:use)
> get_totp_code { "credential_id": "cred_xyz789" }
>
> # Store a new login with a generated password (vault:write)
> create_credential {
>   "name": "Error tracker",
>   "kind": "login",
>   "username": "support@loadout.email",
>   "generate": true,
>   "allowed_origins": ["https://app.tracker.example"]
> }
>
> # Rotate an existing password (vault:write)
> update_credential { "credential_id": "cred_abc123", "generate": true }
> ```

> [tab] REST API
>
> ```bash theme={null}
> # List credentials (vault:metadata)
> curl -s https://agent-loadout.com/api/v1/vault \
>   -H "Authorization: Bearer $AGENT_LOADOUT_TOKEN"
>
> # Create a credential with a generated password (vault:write)
> curl -s -X POST https://agent-loadout.com/api/v1/vault \
>   -H "Authorization: Bearer $AGENT_LOADOUT_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "name": "Error tracker",
>     "kind": "login",
>     "username": "support@loadout.email",
>     "generate": true,
>     "allowed_origins": ["https://app.tracker.example"]
>   }'
> ```

> [!TIP]
>
> When registering a new account, pass `"generate": true` to `create_credential`. The response includes `generated_secret` so the agent can complete the sign-up form. Later reads require an authorized reveal, such as `get_credential`, and are recorded.

## Credential ownership

A credential does not have to belong exclusively to the agent whose token is being used. The vault supports three ownership levels:

* **Agent-owned**: belongs to one agent. Other agents need an explicit share to access it. Authorized members can manage it in the dashboard.
* **Shared**: available to selected agents or all agents in the organization. Reading the value still requires `vault:use` and the credential to be marked agent-readable.
* **Organization-held**: belongs to the organization rather than to an agent. Agents need an explicit share to access it.

The Vault page in the dashboard shows all three levels together, with icons indicating each credential's owner and sharing status.

## Audit history

Every time a credential's value is read through `get_credential`, `get_totp_code`, or the REST API, the event is written to the organization's audit history. The record includes which agent made the request, which credential was accessed, and when. Audit history is visible to org members in the dashboard for 30 days on Pro (365 days with the Extended History add-on).

> [!NOTE]
>
> The organization's audit log records access metadata (who, what, when) without credential values.

## Local connector

For accounts that require browser-based login rather than an API key, you can pair a computer from the Vault page and use the local connector. The connector executes approved browser and app profiles on your machine without returning passwords, cookies, or page contents to the cloud.

**1. Pair your computer**

Open the Vault page in the dashboard, click **Pair a device**, and run the pairing command on the computer you want to connect:

```bash theme={null}
bun run connector pair --url https://agent-loadout.com --name "My computer"
```

**2. Start the connector**

Configure your local MCP client to launch the connector on the paired machine using this command and the repository as its working directory. It speaks MCP over standard input and output:

```bash theme={null}
bun run connector serve
```

**3. Configure profiles**

Define trusted website or app profiles in the connector's config. The agent can use these profiles to perform browser-based actions without ever receiving the underlying credentials.

The local connector supports approved browser workflows and CLI profiles. General browser autofill and arbitrary native-app login are not yet supported.

## Next steps

> [card] [Vault API reference](https://docs.agent-loadout.com/api-reference/vault/credentials.md)
>
> See the full MCP tool and REST endpoint reference for creating, reading, and rotating credentials.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.