Skip to main content

Pydantic AI tools for Voidly Pay — drop-in agent-to-agent payments. USDC-backed, x402, signed envelopes. Live on Base mainnet.

Project description

voidly-pay-pydantic-ai

Pydantic AI tools for Voidly Pay — drop-in agent-to-agent payments, USDC-backed, x402-ready, signed envelopes, live on Base mainnet.

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 Voidly Pay.",
)

# 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 Trust report (vault on Base, source verified, USDC backing)

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.

Live now

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 + registerPaidTool middleware (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

License

MIT.

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

voidly_pay_pydantic_ai-0.1.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

voidly_pay_pydantic_ai-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file voidly_pay_pydantic_ai-0.1.1.tar.gz.

File metadata

  • Download URL: voidly_pay_pydantic_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.1

File hashes

Hashes for voidly_pay_pydantic_ai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 74062443ac78d4719d6eb5bc72cd58029964cfad9c08819a79ad90fe9893f922
MD5 e19106e07cc7f65a41aaf49b4e25ea63
BLAKE2b-256 9b2f456b3f2722a5c4ac275db8c6cad4ab3ff2cb63f4c05b5beb1c1ddd3ef080

See more details on using hashes here.

File details

Details for the file voidly_pay_pydantic_ai-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for voidly_pay_pydantic_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e7e51e64ea23f8e426a9f063c37101cea0d517f6814faaf37d8dcbeb912d0c0
MD5 049158cc289dc9191e7b27f72d03247b
BLAKE2b-256 54447cfdf2dd862a6967f8bc444eb9d99cfcc2bb3a259197d30bcdf5c6acb53b

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