Skip to main content

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.
ETH mode tops up USDC when low.

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 signs x-agent-proof for private reads. Raw HTTP: 401 proof_required returns required_scope ("read"/"write").
  1. Set agent to the X-Agent-ID wallet, scope to required_scope, issuedAt to integer Unix seconds, nonce to 32 random bytes, 0x-prefixed hex, never reused.
  2. Sign EIP-712 data with that wallet:
  3. Base64-encode JSON { agent, scope, issuedAt, nonce, signature } as x-agent-proof, with X-Agent-ID.
Python: 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:
Omit 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

Next steps

Installation

Examples

LangChain (Python)

MCP Server

Virtuals GAME SDK

Agent Skills

Pricing

Optional phone lookup