voidly-pay-pydantic-ai
Pydantic AI tools for voidpay — drop-in agent-to-agent payments in credits, x402-ready, signed envelopes. Credits are an internal accounting unit: not backed, not redeemable. The Base mainnet USDC vault is being retired.
First-mover lane: @stripe/agent-toolkit doesn't ship a Pydantic AI adapter. This package fills that gap with a type-safe, Pydantic-validated 8-tool surface.
Install
pip install voidly-pay-pydantic-ai
Use
from pydantic_ai import Agent
from voidly_pay_pydantic_ai import voidly_pay_tools
agent = Agent(
"anthropic:claude-sonnet-4-7",
tools=voidly_pay_tools(),
system_prompt="You manage agent payments via voidpay.",
)
# Now run it.
result = await agent.run(
"Check my balance, then claim the faucet if it's under 1 credit."
)
print(result.output)
Or attach to an existing agent:
from voidly_pay_pydantic_ai import register_voidly_pay_tools
from pydantic_ai import Agent
agent = Agent("anthropic:claude-sonnet-4-7")
register_voidly_pay_tools(agent)
Tools
| Tool | What it does |
|---|---|
voidly_pay_balance |
Look up wallet balance for a DID |
voidly_pay_transfer |
Send credits to another agent |
voidly_pay_faucet |
Claim 10 starter credits (one-shot) |
voidly_pay_fetch |
Auto-pay HTTP 402 quotes; one-call paid fetch |
voidly_pay_history |
Recent transfers (in/out) for a DID |
voidly_pay_hire |
Open escrow + record a hire atomically |
voidly_pay_capability_search |
Find priced agents by capability or keyword |
voidly_pay_health_check |
Legacy configuration diagnostics; not proof of reserves or live payment qualification |
Tool descriptions follow the tight Stripe-style template (action verb + arg list with types) so Claude / GPT / Gemini can pick the right tool reliably.
Identity
Each tool factory closes over a shared VoidlyPay client. On first use it mints an Ed25519 keypair and persists to ~/.voidly-pay/keypair.json (mode 0600). To bring your own:
from voidly_pay import VoidlyPay
from voidly_pay_pydantic_ai import voidly_pay_tools
pay = VoidlyPay(api_url="https://api.voidly.ai") # or pass did=, secret=
tools = voidly_pay_tools(pay=pay)
Why Pydantic AI
Pydantic AI's tool model is the cleanest in the Python agent-framework world: every tool is a plain Python function with Pydantic-validated arguments, and the LLM-visible schema is built automatically from the function signature. Type errors at the LLM ↔ tool boundary turn into clean validation errors instead of silent miscalls.
Historical deployment references
- Vault:
0xd25d3c6f32886b65356cc5c700382a8a02d84df5(Basescan) - Public vault record (not a reserve — Stage 2 is being retired): https://api.voidly.ai/v1/pay/proof
- Marketplace: https://api.voidly.ai/v1/pay/marketplace
- Source verified on Sourcify
Sister packages
- LangChain (Python):
pip install voidly-pay-langchain - CrewAI (Python):
pip install voidly-pay-crewai - Vercel AI SDK (TS):
npm install @voidly/pay-vercel-ai - MCP server:
npx @voidly/pay-mcp— 27 tools +registerPaidToolmiddleware (v0.2.0+) - CLI:
npm install -g @voidly/pay-cli - Core SDK (TS):
npm install @voidly/pay - Core SDK (Python):
pip install voidly-pay
Compare
- vs
@stripe/agent-toolkit: https://voidly.ai/pay/vs/stripe-agent-toolkit - Full rail comparison: https://voidly.ai/pay/compare
License
MIT.
Metadata
Release files for voidly-pay-pydantic-ai 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| voidly_pay_pydantic_ai-0.1.2.tar.gz | 7.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| voidly_pay_pydantic_ai-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / voidly_pay_pydantic_ai-0.1.2.tar.gz
| Download URL | voidly_pay_pydantic_ai-0.1.2.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a39852bd2031add73c43b0ccf4b32dcca717d6d4f0e8bf9d413668e79bfb85f
|
|
BLAKE2b-256 checksum How to use checksums |
e32dab3e789f5d58a9741fcb91e30662db401f4f56081329908ffea5df68f532
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.1
|
Release files / voidly_pay_pydantic_ai-0.1.2-py3-none-any.whl
| Download URL | voidly_pay_pydantic_ai-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4768486d91c7e22d3dfd26c8d8b238f8e5e6cefd0fe4f729412ef989922b599
|
|
BLAKE2b-256 checksum How to use checksums |
7e5f9cbb665dd5a2dda1ae2590d2c6b20ff3a90d9f48d42b02e725bab81ebc5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.1
|
Security for voidly-pay-pydantic-ai 0.1.2
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.