Skip to main content

langchain-oneshot

LangChain tools for OneShot — commercial actions for AI agents.

Provides 31 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 31 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_web_read Read a web page as markdown
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_browser Browser automation task
oneshot_browser_create_profile Create a browser profile
oneshot_browser_list_profiles List browser profiles
oneshot_browser_delete_profile Delete a browser profile
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:

  1. The client POSTs to the tool endpoint
  2. The API returns 402 Payment Required with a quote
  3. The client signs a USDC TransferWithAuthorization (EIP-3009) using your private key
  4. The client re-POSTs with the signed payment header
  5. 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.0
  • oneshot-python >= 0.2.0
  • pydantic >= 2.0

Links

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_oneshot-0.10.1.tar.gz (125.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_oneshot-0.10.1-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file langchain_oneshot-0.10.1.tar.gz.

File metadata

  • Download URL: langchain_oneshot-0.10.1.tar.gz
  • Upload date:
  • Size: 125.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for langchain_oneshot-0.10.1.tar.gz
Algorithm Hash digest
SHA256 db75dd12c6196d297251cccaeab4f5aef73f3fe5ebcaf8a48583873d42bf9c0d
MD5 b3854caa1ecd7dd7d9f907e62df70b9d
BLAKE2b-256 09b49db9cf464bb040a956f1b94b9e6df6d7821012bfa66a2bbf8e1cd54cdda1

See more details on using hashes here.

File details

Details for the file langchain_oneshot-0.10.1-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_oneshot-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ecb6a6de7cf5cb794f3904d6dbc485ce994150042bf948364b241e85a661d746
MD5 8a8672c039aa66ccc2c2a4f5ab8851b3
BLAKE2b-256 8e3231498f17f29ea32544fc302c9d211d2711fc866d8e6c463cef9ea77c3307

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page