currency: 'ETH'; see Pay with ETH.
Install via npm/bun
- npm
- bun
bash npm install @oneshot-agent/sdk Install via pip (Python)
- Core SDK
- LangChain
- Virtuals GAME
OneShotClient: HTTP calls and x402 payments.Python signs locally; your private key stays on your machine. For hosted code, use an access token:
OneShotClient.create(access_token=...), OneShotToolkit.from_access_token(...), OneShotPlugin(access_token=...). These are credits-only sessions and need oneshot-python ≥ 0.26.0.Authentication
Either wallet option signs x402 payments. CDP keeps the key out of your config.- Coinbase CDP Wallet (Recommended)
- Raw Private Key
The SDK operates on Base Mainnet with real USDC. Fund your agent wallet before making paid tool calls.
Environment variables
- CDP Wallet (Recommended)
- Raw Private Key
Verify installation
Pay with ETH
Setcurrency: 'ETH' to top up USDC from ETH when the balance runs low:
swapBufferMultiplier × the charge (default 10, range 1–1000). Excess ETH is refunded. If ETH cannot cover the buffer, it swaps only the shortfall; custom wallet providers need getBalance for this.
Run one process per wallet in ETH mode. ETH mode is Base mainnet only and needs a private key or a custom provider with sendTransaction. CDP wallets don’t support ETH mode: cdp with currency: 'ETH' throws a ValidationError before any wallet is created, so fund CDP wallets with USDC.
Advanced configuration
Custom wallet provider
Bring your ownWalletProvider implementation:
TypeScript configuration
Yourtsconfig.json should include:
Package registry links
Source code: github.com/oneshot-agent/sdk
Next steps
Examples
TypeScript code examples for email, research, and more
LangChain
Python LangChain integration