Turn Agent402's 1,407 x402 pay-per-call tools into LangChain and CrewAI tools for Python agents. Free tier via proof-of-work — no wallet, no API keys.
Project description
agent402-langchain (Python)
Turn Agent402's 1,407 x402 pay-per-call tools into LangChain and CrewAI tools for Python agents.
Pure-CPU tools (hashing, encoding, QR, markdown, JSON, readability…) are free via built-in proof-of-work — no wallet, no API keys. Live-data tools (market data, web search, EDGAR, on-chain) are wallet-only and settle in USDC.
pip install "agent402-langchain[langchain]"
from agent402_langchain import Agent402Toolkit
toolkit = Agent402Toolkit(base_url="https://agent402.tools")
tools = toolkit.get_tools() # four meta-tools your agent can call
It exposes four meta-tools rather than 1,407 individual ones (frameworks and LLMs both choke on thousands of tools):
| Tool | What it does |
|---|---|
agent402_find |
Resolve a plain-language task to the best tool (slug, price, schema, example) |
agent402_route |
Cross-seller x402 router across the whole ecosystem |
agent402_call |
Call a tool by slug — auto-pays via proof-of-work (free) or your x402 fetch (paid) |
agent402_about |
The service manifest (identity, payment options, trust signals) |
Paid (wallet-only) tools
Pass x402_fetch — a callable with the requests-style signature
(method, url, **kwargs) -> requests.Response that signs the USDC payment:
toolkit = Agent402Toolkit(base_url="https://agent402.tools", x402_fetch=my_signed_fetch)
Without it, calling a wallet-only tool raises a clear error naming what's needed; the free proof-of-work tier keeps working regardless.
Without LangChain
agent402_tool_specs() returns the same four entries as framework-agnostic dicts
(name, description, JSON Schema, and a plain execute callable) — no
langchain-core needed.
MIT © Havok Holdings LLC · github.com/MikeyPetrillo/Agent402
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 agent402_langchain-0.1.0.tar.gz.
File metadata
- Download URL: agent402_langchain-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4c119563f5db290fc1afebad464190b3a4bd19ff6fcb4360d7551a79d61d70c
|
|
| MD5 |
5735ac454e972c117f085fccd10ecb28
|
|
| BLAKE2b-256 |
a9e6d1cb08dfb12d0b679e05cd45ee0984af3a7a511e98ba5a403449d307c806
|
Provenance
The following attestation bundles were made for agent402_langchain-0.1.0.tar.gz:
Publisher:
publish-langchain-py.yml on MikeyPetrillo/Agent402
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent402_langchain-0.1.0.tar.gz -
Subject digest:
e4c119563f5db290fc1afebad464190b3a4bd19ff6fcb4360d7551a79d61d70c - Sigstore transparency entry: 2087394503
- Sigstore integration time:
-
Permalink:
MikeyPetrillo/Agent402@213e464231b8ccbeca58d5845be4bf7768eb5841 -
Branch / Tag:
refs/tags/langchain-py-v0.1.0 - Owner: https://github.com/MikeyPetrillo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-langchain-py.yml@213e464231b8ccbeca58d5845be4bf7768eb5841 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agent402_langchain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agent402_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14537795b60e2c006416b7c7a18a8b61f7d08e43b47b0da9e85f94f2ff79b002
|
|
| MD5 |
31f7d52c3edcebe00a006e4328e150d0
|
|
| BLAKE2b-256 |
760439d922ea7365fe7d144b49f7add8fa1f0b8f6a0579a7f1f0d7a84cbb6446
|
Provenance
The following attestation bundles were made for agent402_langchain-0.1.0-py3-none-any.whl:
Publisher:
publish-langchain-py.yml on MikeyPetrillo/Agent402
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent402_langchain-0.1.0-py3-none-any.whl -
Subject digest:
14537795b60e2c006416b7c7a18a8b61f7d08e43b47b0da9e85f94f2ff79b002 - Sigstore transparency entry: 2087394579
- Sigstore integration time:
-
Permalink:
MikeyPetrillo/Agent402@213e464231b8ccbeca58d5845be4bf7768eb5841 -
Branch / Tag:
refs/tags/langchain-py-v0.1.0 - Owner: https://github.com/MikeyPetrillo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-langchain-py.yml@213e464231b8ccbeca58d5845be4bf7768eb5841 -
Trigger Event:
push
-
Statement type: