Overview
langchain-oneshot: OneShot BaseTool subclasses for LangChain/LangGraph. It signs x402 payments locally; your private key stays on your machine.
Installation
pip install langchain-oneshot
Requirements
- Python 3.10+
- A wallet private key (for x402 payment signing)
- USDC on Base Mainnet
Quick start
With a LangGraph agent
from langchain_oneshot import OneShotToolkit
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
toolkit = OneShotToolkit.from_private_key(
private_key="0x...",
)
# Every tool, ready to go
tools = toolkit.get_tools()
# Wire into any LangChain-compatible agent
llm = ChatOpenAI(model="gpt-4o")
agent = create_react_agent(llm, tools)
result = agent.invoke({
"messages": [("user", "Research the latest AI agent frameworks")]
})
Individual tools
from langchain_oneshot import OneShotClient, ResearchTool
client = OneShotClient(private_key="0x...")
research = ResearchTool(client=client)
result = research.invoke({"topic": "AI agent frameworks 2026"})
Configuration
toolkit = OneShotToolkit.from_private_key("0x...")
# Debug logging
toolkit = OneShotToolkit.from_private_key("0x...", debug=True)
# Credits-only session for code that must not hold a wallet key (see Remote MCP):
toolkit = OneShotToolkit.from_access_token("oneshot_...")
# Inside a running event loop use the async factory instead:
toolkit = await OneShotToolkit.afrom_access_token("oneshot_...")
| Parameter | Default | Description |
|---|---|---|
private_key | required | Hex-encoded wallet private key |
base_url | None | Override API URL |
debug | False | Print debug logs |
budgets | None | Spend budget dict, e.g. {"daily": 50, "per_transaction": 5}. See Spend Budgets |
alert_email | None | Email for budget alerts |
Fund your wallet with USDC on Base Mainnet before paid calls.
Available tools
See Pricing for current tool costs.
Messaging
| Tool Class | Tool Name | Description |
|---|---|---|
EmailTool | oneshot_email | Send emails |
VoiceTool | oneshot_voice | Make phone calls |
SmsTool | oneshot_sms | Send SMS messages |
InboxListTool | oneshot_inbox_list | List received emails |
InboxGetTool | oneshot_inbox_get | Get email by ID |
SmsInboxListTool | oneshot_sms_inbox_list | List received SMS |
SmsInboxGetTool | oneshot_sms_inbox_get | Get SMS by ID |
Research and enrichment
| Tool Class | Tool Name | Description |
|---|---|---|
ResearchTool | oneshot_research | Deep web research with sources |
PersonFindTool | oneshot_person_find | Search by title, company, location |
PersonProfileTool | oneshot_person_profile | Enrich profile from name+company/email/phone/URL |
PersonEmailTool | oneshot_person_email | Find email from name+company/phone/URL |
PersonEmailStatusTool | oneshot_person_email_status | Verify email deliverability |
PersonDossierTool | oneshot_person_dossier | A person’s profile, known social accounts, articles, posts and written summary (2-5 min) |
PersonSocialAccountsTool | oneshot_person_social_accounts | Find all social accounts |
PersonArticlesTool | oneshot_person_articles | Find articles about a person |
PersonPostsTool | oneshot_person_posts | Recent social posts with engagement |
PersonInterestsTool | oneshot_person_interests | Analyze interests across categories |
PersonFollowersTool | oneshot_person_followers | Map followers, following, replies |
Web and browser
| Tool Class | Tool Name | Description |
|---|---|---|
BrowserTool | oneshot_browser | Autonomous browser: navigate, click, extract |
BrowserCreateProfileTool | oneshot_browser_create_profile | Create persistent browser profile |
BrowserListProfilesTool | oneshot_browser_list_profiles | List all browser profiles |
BrowserDeleteProfileTool | oneshot_browser_delete_profile | Delete a browser profile |
WebSearchTool | oneshot_web_search | Search the web, get results instantly |
Build
| Tool Class | Tool Name | Description |
|---|---|---|
BuildTool | oneshot_build | Build and deploy websites |
UpdateBuildTool | oneshot_update_build | Update existing website |
Commerce
| Tool Class | Tool Name | Description |
|---|---|---|
ProductFindTool | oneshot_product_find | Search for products |
CommerceBuyTool | oneshot_commerce_buy | Purchase a product |
Account
| Tool Class | Tool Name | Description |
|---|---|---|
NotificationsTool | oneshot_notifications | List notifications |
MarkNotificationReadTool | oneshot_mark_notification_read | Mark notification read |
GetBalanceTool | oneshot_get_balance | Get USDC balance |
BudgetStatusTool | oneshot_budget_status | Today’s spend vs the configured budget (read-only) |
Sending domains
| Tool Class | Tool Name | Description |
|---|---|---|
ListDomainsTool | oneshot_list_domains | List sending domains with reputation + rotation state |
PauseDomainTool | oneshot_pause_domain | Take a domain out of rotation |
ResumeDomainTool | oneshot_resume_domain | Put a paused domain back into rotation |
Examples
Send an email
from langchain_oneshot import OneShotClient, EmailTool
client = OneShotClient(private_key="0x...")
email = EmailTool(client=client)
result = email.invoke({
"to": "[email protected]",
"subject": "Meeting Tomorrow",
"body": "Hi John, let's meet at 3pm instead. Thanks!"
})
Deep research
from langchain_oneshot import OneShotClient, ResearchTool
client = OneShotClient(private_key="0x...")
research = ResearchTool(client=client)
result = research.invoke({
"topic": "State of AI agent frameworks in 2026",
"depth": "deep"
})
Find and verify an email
from langchain_oneshot import OneShotClient, PersonEmailTool, PersonEmailStatusTool
client = OneShotClient(private_key="0x...")
# Find someone's email
finder = PersonEmailTool(client=client)
found = finder.invoke({
"full_name": "Jane Smith",
"company_domain": "acme.com"
})
# Verify it's deliverable
verifier = PersonEmailStatusTool(client=client)
verified = verifier.invoke({"email": "[email protected]"})
Build a website
from langchain_oneshot import OneShotClient, BuildTool
client = OneShotClient(private_key="0x...")
build = BuildTool(client=client)
result = build.invoke({
"product": {
"name": "Acme Analytics",
"description": "Real-time analytics dashboard for modern teams"
},
"type": "saas",
"lead_capture": {"enabled": True}
})
Browser with persistent profile
import json
import time
from langchain_oneshot import OneShotClient, BrowserTool, BrowserCreateProfileTool
client = OneShotClient(private_key="0x...")
# Create a profile. Like every langchain-oneshot tool, invoke() returns the API
# response as a JSON string, so parse it before reading fields.
create = BrowserCreateProfileTool(client=client)
profile = json.loads(create.invoke({"name": "my-scraper"}))
# Complete account login/2FA through the core SDK before invoking BrowserTool.
setup = client.start_browser_profile_setup(profile["id"], "https://github.com/login")
# setup["setup_url"] is the link to the OneShot sign-in page. Give it only to the person
# whose account it is, and never open it yourself. Treat it as a secret: it opens once and
# expires after 10 minutes; client.create_browser_profile_setup_link(profile["id"])
# (oneshot-python 0.41.0+) mints a fresh one. The page is not cached and sends no referrer.
# They sign in, then press Done on the page (Cancel ends the setup without marking it complete).
# live_url is deprecated and removed in the next release.
# Poll until the person pressed Done ("completed_at" set). After Cancel or the 15-minute
# expiry the status is "no_setup" or "expired" and "completed_at" stays None, so stop there.
status = client.get_browser_profile_setup(profile["id"])
while not status.get("completed_at"):
if status.get("status") in ("expired", "no_setup", "stopped"):
raise RuntimeError("Account setup ended before Done was pressed")
time.sleep(5)
status = client.get_browser_profile_setup(profile["id"])
# Reuse the authenticated profile
browser = BrowserTool(client=client)
result = browser.invoke({
"task": "Go to github.com/notifications and list unread items",
"profile_id": profile["id"],
"allowed_domains": ["github.com"],
})
Agent with selected tools
from langchain_oneshot import (
OneShotClient,
EmailTool,
ResearchTool,
InboxListTool,
)
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
client = OneShotClient(private_key="0x...")
# Pick only the tools you need
tools = [
ResearchTool(client=client),
EmailTool(client=client),
InboxListTool(client=client),
]
agent = create_react_agent(ChatOpenAI(model="gpt-4o"), tools)
result = agent.invoke({
"messages": [("user", "Research quantum computing breakthroughs and email a summary to [email protected]")]
})
Links
langchain-oneshot on PyPI
oneshot-python on PyPI
TypeScript SDK
MCP Server
GitHub
Pricing
Optional phone lookup
Pass the booleaninclude_phone=True in tool arguments.