What is the OneShot SDK?
The OneShot SDK is the commercial action layer for AI agents. It provides a unified interface for autonomous agents to execute commercial transactions (email, payments, research, and more) with native x402 billing — all in one API call.- Automatic x402 Payments: Signs and submits payment authorizations automatically
- Wallet Management: Uses ethers.js for secure key handling
- 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:For AI Agents
The SDK is essential for autonomous agents:- No manual payment flow handling
- Automatic retry logic
- 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
Wallet Management
Built on ethers.js for secure private key handling
Supported Tools
- Email: Send emails with automatic domain provisioning
- Research: AI-powered deep research with sources
- Universal Tool: Call any OneShot tool with
agent.tool(name, options)