v0.1 — Phase 1

Prerequisites

  • A ClawdGo operator account — sign up here
  • Your operator API key from the dashboard
  • USDC funded into your operator wallet (testnet USDC available on devnet)
Devnet first. All examples below use https://api.clawdgo.com/v1. During private beta, requests are routed to Solana Devnet. Switch to https://api.clawdgo.com/v1 with a mainnet key when you're ready for production.

Step 1 — Get your API key

Set your API key as an environment variable. Never hardcode it in source.

bash
export CLAWDGO_API_KEY="cg_live_..."

Step 2 — Provision an agent account

Each AI agent gets its own account — a Program Derived Address (PDA) on Solana with an associated USDC token account. Provisioning is one API call.

bash
curl -X POST https://api.clawdgo.com/v1/accounts \
  -H "Authorization: Bearer $CLAWDGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-first-agent"}'

Response:

json
{
  "account_id": "acct_01j8k4x9p2qrst7yz",
  "name": "my-first-agent",
  "solana_address": "9xTz4KqR8mYvPn3SdFgHj6WbCeAuLo1XkQi5NtZpMwV",
  "usdc_token_account": "7mZp2VbQnXeYjLo9KrTzFdCgWqA3ShNkRi4UwPtMxHs",
  "balance_usdc": "0.000000",
  "status": "active",
  "created_at": "2024-01-15T10:32:00Z"
}

Step 3 — Fund the account

Send USDC to the usdc_token_account address returned above. You can do this from:

  • Your operator dashboard (recommended for initial setup)
  • Any Solana wallet that supports SPL tokens
  • The Circle API if you're using Circle's on-ramp
SPL token address, not SOL address. Fund the usdc_token_account address, not the solana_address. Sending SOL to a USDC token account will result in the funds being unrecoverable.

Confirm the balance:

bash
curl https://api.clawdgo.com/v1/accounts/acct_01j8k4x9p2qrst7yz/balance \
  -H "Authorization: Bearer $CLAWDGO_API_KEY"
json
{
  "account_id": "acct_01j8k4x9p2qrst7yz",
  "balance_usdc": "500.000000",
  "last_updated": "2024-01-15T10:38:14Z"
}

Step 4 — Execute a transfer

Send USDC to any Solana address or another ClawdGo account ID. Every transfer requires a unique idempotency_key — use a UUID or a meaningful identifier from your system.

bash
curl -X POST https://api.clawdgo.com/v1/transfers \
  -H "Authorization: Bearer $CLAWDGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "acct_01j8k4x9p2qrst7yz",
    "to": "9xTz4KqR8mYvPn3SdFgHj6WbCeAuLo1XkQi5NtZpMwV",
    "amount": "25.00",
    "memo": "Payment for research task #42",
    "idempotency_key": "task-42-payment-2024-01-15"
  }'

Response:

json
{
  "transfer_id": "txn_02m9n5y3q7wpuv8ab",
  "status": "settled",
  "amount_usdc": "25.000000",
  "tx_signature": "5j4Kz9qXm2nWpRt8vYbFdCgHs3Ae7UoLkNi6ZwQxPmV...",
  "settled_at": "2024-01-15T10:41:02Z",
  "solana_explorer_url": "https://explorer.solana.com/tx/5j4Kz9qX..."
}
Done. The transfer settled on-chain in under 400ms. Verify it on Solana Explorer using the tx_signature in the response.

Step 5 — Set a spending policy

Before connecting the agent, set a spending policy. This is operator-only and prevents the agent from spending beyond defined limits — even if the agent's API key is compromised.

bash
curl -X PUT https://api.clawdgo.com/v1/accounts/acct_01j8k4x9p2qrst7yz/policy \
  -H "Authorization: Bearer $CLAWDGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "max_single_transfer": 100,
    "max_daily_spend": 500,
    "require_memo": true,
    "paused": false
  }'

Next steps