langchain-oneshot
Your LangChain agent can think. This lets it act: send email, make calls,
research, buy, build sites. 54 tools plus the lookup tools, each a LangChain
BaseTool. It pays per action and spends nothing you did not allow.
Install
pip install langchain-oneshot
Start
from langchain_oneshot import OneShotToolkit
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
toolkit = OneShotToolkit.from_private_key("0x...")
agent = create_react_agent(ChatOpenAI(model="gpt-4o"), toolkit.get_tools())
agent.invoke({"messages": [("user", "Research the latest AI agent frameworks")]})
get_tools() returns every tool on one client. One tool alone:
from langchain_oneshot import OneShotClient, ResearchTool
ResearchTool(client=OneShotClient(private_key="0x...")).invoke({"topic": "AI agents"})
Access tokens
For code that must not hold the key: a hosted runner, someone else's platform.
import os
from langchain_oneshot import OneShotToolkit
toolkit = OneShotToolkit.from_access_token(os.environ["ONESHOT_ACCESS_TOKEN"])
# Already inside an event loop:
toolkit = await OneShotToolkit.afrom_access_token(os.environ["ONESHOT_ACCESS_TOKEN"])
- A token spends prepaid credits only. It never signs a payment.
- Short of credits, it raises
InsufficientCreditsError. Top up from a wallet session withOneShotClient.top_up_credits(amount). - A token reads budgets but cannot change them, and cannot manage tokens. Hosted setup.
What it does
| Area | Tools (oneshot_ prefix) |
|---|---|
| Talk | email voice sms inbox_list inbox_get sms_inbox_list sms_inbox_get notifications mark_notification_read |
| Send from your domains | list_domains pause_domain resume_domain |
| Find people | person_find person_profile person_email person_email_status person_dossier person_social_accounts person_articles person_posts person_interests person_followers |
| Think | research solve predict |
| Web and buying | web_search web_read product_find commerce_buy |
| Physical mail | physical_mail_upload physical_mail_preview physical_mail_approve physical_mail_send |
| Connected systems | connections_list, then ledger_* crm_* tax_* shipping_* procurement_* |
| Browser | browser browser_create_profile browser_list_profiles browser_delete_profile |
linkedin_connect linkedin_accounts linkedin_sync linkedin_conversations linkedin_messages linkedin_reply linkedin_message linkedin_invite linkedin_withdraw_invitation linkedin_invitation linkedin_invitations linkedin_view_profile linkedin_react |
|
| Build | build update_build |
| Money | get_balance budget_status |
| Lookup | One tool per entry in the lookup manifest, built for you |
Money
Paid tools pay in USDC on Base mainnet, signed on your machine. A call costs what the quote says, or it does not run. Fund the wallet first. The money rules live in the core client.
Spend budget. Pass budgets={"daily": 50, "per_transaction": 5} to
from_private_key. The server enforces it and raises BudgetExceededError past
the cap. The agent reads it with oneshot_budget_status; it cannot change it.
Tool notes
- Phone lookup is off by default.
include_phone=Trueononeshot_person_find,oneshot_person_profileoroneshot_person_dossieris charged for each person you ask for, found or not; a failed job is refunded. - Physical mail. Look at the proof and the price, then approve the quote
yourself (
oneshot_physical_mail_preview,oneshot_physical_mail_approve). Nothing approves it for you. Persist the idempotency key beforeoneshot_physical_mail_send.
LinkedIn recovery
- No active account, or one that is
connection_deletedorrevoked: the human usesoneshot_linkedin_connectand grants access again. reconnect_required: the owning application reconnects the account. Reconnect and revoke are deliberately not agent tools.- Never open a new connection on its own after an auth failure or a timeout.
Requirements
Python 3.10 or later. pip brings langchain-core, oneshot-python and pydantic.
Links
- Documentation
- oneshot-python: the core client underneath
- TypeScript SDK
- MCP Server
- Pricing
- GitHub
Discover tools
The toolkit exposes oneshot_discover_tools for free public tool search. Optional
query, category and cursor arguments mirror OneShotClient.discover_tools.
With no arguments it lists category counts; searches return public MCP names,
purposes and required inputs, filtered by the caller's grants.
License
MIT
Metadata
Release files for langchain-oneshot 0.23.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| langchain_oneshot-0.23.0.tar.gz | 147.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_oneshot-0.23.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 184.7 kB
Release files / langchain_oneshot-0.23.0.tar.gz
| Download URL | langchain_oneshot-0.23.0.tar.gz |
|---|---|
| Size | 147.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44712835eb4519dc48757e50f21a05b1ba7a1eeca4fe74cc457e6cefc41d789a
|
|
BLAKE2b-256 checksum How to use checksums |
2ea63071354e0f61b84e387654b0e6eab2127d8b019e68e7dabc97b5844ac3ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / langchain_oneshot-0.23.0-py3-none-any.whl
| Download URL | langchain_oneshot-0.23.0-py3-none-any.whl |
|---|---|
| Size | 37.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e36c08bb585922267ddc661cc00ca905a8ef8caeaf52d4b1f618d0bace436ab
|
|
BLAKE2b-256 checksum How to use checksums |
caa1bf36e5c0eb7fce8e7559e42741202f91ca9ac7a07a46a87103eb6309c25c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for langchain-oneshot 0.23.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.