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

# Endpoints

> Reference card for the Agent Kit API surface

All endpoints below live under `/v1/agents/*`. Auth is either `Authorization: ApiKey <key>` (integrator-side) or `X-Agent-Auth` HMAC header (agent-side, built by the SDK).

For full request/response schemas see the [API Reference](/api-reference/introduction) — the Agents group has every endpoint with an interactive playground.

## Lifecycle

| Method   | Path                            | Caller     | What it does                                                                  |
| -------- | ------------------------------- | ---------- | ----------------------------------------------------------------------------- |
| `POST`   | `/agents/prepare`               | Dashboard  | Round 1 — prepare `CREATE_USERS_V3` for passkey signing                       |
| `POST`   | `/agents/confirm-user`          | Dashboard  | Round 2 — forward stamped `CREATE_USERS`, return unsigned `CREATE_POLICIES`   |
| `POST`   | `/agents/confirm-policies`      | Dashboard  | Round 3 — forward stamped `CREATE_POLICIES`, reveal agent secret (once)       |
| `POST`   | `/agents/{id}/prepare-policies` | Dashboard  | Resume — regenerate unsigned `CREATE_POLICIES` for a `pending_policies` agent |
| `DELETE` | `/agents/{id}`                  | Integrator | Abandon a `pending_policies` agent or delete one no longer needed             |

<Note>
  The `prepare` / `confirm-user` / `confirm-policies` / `prepare-policies` endpoints require a passkey ceremony in the browser — only the dashboard runs them today. The full list above is shown for understanding the lifecycle; the operator-callable subset (read, control, funding, runtime) is documented in the [API Reference](/api-reference/introduction) under the **Agents** group.
</Note>

## Read

| Method | Path                          | Caller              | What it does                                  |
| ------ | ----------------------------- | ------------------- | --------------------------------------------- |
| `GET`  | `/agents`                     | Integrator          | List all agents for the integrator            |
| `GET`  | `/agents/{id}`                | Integrator          | Get agent details                             |
| `GET`  | `/agents/{id}/status`         | Integrator or Agent | Agent status + kill-switch flag               |
| `GET`  | `/agents/{id}/wallet`         | Integrator          | Wallet info + Solana explorer URL             |
| `GET`  | `/agents/{id}/wallet-balance` | Integrator or Agent | USDC balance on the agent wallet              |
| `GET`  | `/agents/{id}/budget`         | Integrator or Agent | Current budget state across all 3 layers      |
| `GET`  | `/agents/analytics/summary`   | Integrator          | Aggregated analytics across all agents        |
| `GET`  | `/agents/{id}/analytics`      | Integrator or Agent | Per-agent analytics                           |
| `GET`  | `/agents/{id}/audit`          | Integrator          | Paginated audit history                       |
| `GET`  | `/agents/approvals`           | Integrator          | Pending approval requests for this integrator |

## Control (backend-callable)

| Method | Path                  | What it does          |
| ------ | --------------------- | --------------------- |
| `POST` | `/agents/{id}/pause`  | Reversible pause      |
| `POST` | `/agents/{id}/resume` | Resume a paused agent |

## Control (passkey-stamped, dashboard-driven)

These operations are destructive and require a passkey ceremony today — they run from the dashboard. The API endpoints exist but aren't documented in the API Reference until a passkey-stamp prepare/confirm pair ships.

| Method | Path                  | What it does                          |
| ------ | --------------------- | ------------------------------------- |
| `POST` | `/agents/{id}/budget` | Configure / reconfigure budget layers |
| `POST` | `/agents/{id}/kill`   | Irreversible emergency stop           |
| `POST` | `/agents/{id}/rotate` | Issue new HMAC secret, revoke old     |

## Funding

| Method | Path                        | What it does                                   |
| ------ | --------------------------- | ---------------------------------------------- |
| `POST` | `/agents/{id}/fund/prepare` | Prepare USDC transfer integrator → agent       |
| `POST` | `/agents/{id}/fund/confirm` | Forward passkey-stamped activity and broadcast |

<Note>
  Funding also requires a passkey ceremony — dashboard-driven today.
</Note>

## Agent runtime (HMAC X-Agent-Auth)

| Method | Path                            | What it does                               |
| ------ | ------------------------------- | ------------------------------------------ |
| `POST` | `/agents/wallets`               | Create a wallet as the authenticated agent |
| `POST` | `/agents/{id}/sign-transaction` | Sign a Solana transaction                  |
| `POST` | `/agents/{id}/x402-pay`         | Pay an x402-gated resource with USDC       |
| `POST` | `/agents/events/batch`          | Batch ingest up to 100 events              |
