Skip to main content

langchain-oneshot

LangChain tools for OneShot — commercial actions for AI agents.

Provides 35 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 35 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
oneshot_budget_status Today's spend vs the configured budget (read-only)
oneshot_list_domains Sending domains + reputation/rotation state
oneshot_pause_domain Take a domain out of rotation
oneshot_resume_domain Put a paused domain back into rotation

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.

Read tools (inbox, SMS inbox, notifications, balance, browser profiles) additionally send a signed EIP-712 read proof (x-agent-proof) so the API can verify you control the X-Agent-ID wallet before returning private data. This is handled by the underlying oneshot-python client — no extra code. Requires oneshot-python >= 0.18.0 (already the dependency floor).

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.

Spend budget

toolkit = OneShotToolkit.from_private_key(
    "0x...",
    budgets={"daily": 50, "per_transaction": 5, "alert_at": 0.8},
    alert_email="you@example.com",
)

Enforced server-side on every paid call (403 budget_exceeded → oneshot.BudgetExceededError). The agent can read its utilization with oneshot_budget_status but cannot change the cap. Requires oneshot-python >= 0.20.0.

Requirements

  • Python 3.10+
  • langchain-core >= 0.3.0
  • oneshot-python >= 0.18.0
  • pydantic >= 2.0

Links

License

MIT

Metadata

Release files for langchain-oneshot 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-oneshot 0.13.0
File Size Uploaded
langchain_oneshot-0.13.0.tar.gz 129.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-oneshot 0.13.0
File Interpreter ABI Platform
langchain_oneshot-0.13.0-py3-none-any.whl Python 3 none any Details

Total release size: 152.5 kB

Release files / langchain_oneshot-0.13.0.tar.gz

Download URL langchain_oneshot-0.13.0.tar.gz
Size 129.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3de130821402717f51dbe5573c28e8a77abb4ce00c8bec500c91fa14ce95b892
BLAKE2b-256 checksum
How to use checksums
7b6f98992e929d10e7787107dafc341b81c887ff632dac24bc5a8138441eb3f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.19

Release files / langchain_oneshot-0.13.0-py3-none-any.whl

Download URL langchain_oneshot-0.13.0-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e44f60041b034367e44a6aa469494562fa25b298cfc95af2e51c3d8e0c9fa9e8
BLAKE2b-256 checksum
How to use checksums
8697855faf19c4d8f08bb9bad5f1b7020ea45330ff4150c831c09c7983a2bd0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.19

Release history Release notifications | RSS feed

0.16.0

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.0

2 release files

This release

0.13.0 This release

2 release files

0.12.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page