Metadata-Version: 2.4
Name: voidly-pay-llamaindex
Version: 0.1.0
Summary: LlamaIndex tools for Voidly Pay — drop-in agent-to-agent payments. USDC-backed, x402, signed envelopes. Live on Base mainnet.
Author-email: Voidly Research <research@voidly.ai>
License: MIT
Project-URL: Homepage, https://voidly.ai/pay
Project-URL: Documentation, https://voidly.ai/pay/for-builders
Project-URL: Repository, https://github.com/voidly-ai/voidly-pay
Project-URL: Bug Tracker, https://github.com/voidly-ai/voidly-pay/issues
Keywords: voidly,voidly-pay,llamaindex,llamaindex-tools,llama-index,agent-payments,agent-to-agent,a2a,x402,x402-paywall,stablecoin,usdc,base-mainnet,ai-agent,autonomous-agents,ed25519,rag
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: voidly-pay>=1.0.0
Requires-Dist: llama-index-core>=0.11.0
Requires-Dist: pydantic>=2.0

# voidly-pay-llamaindex

[LlamaIndex](https://www.llamaindex.ai/) tools for [Voidly Pay](https://voidly.ai/pay) — drop-in agent-to-agent payments, USDC-backed, x402-ready, signed envelopes, live on Base mainnet.

## Install

```bash
pip install voidly-pay-llamaindex
```

## Use

```python
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.anthropic import Anthropic
from voidly_pay_llamaindex import voidly_pay_tools

agent = FunctionAgent(
    tools=voidly_pay_tools(),  # 8 FunctionTools
    llm=Anthropic(model="claude-sonnet-4-7"),
    system_prompt="You manage agent payments via Voidly Pay.",
)

response = await agent.run("Check my balance and faucet if low.")
print(response)
```

## 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) |

## Use with RAG flows

LlamaIndex shines for retrieval-augmented generation. Voidly Pay tools
slot in alongside your retrievers — useful when:

- A retrieved document is paywalled (use `voidly_pay_fetch` to auto-pay)
- An agent needs to hire another agent for a specialized retrieval (use
  `voidly_pay_capability_search` + `voidly_pay_hire`)
- The pipeline emits paid receipts for each completed query

## Identity

The toolkit lazily creates a `VoidlyPay` client. On first use it mints
an Ed25519 keypair and persists to `~/.voidly-pay/keypair.json` (mode
0600). To bring your own:

```python
from voidly_pay import VoidlyPay
from voidly_pay_llamaindex import voidly_pay_tools

pay = VoidlyPay(api_url="https://api.voidly.ai")
tools = voidly_pay_tools(pay=pay)
```

## Live now

- Vault: `0xb592512932a7b354969bb48039c2dc7ad6ad1c12` ([Basescan](https://basescan.org/address/0xb592512932a7b354969bb48039c2dc7ad6ad1c12))
- Public proof of reserves: <https://api.voidly.ai/v1/pay/proof>
- Marketplace: <https://api.voidly.ai/v1/pay/marketplace>
- Source verified on [Sourcify](https://repo.sourcify.dev/contracts/full_match/8453/0xb592512932a7b354969bb48039c2dc7ad6ad1c12/)

## Sister packages

- **LangChain (Python):** `pip install voidly-pay-langchain`
- **CrewAI (Python):** `pip install voidly-pay-crewai`
- **Pydantic AI (Python):** `pip install voidly-pay-pydantic-ai`
- **AutoGen (Python):** `pip install voidly-pay-autogen`
- **Vercel AI SDK (TS):** `npm install @voidly/pay-vercel-ai`
- **MCP server:** `npx @voidly/pay-mcp` — 27 tools + `registerPaidTool` middleware (v0.2.0+)

## Compare

- vs `@stripe/agent-toolkit`: <https://voidly.ai/pay/vs/stripe-agent-toolkit>
- vs `@stripe/link-cli`: <https://voidly.ai/pay/vs/stripe-link-cli>
- Full rail comparison: <https://voidly.ai/pay/compare>

## License

MIT.
