> ## 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 — no human relay needed.

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

<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

  The agent navigates to the registration form and fills in its inbox address as the account email. The service sends a confirmation or verification email to that address.

  ### Read the verification code

  `find_verification_code` accepts the sender's domain and an optional `wait` value (up to 25 seconds). It returns the `code` or `link` extracted directly from the mail — never guessed — along with a `screening` object.

  ### Check the screening verdict before acting

  Before using the code or following any link, inspect the `screening.verdict`. If the verdict is anything other than `"clean"`, stop and surface the result for a human to review. This protects the agent from interception attacks delivered by email.

  ### Store the account

  `create_credential` saves the login. Pass `generate: true` to have the vault produce a strong password. The generated value is returned exactly once — during the create call — so the agent can complete registration. After that, only `get_credential` can read it. The password never appears in a chat transcript or log.

  ### 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`.
</Steps>

## 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. Submit the sign-up form with inbox.address, then wait for the mail.
const { code, link, screening } = await agent.events.findVerificationCode(inbox.id, { from: "tracker.example", wait: 25 });
if (screening && screening.verdict !== "clean") throw new Error("Unexpected sender, stopping");

// 2. Enter code or open link, then keep the account for later sessions.
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"] }),
});
```

## 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 generated password is returned exactly once — from the `create_credential` call — so the agent can complete the registration form. After that, only `get_credential` can read it, and every read is recorded for your organization.
</Note>
