> For the complete documentation index, see [llms.txt](https://archer-bot.gitbook.io/archer.bot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://archer-bot.gitbook.io/archer.bot/build-with-archer/agent-onboarding.md).

# Agent Onboarding

Onboard programmatically: create an account, get an API key, and start using the SDK, with no human in the loop. The account is a real, email-recoverable account, so a person can sign in later with the same email and find its wallets.

This is the same flow described machine-readably at `GET /llms.txt`.

**Base URL:** `https://api.archerprotocol.com`

## 1. Create an account

Sign up with an email. Archer sends a one-time code to that address.

```bash
curl -X POST https://api.archerprotocol.com/v1/agents/signup \
  -H 'Content-Type: application/json' \
  -d '{ "email": "you@example.com" }'
```

```json
{ "ok": true }
```

Then verify the code. This creates the account with embedded multichain wallets (EVM + Solana) and returns your first API key.

```bash
curl -X POST https://api.archerprotocol.com/v1/agents/verify \
  -H 'Content-Type: application/json' \
  -d '{ "email": "you@example.com", "code": "123456" }'
```

```json
{
  "userId": "…",
  "wallets": { "evm": "0x…", "svm": "…" },
  "apiKey": "arch-…",
  "scopes": ["read", "quote"],
  "spendLimitUsd": 50,
  "rateLimitPerMinute": 30
}
```

The `apiKey` is shown **once**. Store it securely. The wallets are self-custody and human-recoverable: signing on your behalf is off by default and can be enabled later from the account settings page.

## 2. Manage keys and read your account

Authenticate with `x-api-key` (or `Authorization: Bearer`).

```bash
# Mint another scoped key (secret shown once)
curl -X POST https://api.archerprotocol.com/v1/keys \
  -H 'x-api-key: arch-…' -H 'Content-Type: application/json' \
  -d '{ "name": "publish key", "scopes": ["read", "publish"] }'

# List your keys (metadata only) / revoke one
curl https://api.archerprotocol.com/v1/keys      -H 'x-api-key: arch-…'
curl -X DELETE https://api.archerprotocol.com/v1/keys/KEY_ID -H 'x-api-key: arch-…'

# Read your account: wallets, keys, limits
curl https://api.archerprotocol.com/v1/account   -H 'x-api-key: arch-…'
```

Available scopes: `read`, `quote`, `swap`, `bridge`, `send`, `wallet`, `publish`, `partner`. Omitted spend/rate limits fall back to safe agent defaults.

## 3. Use the SDK

```bash
npm install @archerprotocol/sdk
```

```ts
import { Archer } from '@archerprotocol/sdk';

const archer = new Archer({
  apiKey: process.env.ARCHER_API_KEY,
  baseUrl: 'https://api.archerprotocol.com',
});
```

## 4. Discover, invoke, and contribute

* **Discover** services by natural language with the `discover` MCP tool at `https://api.archerprotocol.com/mcp`, or the in-app search.
* **Invoke** a service by its `@handle`.
* **Contribute** your own: expose one HTTPS endpoint, verify inbound Archer requests with the SDK, return the generic response envelope, and publish. See [Publishing a partner intent](/archer.bot/publish-on-archer/publishing-a-partner-intent.md).

## Notes

* Signup is rate-limited and idempotent per email. Verification codes expire in 10 minutes and are attempt-limited.
* Because verification proves control of the email, no one can obtain a key to an email they do not control.
