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.

Agent402 is the applied layer of Agentic Finance (AIFI) - agents that pay and get paid on their own over the two open wires, x402 and MPP (Machine Payments Protocol). Every paid endpoint answers both on the same 402; wallet-only tools take any payment-wrapped fetch (@x402/fetch, or a stock mppx fetch).

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.2.tar.gz (7.8 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.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agent402_langchain-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d31cf282a01e2919e40a45aa2df947bdc74e5e19e05c22d9c9c1f21e6d69e51d
MD5 4f0bdd9c7c362cf56d11a0d2984c047c
BLAKE2b-256 409345d107659ff1e23942fa2f99b74103e6d79563ae1d07eac07cc59c4fddda

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for agent402_langchain-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3f9f41b63be1da0008a7a1a2267ac083668b3225b0cc4107991b852e6f5b5e7e
MD5 5a0edfc22f64b18b28d630f78625646f
BLAKE2b-256 bb8c0756836b8e16d62baccb7eb8a59f2c3a25343034c0565bf1cea326b1cee7

See more details on using hashes here.

Provenance

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

This release

0.1.2 This release

2 files

0.1.1

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