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.
Safe by default. The SDK runs in test mode by default, using the staging API and Base Sepolia testnet. No real money is involved until you explicitly set testMode: false.
  • 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

ToolMethodDescription
Emailagent.email()Send emails with attachments
Voiceagent.voice()Phone calls
SMSagent.sms()Send SMS messages
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 products
Commerce Searchagent.commerceSearch()Search for products
Buildagent.build()Build and deploy production websites
Update Buildagent.updateBuild()Update an existing website
Web Searchagent.webSearch()Search the web, get results instantly
Web Readagent.webRead()Read any URL as markdown + screenshot
Browseragent.browser()Autonomous browser — navigate, click, extract
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

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