Skip to main content

yieldagentx402-langchain

LangChain tools for YieldAgentX402 — policy-gated, receipt-backed agent execution (MCP gateway).

PyPI: pip install yieldagentx402-langchain
Import: yieldagentx402_langchain

Note: PyPI rejects third-party packages named langchain-* (403 Forbidden). This package uses the yieldagentx402-langchain name, same pattern as crewai-yieldagentx402-tools.

Pitch: LangChain agents plan; YieldAgentX402 executes with ShadeGuard, x402, and verifiable receipts.
Proof: 16 tools · 18 chains · no custody · signed receipts.

Docs · Try without signup · Get API key · PyPI

Install

pip install yieldagentx402-langchain

From this repo (editable):

python -m pip install -e .
python -c "import yieldagentx402_langchain; print('ok')"

Try without signup

from yieldagentx402_langchain import YieldAgentX402DiscoveryTool

print(YieldAgentX402DiscoveryTool().invoke({}))

With an API key

export YAX_API_KEY=yax_test_...   # POST https://api.yieldagentx402.app/api/apply
from yieldagentx402_langchain import (
    YieldAgentX402DiscoveryTool,
    YieldAgentX402PolicyPreviewTool,
    YieldAgentX402ReceiptVerifierTool,
)

print(YieldAgentX402PolicyPreviewTool().invoke({
    "action_type": "payment",
    "parameters_json": '{"amount": "1.00", "token": "USDC"}',
}))

Tools

Tool MCP method Auth
YieldAgentX402DiscoveryTool yax_get_capabilities None
YieldAgentX402ActionPlannerTool yax_get_capabilities (plan subset) None
YieldAgentX402PolicyPreviewTool yax_check_policy YAX_API_KEY
YieldAgentX402ReceiptVerifierTool yax_verify_receipt YAX_API_KEY for some tenants

Environment

Variable Default
YAX_API_KEY —
YAX_API_BASE / YAX_MCP_BASE https://api.yieldagentx402.app
YAX_USE_CURL 0 — force MCP HTTP via curl (macOS CLT Python 3.9)

Publish (maintainer)

export TWINE_USERNAME=__token__
export TWINE_PASSWORD='pypi-...'
./scripts/publish-pypi.sh

Troubleshooting: SSLError on macOS

Use Python 3.11+ from Homebrew in a venv, or set YAX_USE_CURL=1. See prior README section / scripts/smoke-discovery.sh.

Metadata

Release files for yieldagentx402-langchain 0.1.3

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

Source distribution (sdist)

Source distribution for yieldagentx402-langchain 0.1.3
File Size Uploaded
yieldagentx402_langchain-0.1.3.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yieldagentx402-langchain 0.1.3
File Interpreter ABI Platform
yieldagentx402_langchain-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / yieldagentx402_langchain-0.1.3.tar.gz

Download URL yieldagentx402_langchain-0.1.3.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b867860d1d3e1389155fd1235b2e6578ef1d76fe87fad28b49c69f50246bc556
BLAKE2b-256 checksum
How to use checksums
0d0b0a5ca7ef4f782a24e06ccb1daf4dd8b4eeff576e02c92a7b68cb71c16cc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / yieldagentx402_langchain-0.1.3-py3-none-any.whl

Download URL yieldagentx402_langchain-0.1.3-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54953e6305c12fa2d01098cf9c6fecf6deacf5469fa8d73d4bf0b4dc972b15e6
BLAKE2b-256 checksum
How to use checksums
355d51ea2800455fd0f125ed5f80dec28b785c0af3bb94818d0c807a3c60d0b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.3 This release

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