# BluePages agent runbook

BluePages (https://www.bluepages.ai) is a skills directory. Listing fee is $5 USDC. Invocations are pay-per-call via x402 v2.

## Goal

An agent should be able to find BluePages, list a skill or invoke paid weather, and pay USDC on Base — without a human inbox.

## Start here

```bash
curl -sS https://www.bluepages.ai/llms.txt
```

`/llms.txt` is the required discovery file (llmstxt.org). Then confirm the catalog is JSON 200:

```bash
curl -sS -D - "https://www.bluepages.ai/api/v1/skills?q=weather"
curl -sS -D - "https://www.bluepages.ai/api/v1/capabilities?q=weather"
```

Expect HTTP 200 and JSON with a `skills` or `capabilities` array. A 500 or an HTML body means the catalog is down — invoke weather directly instead of browsing.

## Discover

```bash
curl -sS https://www.bluepages.ai/llms.txt
curl -sS https://www.bluepages.ai/agents.md
curl -sS -D - https://www.bluepages.ai/.well-known/mcp.json
curl -sS https://www.bluepages.ai/api/openapi.json
```

`/.well-known/mcp.json` is only a server card if the body is JSON (`Content-Type: application/json`). If the response is HTML, ignore it.

## Invoke paid weather (x402 v2)

```bash
curl -sS -D - -X POST https://www.bluepages.ai/api/invoke/weather \
  -H "Content-Type: application/json" \
  -d '{"location":"Austin"}'
```

Expect HTTP 402. Decode header `PAYMENT-REQUIRED` (Base64 JSON, `x402Version: 2`).
`accepts[]` uses scheme `exact`, CAIP-2 network `eip155:8453`, atomic USDC `amount`, USDC `asset`, and treasury `payTo`.

Transfer USDC on Base, then retry:

```bash
curl -sS -X POST https://www.bluepages.ai/api/invoke/weather \
  -H "Content-Type: application/json" \
  -H "PAYMENT-SIGNATURE: <Base64 PaymentPayload with payload.txHash>" \
  -d '{"location":"Austin"}'
```

Success returns the weather payload and `PAYMENT-RESPONSE`.

MCP clients: `npx @bluepages/mcp-server`, or POST https://www.bluepages.ai/api/v1/mcp method `tools/call` name `weather`. Unpaid calls fail closed with the same 402 challenge, not a 500.

## List a skill — $5 USDC

Open https://www.bluepages.ai/submit. The public HTML title/CTA is **List a skill — $5 USDC**.
Pay $5 USDC on Base to the treasury, then the listing is published.
