Framework integration guides
Use tools for explanations and a guard for payment authority.
Live features and staging previews are distinguished. Index coverage is not yet available.
Copy-paste buyer examples
We operate SpendPreflight. These public examples preserve hold/block before signing and distinguish screening fees from merchant payments. The gist is a dated snapshot; the SDK repository is the maintained source.52 mocked SDK tests and full typecheck pass; no live wallet or LLM call is needed.
Vercel AI SDK
Prepare a tool with the merchant challenge and explicit rules as input. Inject a separately bounded screeningFetch into the operator-maintained tool factory. Preserve decision, reasons and receipt. Stop execution on non-2xx/malformed responses; only the payment client may act on an allow. The tested SDK example is published in the SDK repository for release 0.2.0.
LangChain JS
Use the check_payee tool factory with wallet/name/domain inputs and the $0.01 screening fee. It screens a payee and does not authorize a payment. A standalone integration package is the current upstream contribution path; no new community-tools PR or package is claimed.
OpenAI Agents
The published SDK example uses the actual function-tool interface, rejects invalid inputs and propagates HTTP/schema failures. Import the operator-maintained factory, inject the screening transport and keep all signing outside the model tool. No upstream example PR is claimed.
GOAT and AgentKit
The GOAT plugin with check_payee/preflight_payment and operator disclosure is awaiting review in goat-sdk/goat PR #603. The AgentKit provider is awaiting review in coinbase/agentkit PR #1545. Neither status means a merged/released integration. Budget the separate screening fee explicitly and enforce holds/blocks before merchant payment.
Python frameworks
LangChain Python and CrewAI examples ship with the prepared Python package. They are local-only advisory wrappers with no model/network spend. Add them to your framework's tools list and wire Guard into the actual async x402 client separately.
Python/httpx and Go payment clients
These operator-maintained snapshots use the released x402 clients directly, so they do not require our unpublished Python package. They bind the selected quote to the actual resource and screen through a separate plain HTTP transport before signing. Hold, block, timeout and exhausted free trials abort payment. Keep native wallet limits and your own spend ledger. The examples validate the decision/receipt shape; they do not cryptographically verify the receipt. Screening never automatically falls back to a paid call.
LlamaIndex buyer tool
The standalone FunctionTool accepts an operator-configured resource name. The model cannot supply a URL, payment header or budget. A fresh caller-configured x402 client screens the selected quote before signing; errors and resource mismatches fail closed. Keep native payment controls and treat returned merchant text as untrusted. This is our example, not an upstream integration or endorsement; it uses released packages without requiring our PyPI release.
Privy wallet example under review
Our optional Base-mainnet preflight contribution keeps the demo's default testnet behavior unchanged. It uses a separate screening request and rejects holds/errors before payment creation. The contribution is not yet merged; maintainer preview authorization is pending. No Privy endorsement or deployed integration is claimed.