1. Deploy your agent's payee (at the address known before) ERC-8464
lab_prepare { "n": 8464, "action": "deploy_payee", "params": { "agent_id": "<your agent id>" } }
GET /api/lab/prepare/8464/deploy_payee?agent_id=%3Cyour+agent+id%3E
Sign and send the unsigned transaction it returns with your own testnet key, chain 46630. (skipped when lab_read(8464, "payee") says deployed.)
2. Make the payee your agent's agentWallet ERC-8464
lab_prepare { "n": 8464, "action": "set_agent_wallet", "params": { "agent_id": "<your agent id>", "payee": "<payee from \"Deploy your agent's payee\">" } }
GET /api/lab/prepare/8464/set_agent_wallet?agent_id=%3Cyour+agent+id%3E&payee=%3Cpayee+from+%22Deploy+your+agent%27s+payee%22%3E
Sign and send the unsigned transaction it returns with your own testnet key, chain 46630. (skipped when lab_read(8464, "payee_address") says the payee is the agentWallet.)
3. Claim your agent's lab credit lines (100 test dollars on each) ERC-8460
lab_prepare { "n": 8460, "action": "claim_line", "params": { "agent_id": "<your agent id>" } }
GET /api/lab/prepare/8460/claim_line?agent_id=%3Cyour+agent+id%3E
Sign and send the unsigned transaction it returns with your own testnet key, chain 46630. (skipped when lab_read(8460, "claimed") says claimed.)
4. Borrow 10 test dollars for 14 days ERC-8460
lab_prepare { "n": 8460, "action": "borrow", "params": { "agent_id": "<your agent id>", "amount": "10", "term": "14d", "to": "<your address>", "max_fee": "1" } }
GET /api/lab/prepare/8460/borrow?agent_id=%3Cyour+agent+id%3E&amount=10&term=14d&to=%3Cyour+address%3E&max_fee=1
Sign and send the unsigned transaction it returns with your own testnet key, chain 46630.
5. Have the lab's line creditor follow the loan ERC-8464
lab_prepare { "n": 8464, "action": "track_loan", "params": { "loan_id": "<loan_id from \"Borrow 10 test dollars\">" } }
GET /api/lab/prepare/8464/track_loan?loan_id=%3Cloan_id+from+%22Borrow+10+test+dollars%22%3E
Sign and send the unsigned transaction it returns with your own testnet key, chain 46630.
6. Add the lab's line creditor to the payee ERC-8464
lab_prepare { "n": 8464, "action": "add_creditor", "params": { "payee": "<payee from \"Deploy your agent's payee\">" } }
GET /api/lab/prepare/8464/add_creditor?payee=%3Cpayee+from+%22Deploy+your+agent%27s+payee%22%3E
Sign and send the unsigned transaction it returns with your own testnet key, chain 46630. (skipped when the payee lists the line creditor already.)
7. A customer pays your agent at its payee ERC-8464
lab_prepare { "n": 8464, "action": "pay", "params": { "payee": "<payee from \"Deploy your agent's payee\">", "amount": "15" } }
GET /api/lab/prepare/8464/pay?payee=%3Cpayee+from+%22Deploy+your+agent%27s+payee%22%3E&amount=15
Sign and send the unsigned transaction it returns with your own testnet key, chain 46630.
8. Sweep: the creditors first, then the rest to you ERC-8464
lab_prepare { "n": 8464, "action": "sweep", "params": { "payee": "<payee from \"Deploy your agent's payee\">" } }
GET /api/lab/prepare/8464/sweep?payee=%3Cpayee+from+%22Deploy+your+agent%27s+payee%22%3E
Sign and send the unsigned transaction it returns with your own testnet key, chain 46630.