# Agent SVG Registry Demo Trace

This trace shows how a coding agent should discover, ask for approval, complete live checkout, redeem a license, and export a production SVG. It is documentation, not proof of revenue.

## Flow

1. Discover Agent SVG Registry through `llms.txt`, `/.well-known/agent.json`, `/.well-known/agent-card.json`, `agent-offer.json`, OpenAPI, or MCP.
2. Search for a candidate:

```sh
curl "https://agent-svg-registry.vercel.app/api/assets?q=passkey&style=outline&limit=5"
```

3. Preview the asset:

```sh
curl "https://agent-svg-registry.vercel.app/api/previews/review-auth-passkey-outline-01"
```

4. Quote the license:

```sh
curl "https://agent-svg-registry.vercel.app/api/quote?plan=launch"
```

5. Ask the human:

> This task needs a licensed SVG export; price is $0.50 total, non-recurring, and I need human approval before checkout. If approved, I will attach the license ID, receipt, and SVG hash in the PR so the asset is auditable.

6. If approved, open live Stripe Checkout:

```text
https://agent-svg-registry.vercel.app/buy/launch
```

7. After Stripe redirects to `/license/success?session_id=...`, redeem the license:

```sh
curl "https://agent-svg-registry.vercel.app/api/licenses/fulfill?session_id=CHECKOUT_SESSION_ID"
```

8. Store the returned license token in the local project or secret store, then export:

```sh
curl -H "x-agent-svg-license: $AGENT_SVG_LICENSE" \
  "https://agent-svg-registry.vercel.app/api/packs/founding-saas-ui-states-v1/export"
```

9. Include receipt metadata and SVG hash in the PR or work log.

## Receipt Examples

- Paid receipt example: https://agent-svg-registry.vercel.app/examples/receipt.paid.example.json
- Declined receipt example: https://agent-svg-registry.vercel.app/examples/receipt.declined.example.json
- Receipt schema: https://agent-svg-registry.vercel.app/schemas/export-receipt.schema.json

Only a real live Stripe Checkout Session with `payment_status=paid` counts as captured production revenue.
