Overview
langchain-oneshot is a Python package that wraps all 26 OneShot tools as LangChain BaseTool subclasses. It handles x402 payment signing automatically so your LangChain or LangGraph agents can send emails, make phone calls, run research, buy products, and more.
This package ports the same HTTP + x402 payment flow from the TypeScript SDK into Python, using eth-account for EIP-712 signing and httpx for HTTP.
Installation
pip install langchain-oneshot
Requirements
Python 3.10+
A wallet private key (for x402 payment signing)
USDC on Base Mainnet
Dependencies
Package Purpose langchain-coreBaseTool / BaseToolkit interfaces eth-accountEIP-712 typed data signing httpxAsync HTTP client pydanticInput schema validation
Quick Start
With 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..." ,
)
# All 26 tools, 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" )]
})
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 )
Parameter Default Description private_keyrequired Hex-encoded wallet private key base_urlNoneOverride API URL debugFalsePrint debug logs
The SDK operates on Base Mainnet with real USDC. Fund your agent wallet before making paid tool calls.
See
Pricing for current tool costs.
Communication
Tool Class Tool Name Description EmailTooloneshot_emailSend emails VoiceTooloneshot_voiceMake phone calls SmsTooloneshot_smsSend SMS messages
Research & Enrichment
Tool Class Tool Name Description ResearchTooloneshot_researchDeep web research with sources PeopleSearchTooloneshot_people_searchSearch by title, company, location EnrichProfileTooloneshot_enrich_profileEnrich profile from LinkedIn/email FindEmailTooloneshot_find_emailFind email at a company VerifyEmailTooloneshot_verify_emailVerify email deliverability
Person Intelligence
Tool Class Tool Name Description DeepResearchPersonTooloneshot_deep_research_personFull dossier on a person (2-5 min) SocialProfilesTooloneshot_social_profilesFind all social accounts ArticleSearchTooloneshot_article_searchFind articles about a person PersonNewsfeedTooloneshot_person_newsfeedRecent social posts with engagement PersonInterestsTooloneshot_person_interestsAnalyze interests across categories PersonInteractionsTooloneshot_person_interactionsMap followers, following, replies
Browser
Tool Class Tool Name Description BrowserTooloneshot_browserAutonomous browser — navigate, click, extract BrowserCreateProfileTooloneshot_browser_create_profileCreate persistent browser profile BrowserListProfilesTooloneshot_browser_list_profilesList all browser profiles BrowserDeleteProfileTooloneshot_browser_delete_profileDelete a browser profile
Web
Tool Class Tool Name Description WebSearchTooloneshot_web_searchSearch the web, get results instantly
Commerce
Tool Class Tool Name Description CommerceSearchTooloneshot_commerce_searchSearch for products CommerceBuyTooloneshot_commerce_buyPurchase a product
Build
Tool Class Tool Name Description BuildTooloneshot_buildBuild and deploy websites UpdateBuildTooloneshot_update_buildUpdate existing website
Inbox
Tool Class Tool Name Description InboxListTooloneshot_inbox_listList received emails InboxGetTooloneshot_inbox_getGet email by ID SmsInboxListTooloneshot_sms_inbox_listList received SMS SmsInboxGetTooloneshot_sms_inbox_getGet SMS by ID
Account
Tool Class Tool Name Description NotificationsTooloneshot_notificationsList notifications MarkNotificationReadTooloneshot_mark_notification_readMark notification read GetBalanceTooloneshot_get_balanceGet USDC balance
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, FindEmailTool, VerifyEmailTool
client = OneShotClient( private_key = "0x..." )
# Find someone's email
finder = FindEmailTool( client = client)
found = finder.invoke({
"full_name" : "Jane Smith" ,
"company_domain" : "acme.com"
})
# Verify it's deliverable
verifier = VerifyEmailTool( 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
from langchain_oneshot import OneShotClient, BrowserTool, BrowserCreateProfileTool
client = OneShotClient( private_key = "0x..." )
# Create a profile
create = BrowserCreateProfileTool( client = client)
profile = create.invoke({ "name" : "my-scraper" })
# Use it in a browser task with credentials
browser = BrowserTool( client = client)
result = browser.invoke({
"task" : "Go to github.com/notifications and list unread items" ,
"profile_id" : profile[ "id" ],
"secrets" : { "github.com" : "user:ghp_token" },
"allowed_domains" : [ "github.com" ],
})
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] " )]
})
How Payments Work
Paid tools use the x402 protocol . The flow is fully automatic:
Your agent calls a tool (e.g. ResearchTool.invoke(...))
The client POSTs to the OneShot API
The API returns 402 Payment Required with a USDC quote
The client signs a TransferWithAuthorization (EIP-3009) locally using your private key
The client re-POSTs with the signed payment in the x-payment header
The API processes the job and returns the result
Your private key never leaves your machine. All signing happens locally via eth-account.
Links
langchain-oneshot on PyPI LangChain integration package
oneshot-python on PyPI Core Python SDK (dependency of langchain-oneshot)
TypeScript SDK TypeScript SDK docs
MCP Server MCP integration for Claude, Cursor