Skip to main content

llama-index-tools-ausca

LlamaIndex tools that pay for HTTP 402 APIs over x402 instead of carrying API keys. A tool built here works against any x402 v2 resource; nothing in it is specific to one vendor. The model authors the request; the caller's signing key and hard per-call USD cap stay outside the model's reach, enforced by the official x402 library's spend controls before anything is signed.

Install

pip install llama-index-tools-ausca

Use

import os
from llama_index_tools_ausca import payable_tool
from pydantic import BaseModel

class LeaseBrowser(BaseModel):
    duration_seconds: int

browser = payable_tool(
    name="lease_browser",
    description="Lease a remote browser with CDP access for 10, 30, or 60 minutes. Costs $0.10 to $0.25 in USDC on Base.",
    fn_schema=LeaseBrowser,
    url="https://ausca.com/v1/lease-browser",
    private_key=os.environ["WALLET_PRIVATE_KEY"],  # pays USDC on Base
    max_payment_usd=0.50,                          # hard per-call cap
)

The tool result is a JSON string with the resource result and, when the call was paid, the decoded settlement proof from the PAYMENT-RESPONSE header.

The example uses Ausca, pay-per-call agent infrastructure services with no accounts or API keys; its catalog-bound Python client is the ausca package. Any other x402 v2 resource works the same way: point url at it. The LangChain sibling is langchain-ausca.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_ausca-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

llama_index_tools_ausca-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_ausca-0.1.0.tar.gz.

File metadata

  • Download URL: llama_index_tools_ausca-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for llama_index_tools_ausca-0.1.0.tar.gz
Algorithm Hash digest
SHA256 00d77ad70fa54cc6aeadfcbc6076923ca8d6da0965a589c3ffdea3dd57feb5b4
MD5 3aca4aa919bf25ea34ef205753cb7ebc
BLAKE2b-256 04666fdf244e3c297376daf0a33a3a42c3b35520492793500dada45dd572d730

See more details on using hashes here.

File details

Details for the file llama_index_tools_ausca-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_ausca-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f81f7ba68e2e3126a558241ad6516ced924ba4943d5b3b1e110a2c33fe14bb15
MD5 c5ea0038a6bdf4bf587993a54ce6f72c
BLAKE2b-256 c5cd23609782509757abcc23b7849b425cdfe37d813a4cf991dee4ebad936cd7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page