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

# Building with AI agents

> Give an agent its own key with a budget it can't exceed — and let it read these docs directly.

Agents that move money need two things a human doesn't: a hard budget, and machine-readable docs. Both are built in.

## A key the agent can't overspend

Give each agent its **own API key**:

* **Scopes** limit *what* it can do — `payouts:write` and `recipients:read` for a supplier-paying agent; nothing else.
* **Spend caps** limit *how much* — per transaction, per day, per month, in USD across all currencies. A payout that would exceed a cap is rejected before any money moves, whatever the agent's reasoning was.
* **IP allowlists** limit *from where*.
* **`externalReference`** makes every money-moving call idempotent, so an agent that retries after a timeout can't double-pay.

The blast radius is then a number you chose in the dashboard, not a property of the agent's behaviour. Revoke the key to stop it instantly.

## Machine-readable everything

* Every page of these docs is available as Markdown: append `.md` to any URL, or fetch `/llms.txt` (index) and `/llms-full.txt` (everything).
* The docs are also an **MCP server** — connect an agent (Claude Code, Cursor, any MCP client) and it can search and read this reference directly. See the *Connect* option in the page menu.
* The API itself is friendly to agents: stable error codes to branch on, `details` with structured context, ids that announce their type, and the capabilities catalog to discover what's possible at runtime instead of guessing.

## A sane loop

1. `GET /v1/capabilities/{country}` — what can I do here?
2. `POST /v1/validate` — is this destination real, and whose is it?
3. `POST /v1/payouts` with an `externalReference` derived from the task id.
4. Wait for `payout.completed` / `payout.failed` — don't poll in a tight loop; rate limits apply to agents too.
5. Log the `x-request-id` of every call. When something looks wrong, that's what support needs.
