Skip to main content

What is the OneShot SDK?

The OneShot SDK handles the boring parts of agent commerce: signing payments, retrying on 402, polling async jobs, and tracking what your agent spent. You call agent.email(), the SDK handles the rest and gives you a receipt.
The SDK operates on Base Mainnet with real USDC. Fund your agent wallet before making paid tool calls.
  • Automatic x402 Payments: Signs and submits payment authorizations automatically
  • Pay with ETH or USDC: Hold ETH and the SDK auto-swaps to USDC via Uniswap V3 at payment time
  • Flexible Wallets: Coinbase CDP Server Wallets (recommended, no private keys) or raw private key via ethers.js
  • Job Polling: Waits for async jobs to complete
  • Type Safety: Full TypeScript support with proper types

Why Use the SDK?

For Humans

The SDK simplifies integration:
// Without SDK: Handle 402 responses, sign payments, poll jobs manually
// With SDK: One line
await agent.email({ to: "[email protected]", subject: "Hi", body: "Hello" });

For AI Agents

The SDK is essential for autonomous agents:
  • No manual payment flow handling
  • Automatic retry logic for rate limits
  • Clean error messages
  • Minimal token usage in prompts

Quick Example

Key Features

Automatic Payments

SDK handles x402 payment flow automatically - no manual signing needed

Job Polling

Waits for async jobs to complete and returns results directly

Type Safety

Full TypeScript support with proper types for all tools

Flexible Wallets

Coinbase CDP Server Wallets (no private keys) or raw key via ethers.js

Pay with ETH

Auto-swap ETH→USDC via Uniswap V3 — no need to hold USDC

Supported Tools

ToolMethodDescriptionmaxCost
Emailagent.email()Send emails with attachments
Voiceagent.voice()Phone callsYes
SMSagent.sms()Send SMS messagesYes
SMS Inboxagent.smsInboxList()List inbound SMS messages
SMS Messageagent.smsInboxGet(id)Get a specific SMS by ID
Researchagent.research()Deep web research with sources
People Searchagent.peopleSearch()Search for people by criteria
Profile Enrichmentagent.enrichProfile()Enrich from LinkedIn/email
Email Finderagent.findEmail()Find email for a person
Email Verificationagent.verifyEmail()Verify email deliverability
Deep Research Personagent.deepResearchPerson()Full dossier on a person (2-5 min)
Social Profilesagent.socialProfiles()Find all social accounts for a person
Article Searchagent.articleSearch()Find articles about a person
Person Newsfeedagent.personNewsfeed()Recent social posts with engagement
Person Interestsagent.personInterests()Analyze interests across categories
Person Interactionsagent.personInteractions()Map followers, following, replies
Commerce Buyagent.commerceBuy()Purchase productsYes
Commerce Searchagent.commerceSearch()Search for products
Buildagent.build()Build and deploy production websitesYes
Update Buildagent.updateBuild()Update an existing websiteYes
Web Searchagent.webSearch()Search the web, get results instantly
Web Readagent.webRead()Read any URL as markdown + screenshot
Browseragent.browser()Autonomous browser — navigate, click, extractYes
Browser Profileagent.createBrowserProfile()Create persistent browser profile (cookies/sessions)
List Profilesagent.listBrowserProfiles()List all browser profiles
Delete Profileagent.deleteBrowserProfile(id)Delete a browser profile
Email Inboxagent.inboxList()List inbound emails
Email Messageagent.inboxGet(id)Get a specific email by ID
Wallet Balanceagent.getBalance(tokenAddress)Get USDC wallet balance
Notificationsagent.notifications()List agent notifications
Mark Readagent.markNotificationRead(id)Mark notification as read
Universal Toolagent.tool(name, options)Call any OneShot tool
maxCost is a client-side guard on tools with variable pricing. The SDK compares the quoted price to your limit and throws before signing any payment if it exceeds it. Tools without maxCost support have fixed low-cost pricing.

All SDKs and Packages

PackageRegistryLanguageTools
@oneshot-agent/sdknpmTypeScriptFull SDK with CDP wallet support
@oneshot-agent/mcp-servernpmTypeScript28 tools for Claude, Cursor, Claude Code
oneshot-pythonPyPIPythonCore HTTP client with x402 payments
langchain-oneshotPyPIPython26 LangChain BaseTool subclasses
game-plugin-oneshotPyPIPython7 tools for Virtuals GAME agents
Source: github.com/oneshot-agent/sdk

Next Steps

Installation

Install and configure the SDK (TypeScript + Python)

Examples

TypeScript code examples

LangChain (Python)

Python integration with 26 LangChain tools

MCP Server

Use OneShot in Claude Desktop, Cursor, Claude Code

Virtuals GAME SDK

GAME plugin for Virtuals Protocol agents

Pricing

Pay-per-use pricing details