Skip to main content

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


Download files

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

Source Distribution

agent402_langchain-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

agent402_langchain-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

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

Hashes for agent402_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e4c119563f5db290fc1afebad464190b3a4bd19ff6fcb4360d7551a79d61d70c
MD5 5735ac454e972c117f085fccd10ecb28
BLAKE2b-256 a9e6d1cb08dfb12d0b679e05cd45ee0984af3a7a511e98ba5a403449d307c806

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent402_langchain-0.1.0.tar.gz:

Publisher: publish-langchain-py.yml on MikeyPetrillo/Agent402

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent402_langchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent402_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14537795b60e2c006416b7c7a18a8b61f7d08e43b47b0da9e85f94f2ff79b002
MD5 31f7d52c3edcebe00a006e4328e150d0
BLAKE2b-256 760439d922ea7365fe7d144b49f7add8fa1f0b8f6a0579a7f1f0d7a84cbb6446

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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