The Commercial Action Layer for AI Agents. Tools, Payments & Compute in OneShot.
The Commercial Action Layer for AI Agents. Tools, Payments & Compute in OneShot.
Autonomous Agent SDK for executing real-world commercial transactions with automatic x402 payments.
npm install @oneshot-agent/sdkUse the MCP server instead for zero-code integration:
npx -y @oneshot-agent/mcp-serverSee the MCP Server documentation for setup instructions.
Install the OneShot Agent Skills into Claude Code, Cursor, Codex, and 70+ other agents so they know how to call the SDK and MCP tools:
# All OneShot skills
npx skills add oneshot-agent/agent-skills
# Or just what you need (e.g. setup + email)
npx skills add oneshot-agent/agent-skills --skill oneshot --skill oneshot-emailSkills available: oneshot (setup/auth), oneshot-email, oneshot-messaging,
oneshot-research, oneshot-enrichment, oneshot-commerce, oneshot-browser,
oneshot-build, oneshot-compute, soul-markets. Source:
oneshot-agent/agent-skills.
…The SDK operates on Base Mainnet with real USDC. Fund your agent wallet with USDC on Base before making paid tool calls.
agent.usdcAddress; // 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
agent.chainId; // 8453Set currency: 'ETH' and the SDK keeps the wallet funded in USDC for you:
eth_call.swapBufferMultiplier × the charge (default 10, range 1–1000), so one swap
covers many calls. If your provider exposes getBalance and the wallet's ETH
cannot cover the buffer, it swaps just the shortfall (a send-only provider
always gets the buffered amount). Set swapBufferMultiplier: 1 for
exact-shortfall swaps.Run one process per wallet in ETH mode: each process keeps its own in-flight
ledger. ETH mode requires a wallet provider with sendTransaction and is Base
mainnet only.
| Method | Description |
|---|---|
| Communication | |
email() |
Send emails with attachments |
voice() |
Make phone calls |
sms() |
Send SMS messages |
inboxList() |
List inbound emails |
inboxGet() |
Get email by ID |
smsInboxList() |
List inbound SMS |
smsInboxGet() |
Get SMS by ID |
notifications() |
List agent notifications |
markNotificationRead() |
Mark notification as read |
| Domain Pool | |
listDomains() |
List your sending domains with warmup/rotation state |
pauseDomain() |
Take a domain out of rotation |
resumeDomain() |
Put a paused domain back into rotation |
| Research & People | |
research() |
Deep web research |
peopleSearch() |
Search people by criteria |
enrichProfile() |
Enrich from LinkedIn/email |
findEmail() |
Find email for a person |
verifyEmail() |
Verify email deliverability |
companySearch() |
Search companies by name, domain, industry, location, size, funding |
enrichCompany() |
Enrich a company from domain, name, LinkedIn URL, or ticker |
localSearch() |
Discover local businesses (restaurants, contractors, practices) by category × location |
localResolve() |
Business name + address → website domain, phone, status, confidence |
govSolicitations() |
Federal Sources Sought / Presolicitation notices by NAICS with the contracting officer's contact |
deepResearchPerson() |
Full dossier on a person |
socialProfiles() |
Find all social accounts |
articleSearch() |
Find articles about a person |
personNewsfeed() |
Recent social posts with engagement |
personInterests() |
Analyze interests across categories |
personInteractions() |
Map followers, following, replies |
| Web & Commerce | |
webSearch() |
Search the web |
webRead() |
Read any URL as markdown + screenshot |
commerceBuy() |
Purchase products |
commerceSearch() |
Search products |
| Browser | |
browser() |
Autonomous browser — navigate, click, extract |
createBrowserProfile() |
Create a persistent browser profile |
startBrowserProfileSetup(id, loginUrl) |
Start interactive account login / 2FA |
getBrowserProfileSetup(id) |
Get setup readiness and private live URL |
finishBrowserProfileSetup(id) |
Save profile and inspect stored cookie metadata |
listBrowserProfiles() |
List saved browser profiles |
deleteBrowserProfile() |
Delete a browser profile |
| Build | |
build() |
Build and deploy production websites |
updateBuild() |
Update an existing website |
| Compute (Agentic Goals) | |
compute() |
Launch autonomous multi-step goal |
getComputeGoal() |
Get goal status and progress |
getComputeTasks() |
List tasks for a goal |
getComputeBudget() |
Check remaining budget for a goal |
respondToComputeTask() |
Provide input to a pending task |
pauseComputeGoal() |
Pause a running goal |
resumeComputeGoal() |
Resume a paused goal |
cancelComputeGoal() |
Cancel a goal |
fundComputeGoal() |
Add funds to a goal's budget |
| Analytics & Balance | |
getBalance() |
Check token balance |
getUnifiedBalance() |
Get balance across all chains |
spendBreakdown() |
Spending breakdown by tool/period |
rocs() |
Return on compute stats |
receiptsList() |
List payment receipts (limit/offset or since/until window) |
tagReceiptValue() |
Tag a receipt with business value (by receipt_id or request_id) |
…Cap what the agent can spend, so a runaway loop can't drain the wallet overnight.
const agent = await OneShot.create({
cdp: true,
budgets: {
daily: 50, // max USDC per UTC day
perTransaction: 5, // max USDC for any single call
alertAt: 0.8, // warn at 80% of daily
pauseAt: 1.0, // stop paying at 100%
},
alerts: { email: '[email protected]' },
});Unlike maxCost (a per-call client-side check), budgets are enforced server-side
against your receipt ledger. The config is synced once before your first paid call,
so the daily figure is a true per-agent total — shared across every process, restart,
and serverless invocation using the same wallet, not a per-instance counter.
At alertAt you get a notification (in-app via agent.notifications(), plus email
if you set one). At pauseAt paid calls are rejected with a BudgetExceededError
until the window resets at the next UTC midnight:
try {
await agent.research({ topic: '...' });
} catch (err) {
if (err instanceof BudgetExceededError) {
console.log(`${err.reason} budget hit — $${err.spent} spent, resumes ${err.resetsAt}`);
}
}Check utilization any time:
const b = await agent.budgets();
// { daily_usdc: 50, spent_today_usdc: '41.20', pct_used: 0.824, resets_at: '...' }Omit budgets entirely to leave whatever is stored server-side untouched — agents
without a budget are unlimited, which is the default.
The sync fails closed: if the budget can't be confirmed with the server (network
error, 5xx, rate limit, rejected config) the paid call throws BudgetSyncError and is
not made — proceeding would silently drop the guardrail you asked for. It retries on
the next paid call. An invalid config (daily: -1, alertAt: 2) throws ValidationError
at construction.
Every request identifies you by your wallet address (X-Agent-ID). Paid tools additionally settle a signed x402 USDC payment.
Read endpoints — inboxList / inboxGet, smsInboxList / smsInboxGet, notifications / markNotificationRead, getUnifiedBalance, and createBrowserProfile / listBrowserProfiles / deleteBrowserProfile — return private, per-agent data. Since a wallet address is public, the SDK proves you actually control it: on each read it signs a short-lived EIP-712 read proof and sends it as the x-agent-proof header. The API verifies the signature locally and rejects any request whose proof doesn't match the X-Agent-ID wallet, so no one can read your inbox/balance by supplying your address.
This is fully automatic — you don't do anything beyond providing your privateKey. Requires SDK ≥ 0.25.0. Older SDKs (or raw HTTP callers) will keep working until the API enables enforcement, after which they must send a valid x-agent-proof; upgrade to stay ahead of it.
Some code can't hold your wallet key — a hosted MCP client such as Grok Bot, a cloud runner, a third-party agent platform. For those, mint an access token from a wallet session and hand it over instead:
// From a wallet session (once):
const { token } = await agent.createAccessToken({ name: 'grok-bot' });
// In the hosted environment:
const hosted = await OneShot.create({ accessToken: token }); // resolves the wallet address
await hosted.webSearch({ query: '…' }); // billed to the agent's creditsAn access-token session identifies the agent with the token (no x-agent-proof), pays
every call from the agent's prepaid credit balance, and never signs x402. When credits
can't cover a call it throws InsufficientCreditsError (required, balance,
shortfall) — top up from the wallet session with agent.topUpCredits(amount) (pays
the same USDC via x402) and retry. Budgets set on the agent still apply, with credit-funded
spend counted; they are read-only from a token session (agent.budgets() works,
passing budgets to the constructor throws). A token cannot mint, list, or revoke
tokens; do that from the wallet session (listAccessTokens(), revokeAccessToken(id)).
accessToken is exclusive with privateKey / cdp / walletProvider and with
currency: 'ETH'. Requires SDK ≥ 0.33.0.
All methods accept these common options:
interface ToolOptions {
maxCost?: number; // Max USDC willing to pay (see supported tools below)
timeout?: number; // Timeout in seconds
signal?: AbortSignal; // Cancel before payment (see Cancellation section)
wait?: boolean; // Wait for async jobs (default: true)
onStatusUpdate?: (status: string, requestId: string) => void;
}maxCost SupportThe maxCost option is a client-side guard — the SDK compares the quoted price against your limit and throws before signing any payment if it exceeds it. This is supported on tools with variable pricing:
| Method | maxCost |
|---|---|
commerceBuy() |
Supported |
voice() |
Supported |
sms() |
Supported |
build() / updateBuild() |
Supported |
browser() |
Supported |
| All other tools | Not applicable (fixed low-cost pricing) |
Signed receipts use Ed25519 over the canonical public receipt fields, the revision counter and a SHA-256 digest of metadata — nothing private. The response also carries the signature, digest, key_id and alg needed to verify; those are not part of the signed bytes, and neither is the caller-supplied value_tag. Unsigned receipts return malformed_receipt. verifyReceipt works offline after fetching the public keys:
…verifyReceipt recomputes the canonical payload with the same canonicalizeReceipt function the API uses to sign — the two can never drift apart because they're literally the same function, imported on both sides. It matches
No open issues yet, or sync has not completed.