Skip to main content

LangChain tools for policy-gated YieldAgentX402 execution — discovery, policy preview, receipt verification via the live MCP gateway. Proof: 16 tools, 18 chains, no custody, signed receipts.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yieldagentx402_langchain-0.1.3.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yieldagentx402_langchain-0.1.3-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file yieldagentx402_langchain-0.1.3.tar.gz.

File metadata

  • Download URL: yieldagentx402_langchain-0.1.3.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for yieldagentx402_langchain-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b867860d1d3e1389155fd1235b2e6578ef1d76fe87fad28b49c69f50246bc556
MD5 9631785dfc1829229f94fcb44593913b
BLAKE2b-256 0d0b0a5ca7ef4f782a24e06ccb1daf4dd8b4eeff576e02c92a7b68cb71c16cc2

See more details on using hashes here.

File details

Details for the file yieldagentx402_langchain-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for yieldagentx402_langchain-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 54953e6305c12fa2d01098cf9c6fecf6deacf5469fa8d73d4bf0b4dc972b15e6
MD5 252d1811d91f2786371f33d33dd5352e
BLAKE2b-256 355d51ea2800455fd0f125ed5f80dec28b785c0af3bb94818d0c807a3c60d0b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page