Skip to main content
TypeScript requires Node.js 18+. Fund CDP wallets with USDC on Base. ETH requires a supported wallet configured with currency: 'ETH'; see Pay with ETH.

Install via npm/bun

bash npm install @oneshot-agent/sdk

Install via pip (Python)

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.
The SDK operates on Base Mainnet with real USDC. Fund your agent wallet before making paid tool calls.

Environment variables

Never commit secrets to version control. Use environment variables or a secrets manager.

Verify installation

Pay with ETH

Set currency: 'ETH' to top up USDC from ETH when the balance runs low:
USDC checks include signed, unsettled payments. If USDC covers the charge, no swap occurs. Otherwise the SDK buys 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 own WalletProvider implementation:

TypeScript configuration

Your tsconfig.json should include:
Source code: github.com/oneshot-agent/sdk

Next steps

Examples

TypeScript code examples for email, research, and more

LangChain

Python LangChain integration