Skip to main content

mekong-x402 — native LangChain / CrewAI tools for the x402 fleet

37 pay-per-call APIs on Base (USDC). No signup, no API key — your wallet is the credential. Free daily trial quota on every endpoint. Fleet: https://api.mekongtradeintel.com/tools/

Install

pip install "mekong-x402[langchain]"   # LangChain tools
pip install "mekong-x402[crewai]"      # CrewAI tools
pip install "mekong-x402[all]"         # both
pip install mekong-x402                # core client only (no frameworks)

Quickstart — LangChain

from mekong_x402.langchain_tools import TaskRouterTool, WebSearchTool, AIVerdictTool

# FREE: ask which endpoint fits, in plain language
print(TaskRouterTool().run(task="Is this token a honeypot?"))

# Paid endpoints: free trial first, then USDC per call
print(WebSearchTool().run(query="Ethereum ETF inflows"))
print(AIVerdictTool().run(query="Is 0xabc... a honeypot?"))

Quickstart — CrewAI

from crewai import Agent, Task, Crew
from mekong_x402.crewai_tools import WebSearchTool, TaskRouterTool

analyst = Agent(
    role="Research Analyst",
    goal="Brief me with live data",
    tools=[TaskRouterTool(), WebSearchTool()],
    backstory="You use pay-per-call tools. No API keys needed.",
)

Available tools

Tool Endpoint Price
TaskRouterTool /recommend — describe a task, get top-3 endpoints FREE
WebSearchTool /websearch — live web search $0.01
TokenPriceTool /tokenprice — price/mcap/liquidity (chain+address exact) $0.001
AIVerdictTool /aiverdict — SAFE/RISKY/SCAM + reasoning $0.01
EnrichTool /enrich — company data from domain $0.02
STTTool /stt — speech-to-text from audio URL $0.05
BriefTool /brief — news+trends+sentiment bundle $0.05

Same 7 tools exist in both mekong_x402.langchain_tools and mekong_x402.crewai_tools.

How payment works

  1. Call without payment → free trial quota applies automatically.
  2. Trial exhausted → the tool raises X402PaymentRequired (never a silent charge). The exception message carries the exact price, payTo, USDC contract, network, and the 3-step x402 flow: sign an exact-scheme USDC transfer on Base → base64 the payload → retry with the X-PAYMENT header.
  3. Libraries that automate it: x402-axios / x402-fetch (npm).
from mekong_x402 import X402PaymentRequired
try:
    WebSearchTool().run(query="...")
except X402PaymentRequired as e:
    print(e)  # exact pay instructions for the operator

Verify independently any time: https://api.mekongtradeintel.com/tools/verify

Metadata

Release files for mekong-x402 0.1.0

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

Source distribution (sdist)

Source distribution for mekong-x402 0.1.0
File Size Uploaded Provenance Actions
mekong_x402-0.1.0.tar.gz 9.7 kB Without provenance Details for mekong_x402-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mekong-x402 0.1.0
File Interpreter ABI Platform Actions
mekong_x402-0.1.0-py3-none-any.whl Python 3 none any Details for mekong_x402-0.1.0-py3-none-any.whl

Total release size: 21.1 kB

Release files / mekong_x402-0.1.0.tar.gz

Download URL mekong_x402-0.1.0.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ef7043234040dd54409a240aec142bb11e639ce31f7456da2c5e61b91eb9cd68
BLAKE2b-256 checksum
How to use checksums
11557b7549890d0130fbc89f086a1daf8767deea7682b34ab3d4c5346dae0d38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / mekong_x402-0.1.0-py3-none-any.whl

Download URL mekong_x402-0.1.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dd2ac1a41892b250a3f2d7412dc608fd7889b7a2980f3df396ccaf27b9dc3de
BLAKE2b-256 checksum
How to use checksums
d4355f0b863e2d1a03d5614b64de5dfc36feaf83478d567a145ad940e21b859c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for mekong-x402 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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