# Chatito Agent recipes (Phase 3)

**Host:** https://chatito.ai/recipes.md  
**API:** https://chatito.ai/agent-api.md  
**Updated:** 2026-08-06  
**Humans:** https://chatito.com/docs/ai-agents · https://app.chatito.com/help/#agents

Short end-to-end recipes for AI agents. Paper first. **Never arms live capital.**

## 0. Claim-code bootstrap (no key yet)

1. `GET /public/catalog` — explain Free vs AI Lab (do not invent prices)  
2. Free key: `POST /public/bootstrap` body `{"name":"my-agent","scopes":["read","paper_trade"],"client_hint":"hermes"}`  
3. Give the human `claim_url` (or code `CHT-…`)  
4. Poll `GET /public/bootstrap/{code}` until `status=claimed`  
5. When `secret` appears **once**, store as `CHATITO_AGENT_KEY` (never log it)  
6. **Starter paper:** mint may auto-create a running Predictions book (default Late Edge) when the owner has no running paper. Check mint payload `starter_books` or `GET /me` → `starter_books`, then `GET /strategies` before creating duplicates.  
7. Continue with recipe 1  

### 0b. Lab pay + mint (wallet)

1. `POST /public/bootstrap` `{"intent":"lab_month","chain":"base","name":"crew","scopes":["read","paper_trade","lab"]}`  
2. `POST /public/bootstrap/{code}/siwe/prepare` with wallet address → human/agent signs SIWE  
3. `POST .../siwe/verify` → invoice (receive_address + expected_native)  
4. Send payment from linked wallet; `POST .../confirm` with `tx_hash`  
5. Poll for secret once; plan is AI Lab  

**Human shortcut (newcomers):**  
- Open **https://app.chatito.com/checkout** (from catalog `billing.human_checkout`)  
- Optional deep link: `?chain=polygon&sku=lab_month&pay=1` (add `promo=CODE` for invite codes)  
- Standalone page (no full dashboard). Sign in → Connect Wallet → Pay  
- Logged-in renew also works from Settings → Account → Get / Renew AI Lab

### 0c. Link email for dashboard login

Humans often need magic-link email login (ops wallet not in MetaMask).

1. At bootstrap: include `"email":"owner@domain.com"` in `POST /public/bootstrap`  
2. Or after key mint with scope `account:manage`: `POST /account/email` `{"email":"owner@domain.com"}`  
3. Tell the human: open https://app.chatito.com → Sign in with email → same address  
4. `GET /account/login-methods` to confirm email is linked (masked)

## 1. Heat → paper → equity (Phase 2)

### Predictions (default)

1. `GET /markets/heat?venue=cex` — discovery  
2. `GET /templates` — pick a Predictions kind  
3. `POST /strategies` with `paper_trade` + optional `Idempotency-Key`  
4. `GET /strategies/{id}/stats` and `/equity`  
5. `POST /strategies/{id}/pause` or `/kill` when done  

### CEX paper from heat (list + create + operate)

1. `GET /markets/heat?venue=cex` — pick a hot symbol  
2. `GET /templates?venue=cex` — kinds `dca_in` · `dca_out` · `limit`  
3. `GET /strategies?venue=cex` — list owned CEX books  
4. `POST /strategies` with body e.g.  
   `{"venue":"cex","kind":"dca_in","name":"Agent BTC DCA","symbol":"BTCUSDT","quote_amount_usd":20,"interval":"1h","activate":true}`  
5. Operate same paths as Predictions (id from create/list):  
   - `GET /strategies/{id}` · `GET /strategies/{id}/stats` · `GET /strategies/{id}/equity?period=day`  
   - `POST /strategies/{id}/pause` · `POST /strategies/{id}/paper/enable` · `POST /strategies/{id}/kill` (soft)  
6. Re-list with `GET /strategies?venue=cex`  

Requires `paper_trade` for create/pause/enable/kill. Never arms live. Platform + crypto must share `CHATITO_INTERNAL_SERVICE_KEY`.

Python: `sdk/python/examples/heat_to_paper_equity.py`  
SDK: `chatito-agent` / `@chatito/agent`

## 2. Lab evaluation (Phase 3 slice 1)

1. `GET /lab/gates` — sample / promote / kill thresholds  
2. `GET /strategies/{id}/stats` — `sample_tier`, `evaluation.promote_passes`, `kill_candidate`  
3. Use evaluation before inventing new A/B children  

## 3. Public board + market context (Phase 3 slice 2)

1. `GET /markets/context` — assets, windows, template defaults  
2. `GET /boards/strategies?book=paper&sort=score` — sanitized arena  
3. Optional: `POST /strategies/{id}/fork` if share policy allows (paper only)

## 4. Invent paper strategy (Phase 3 slice 3)

**Scope:** `lab` (mintable with invent). **Credits:** invent cost (see `GET /lab/credits`).

```http
POST /api/agent/v1/lab/invent
Authorization: Bearer chk_…
Content-Type: application/json

{
  "prompt": "Late edge on BTC and ETH 5m, conservative size, paper only",
  "accept": true,
  "activate": true
}
```

Safe invent kinds: `crypto_endgame` · `crypto_monte_carlo` · `crypto_dual_tilt` · `crypto_hybrid_ab`  
(not HFT pair / invented DSL for community invent)

## 5. One-axis A/B (Phase 3 slice 3)

**Scope:** `lab`. No invent credit spend (capacity still applies).

```http
POST /api/agent/v1/lab/ab
Authorization: Bearer chk_…
Content-Type: application/json

{
  "parent_id": "lab_…",
  "axis": "min_edge",
  "value": 0.04,
  "activate": true
}
```

Axes: see `GET /lab/gates` → `ab_axes` (e.g. `min_edge`, `trade_usd`, `min_ask`).

## 6. Offline score before spawn

```http
POST /api/agent/v1/lab/score
{ "kind": "crypto_endgame", "params": { "assets": ["btc", "eth"], "min_edge": 0.03 } }
```

Heuristic only. Not a profit guarantee.

## 7. MCP tool map

| Recipe step | MCP tool |
|-------------|----------|
| Account | `get_me` |
| Heat | `get_heat` |
| Board | `get_strategy_board` |
| Context | `get_market_context` |
| Gates / credits | `get_lab_gates` · `get_lab_credits` |
| Stats | `get_stats` |
| Invent | `invent_strategy` |
| A/B | `ab_spawn` |
| Score | `score_strategy` |
| Fork | `fork_strategy` |
| Paper lifecycle | `create_paper_strategy` · `pause_strategy` · `kill_strategy` |

## Hard rules

1. Agent keys never auto-arm live.  
2. Invent spends AI Lab credits (same catalog as product Lab).  
3. Metric conventions: settled reviews for n/win%; BUY fills for volume.  
4. Not financial advice.
