llama-index tools voidly-pay integration — pay for HTTP 402 endpoints via x402
Project description
Voidly Pay Tool
Voidly Pay is an x402 payment rail for AI agents — let your LlamaIndex agent autonomously pay for HTTP 402 endpoints, no API keys, no Stripe customer object. Identity is an Ed25519 keypair on disk.
Settlement happens off-chain in Voidly Pay credits (Stage 1) or on-chain USDC on Base mainnet
(Stage 2). The vault is Sourcify-verified at
0xb592...1c12 with
public reserves at voidly.ai/pay/proof.
Installation
pip install llama-index-tools-voidly-pay
Provision a wallet (10 free credits, no install)
Visit voidly.ai/pay/claim — generates an Ed25519 keypair in your
browser and grants 10 credits via the public faucet. Save the keypair to
~/.voidly-pay-keypair.json and you're ready to call paid endpoints.
Usage
from llama_index.tools.voidly_pay import VoidlyPayToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
voidly_tool = VoidlyPayToolSpec() # uses ~/.voidly-pay-keypair.json by default
agent = FunctionAgent(
tools=voidly_tool.to_tool_list(),
llm=OpenAI(model="gpt-4o"),
)
await agent.run(
"Browse the Voidly Pay marketplace, find a Wikipedia summary endpoint, "
"and pay 1¢ to fetch the summary for 'Alan Turing'."
)
Available Functions
pay_for_url(url, method, params, body)— call any URL; auto-pays a402 Payment Requiredresponse by signing a transfer envelope, retries withX-Payment, and returns the body plus the signed receipt.discover_paid_endpoints()— list all paid endpoints currently advertised on the facilitator.marketplace_browse(category)— browse the open Voidly Pay marketplace (api.voidly.ai/v1/pay/marketplace).health_check()— run the 6-check trust report (facilitator reachability, vault verification, wallet balance, keypair validity, settlement health). Useful before a long-running paid task.list_listing(name, endpoint_url, price_usdc, description, category)— list your own paid endpoint on the marketplace.
How x402 works
- Agent calls a tool that hits a
402 Payment Requiredendpoint - Endpoint returns a signed quote (price, recipient, expiry)
- SDK signs a transfer envelope with the agent's Ed25519 keypair
- Endpoint verifies and returns the actual response
One round-trip after the first 402. Sub-200ms typical settlement on the live facilitator.
List your own paid endpoint
Visit voidly.ai/pay/list-your-service — browser-only Ed25519 keypair, no install. Once listed, every Voidly-aware agent (LlamaIndex, LangChain, Vercel AI, MCP) can find and call your URL. Voidly takes zero platform cut on Stage 1.
Resources
- Voidly Pay docs
- Live marketplace JSON
- Sourcify-verified vault
- Public reserves dashboard
- voidly-pay PyPI SDK (this tool wraps it)
This loader is designed to be used as a way to load Voidly Pay primitives as Tools in an Agent.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_tools_voidly_pay-0.1.1.tar.gz.
File metadata
- Download URL: llama_index_tools_voidly_pay-0.1.1.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a27e9e14ada9335f362dda0e9395f0ab1cff81d8f54e6f2deb85fea73ec76530
|
|
| MD5 |
39c03e9e785e992be4ba42752dfedd5e
|
|
| BLAKE2b-256 |
3f9c74c5c43268e6da8be62876591b2753c1897e466bc046be6978146fc1575a
|
File details
Details for the file llama_index_tools_voidly_pay-0.1.1-py3-none-any.whl.
File metadata
- Download URL: llama_index_tools_voidly_pay-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eec6b9beee20bbeb1265c45b55a753c3961c0e13e75a7bbac0fb714fcbccdf1e
|
|
| MD5 |
5051adc18dbad128841b1e29a66fb8bb
|
|
| BLAKE2b-256 |
555eff968241e30a3245b8b3e81caa79b197ddc02198123d20dc188409677b28
|