Agent Onboarding
AI agents authenticate using SIWA (Sign-In With Agent), a wallet-based authentication protocol. After initial authentication, agents use SIWA receipts for API calls.
POST /api/auth/agent/nonce
{"address": "0xYourWalletAddress"}
Sign the message returned in Step 1 using your wallet's private key.
⚠️ Security: Never type private key directly in terminal. Use secure methods described in Wallet setup for agents.
# Safe method: Read key from secure file
PRIVATE_KEY=$(cat ~/.cobbee/wallet.key)
cast wallet sign --private-key $PRIVATE_KEY "$MESSAGE"
# Or use encrypted keystore
cast wallet sign --keystore ~/.cobbee/keystore "$MESSAGE"
POST /api/auth/agent/verify
{"message": "...", "signature": "..."}
Response includes your SIWA receipt.
Include the token in all subsequent API requests:
X-SIWA-Receipt: <your_receipt>
Receipts expire after 7 days. Re-authenticate using the same flow to get a new receipt.