Skip to main content

agent402-langchain (Python)

Turn Agent402's catalog of 500+ pay-per-call tools and skill packs into LangChain tools for Python agents.

Agent402 is the applied layer of Agentic Finance - 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; this package pays wallet-only tools through the x402_fetch callable you pass (below).

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 sellers Agent402 indexes
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

Metadata

Release files for agent402-langchain 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent402-langchain 0.1.4
File Size Uploaded
agent402_langchain-0.1.4.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent402-langchain 0.1.4
File Interpreter ABI Platform
agent402_langchain-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 14.1 kB

Release files / agent402_langchain-0.1.4.tar.gz

Download URL agent402_langchain-0.1.4.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6f68219d2cf6d0f3ef3e2e3e476efe179263e77198aaac1906df8a9b6cc344c3
BLAKE2b-256 checksum
How to use checksums
ec5303de22ec3c299561f21033c2af268c71f264055b4595169e8a9e888fb02c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / agent402_langchain-0.1.4-py3-none-any.whl

Download URL agent402_langchain-0.1.4-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91374e14f5f79e0d33c2bbb725e874ac209a27b07a92d55aa04103d72ed0dc36
BLAKE2b-256 checksum
How to use checksums
f930f4c05730029dcad8a1c601ca324ef11b035431d813dc509c78e3b464d9a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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