SDK
Call tools:agent.email(); goals: agent.compute(). SDK: signs payments, polls jobs, retries rate limits. Receipts carry memo and decisionContext. Quickstart.
Base Mainnet, real USDC: fund the wallet before paid calls.
- CDP Wallet (Recommended)
- Private Key
Paying with raw HTTP
402 returns PAYMENT-REQUIRED. Sign the USDC authorization; send base64 JSON in payment-signature, never Authorization. payment-signature wins over legacy x-payment.
Read authentication
The SDK signsx-agent-proof for private reads. Raw HTTP: 401 proof_required returns required_scope ("read"/"write").
-
Set
agentto theX-Agent-IDwallet,scopetorequired_scope,issuedAtto integer Unix seconds,nonceto 32 random bytes,0x-prefixed hex, never reused. -
Sign EIP-712 data with that wallet:
-
Base64-encode JSON
{ agent, scope, issuedAt, nonce, signature }asx-agent-proof, withX-Agent-ID.
eth_account.messages.encode_typed_data.
Proofs last 5 minutes, single-use. Tokens are exempt. 401 invalid_proof: expired, already_used, wrong_scope, invalid; SDKs retry the first two once. 401 proof_required: TypeScript SDKs retry once, correcting the clock from server_time or re-signing replayed reads. Raw callers derive issuedAt from server_time.
Supported tools
Quote-based tools price each call;maxCost rejects higher quotes before signing. Pricing. agent.tool(name, options) calls any tool.
Person profile: name+company, email, phone or LinkedIn/X/GitHub URL.
Login/2FA:
agent.startBrowserProfileSetup() returns a single-use setup_url that expires in 10 minutes; agent.createBrowserProfileSetupLink() renews it. Done sets completed_at; Cancel ends setup without it.
Compute
agent.compute(options) (x402 quote) creates a goal. Free: getComputeGoal, getComputeTasks, getComputeOutputs, getComputeOutput(goalId, key), getComputeBudget, cancelComputeGoal, respondToComputeTask, pauseComputeGoal, resumeComputeGoal. fundComputeGoal(goalId, amount) is an x402 quote. Pause, resume and fund need a recurring goal (schedule). Unspent budget returns as credits when goals end. Python: same methods in snake case; access tokens need oneshot-python ≥ 0.26.0. Compute.
Server-side cost cap (X-Max-Cost-USDC)
Rejects higher quotes before payment: 400 exceeds_caller_budget. TypeScript maxCost, Python max_cost.
Spend budgets
Caps each UTC day and call across every process on one wallet. Contract.alertAt sends budget_warning (plus email if set); at pauseAt, paid calls fail until UTC midnight:
budgets: unchanged. No budget: unlimited. Unconfirmed sync: BudgetSyncError, no paid call. Invalid config: ValidationError. MCP: ONESHOT_BUDGET_*; oneshot_budget_status is read-only.
SDKs and packages
Source