Skip to main content

agent402-langchain (Python)

Turn Agent402's catalog - 500+ strong: 400+ x402 pay-per-call tools + 100+ skill packs - 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 500+ 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

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.1.tar.gz (7.4 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.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file agent402_langchain-0.1.1.tar.gz.

File metadata

  • Download URL: agent402_langchain-0.1.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for agent402_langchain-0.1.1.tar.gz
Algorithm Hash digest
SHA256 76e3108e0e31093a6977a6d3d8404364d422d3fb7c48fca84089ee2c70c523ca
MD5 2a0fe2bc4f111794a85e22fc51bb2b2f
BLAKE2b-256 0312e51cc66a9bad0b468f5a1e25081116ab0cca0b8e0ef2b08be8050839ac92

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent402_langchain-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agent402_langchain-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 302e7a2334b698d985ce95a07802063bed263e78c291b8c8e85df2898dc17011
MD5 2f9cc0a713fbb2d31d08c75be687e89c
BLAKE2b-256 8dc9b04d2163c01257933e29276f5e7953cc69241fe9f0082ebfc34776150e0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent402_langchain-0.1.1-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.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 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