> ## 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.

# Give a Coding Agent Its Own Accounts, Inbox and Vault

> Sign up for services with the agent's inbox, read verification codes automatically, and store credentials securely in the vault without relaying them through a human.

When a coding agent needs a package registry, error tracker, or hosting account, the usual approach puts a human in the middle: they sign up manually, forward a verification code in chat, and paste a shared password that ends up in the transcript. With Agent Loadout, the agent registers under its own dedicated address, reads the verification code itself, and stores the login in its vault so it's available in every future session.

## What you need

An agent equipped with an inbox and a token that has the following capabilities:

* **email:read**: to receive and read the verification email
* **vault:write**: to store the new credential
* **vault:use**: to retrieve the credential in later sessions

## Steps

### Get the inbox address

The agent calls `list_inboxes` to retrieve its dedicated email address. It uses this address wherever a human would normally enter their own.

### Sign up on the target service

Before submitting the registration form, call `create_credential` with `kind: "login"`, the inbox address as `username`, `generate: true`, and the service's HTTPS origin in `allowed_origins`. Use the returned `generated_secret` as the form's password. The vault already holds that same password for later sessions. The service then sends a confirmation or verification email to the inbox.

### Read the verification code

`find_verification_code` accepts a `from` substring filter and an optional `wait` value (up to 25 seconds). Set `since` to when you submitted the form so an older code cannot match. A successful match returns `found: true` with the `code` or `link` extracted directly from the mail, along with a `screening` object. The sender filter is not a verified-domain check.

### Check the screening verdict before acting

Before using the code or following any link, require `found: true` and inspect `screening.verdict`. If the verdict is anything other than `"clean"`, stop for human review. Check the sender and link destination against the service you are registering with. Screening helps flag suspicious content but does not guarantee that a message is safe.

### Keep the stored account current

If you registered with an existing password instead, save that value as `secret`. Do not generate a different password after registration unless you also change it on the service. Authorized vault calls return secrets to the client; keep those values out of chat transcripts and logs.

### Reuse the credential later

In any future session, the agent calls `get_credential` with `vault:use` to retrieve the stored value. Every read is recorded for the organization. To rotate the password, call `update_credential`.

## Chat prompt example

Use this prompt in Claude Code, Codex, or any chat client with Agent Loadout connected:

```text Chat prompt theme={null}
Register an account on the error tracker with your own Agent Loadout address,
read the verification code from your inbox, and store the login in your vault
with a generated password. Do not show me the password.
```

## TypeScript example

```typescript coding-agent.ts theme={null}
import { AgentLoadout } from "@agent-loadout/sdk";

const agent = new AgentLoadout({ apiKey: process.env.AGENT_LOADOUT_TOKEN! });
const [inbox] = await agent.inboxes.list();

// 1. Generate and store the password before registering on the service.
const response = await fetch("https://agent-loadout.com/api/v1/vault", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.AGENT_LOADOUT_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({ name: "Error tracker", kind: "login", username: inbox.address, generate: true, allowed_origins: ["https://app.tracker.example"] }),
});
if (!response.ok) throw new Error(`Could not save credential: ${response.status}`);
const { generated_secret } = await response.json();
if (!generated_secret) throw new Error("No generated password returned");

// 2. Submit the service's form with inbox.address and generated_secret here.
// Implement this step using your browser automation; do not log the password.
const since = new Date().toISOString(); // Capture immediately before submitting.

// 3. After submitting, wait for the matching verification email.
const { found, code, link, screening } = await agent.events.findVerificationCode(inbox.id, { from: "tracker.example", since, wait: 25 });
if (!found || screening?.verdict !== "clean") throw new Error("No clean verification message, stopping");
// Check the sender and link destination, then enter code or open link on the service.
```

## Required permissions

| Capability | Why it's needed |
| - | - |
| `email:read` | Receive and read the verification email |
| `vault:write` | Create the credential with a generated password |
| `vault:use` | Retrieve the credential in later sessions |

> [!NOTE]
>
> The creation response includes `generated_secret` so the agent can complete the registration form. Later reads require an authorized reveal, such as `get_credential`, and are recorded for your organization. Rotating with `generate: true` also returns the new generated password.


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