LangChain tools for OneShot — commercial actions for AI agents
Project description
langchain-oneshot
LangChain tools for OneShot — commercial actions for AI agents.
Provides 26 tools as LangChain BaseTool subclasses with automatic x402 payment handling via USDC on Base.
Installation
pip install langchain-oneshot
Quick Start
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...",
)
# Use all 26 tools with a LangGraph agent
tools = toolkit.get_tools()
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"})
Available Tools
| Tool | Description |
|---|---|
oneshot_email |
Send emails |
oneshot_voice |
Make phone calls |
oneshot_sms |
Send SMS messages |
oneshot_research |
Deep web research |
oneshot_web_search |
Search the web |
oneshot_people_search |
Search for people |
oneshot_enrich_profile |
Enrich a profile |
oneshot_find_email |
Find email address |
oneshot_verify_email |
Verify email |
oneshot_deep_research_person |
Full dossier on a person |
oneshot_social_profiles |
Find all social accounts |
oneshot_article_search |
Find articles about a person |
oneshot_person_newsfeed |
Recent social posts |
oneshot_person_interests |
Analyze interests |
oneshot_person_interactions |
Map followers/following |
oneshot_commerce_search |
Search products |
oneshot_commerce_buy |
Purchase product |
oneshot_build |
Build a website |
oneshot_update_build |
Update a website |
oneshot_inbox_list |
List inbox emails |
oneshot_inbox_get |
Get email by ID |
oneshot_sms_inbox_list |
List SMS inbox |
oneshot_sms_inbox_get |
Get SMS by ID |
oneshot_notifications |
List notifications |
oneshot_mark_notification_read |
Mark read |
oneshot_get_balance |
USDC balance |
Paid tools are priced in USDC via x402. See Pricing for current rates.
How Payments Work
Paid tools use the x402 protocol. When a tool requires payment:
- The client POSTs to the tool endpoint
- The API returns
402 Payment Requiredwith a quote - The client signs a USDC
TransferWithAuthorization(EIP-3009) using your private key - The client re-POSTs with the signed payment header
- The API processes the request and returns the result
All payment signing happens locally — your private key never leaves your machine.
Configuration
toolkit = OneShotToolkit.from_private_key("0x...")
# Custom API URL
toolkit = OneShotToolkit.from_private_key("0x...", base_url="https://custom-api.example.com")
The SDK operates on Base Mainnet with real USDC. Fund your wallet before making paid tool calls.
Requirements
- Python 3.10+
langchain-core >= 0.3.0oneshot-python >= 0.2.0pydantic >= 2.0
Links
- Documentation
- oneshot-python on PyPI — Core HTTP client (dependency)
- TypeScript SDK
- MCP Server
- GitHub
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_oneshot-0.8.2.tar.gz.
File metadata
- Download URL: langchain_oneshot-0.8.2.tar.gz
- Upload date:
- Size: 124.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6580f8a76e9729af77bac1ebf1681eac70b252df671da4c16f917de14491dd5
|
|
| MD5 |
94787021baae07642b8c824f1ca27263
|
|
| BLAKE2b-256 |
190d8a7cf6177488deab559c890e30ea3fdfeb86957f336e8f8d835d78a5169e
|
File details
Details for the file langchain_oneshot-0.8.2-py3-none-any.whl.
File metadata
- Download URL: langchain_oneshot-0.8.2-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26933369241a3f4904c3464ad26543934e88e42cf3114517e182fae326ad53e2
|
|
| MD5 |
65fe2ccd3d2eeab73c49ee283945cb95
|
|
| BLAKE2b-256 |
921d76a8aa413830eee8b6c27c1918d83be81ffa15665718dd81b7f70529593b
|