Metadata-Version: 2.4
Name: andreax-sdk
Version: 0.1.0
Summary: Pure Python client (no LangChain) for Andreax's pay-per-call x402 AI tools (USDC on Base, EIP-3009 autopay).
Author: Andreax
License: MIT
Project-URL: Homepage, https://andreax.dev
Keywords: x402,usdc,base,eip-3009,agents,autopay
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: web3>=6.0
Requires-Dist: requests>=2.28
Requires-Dist: eth-account>=0.10

# andreax-sdk

Pure Python client (no LangChain) for [Andreax](https://andreax.dev)'s pay-per-call AI tools:
200+ tools discoverable and payable over **x402** (HTTP 402 + USDC on Base), no API key, no signup.

```python
from andreax_sdk import AndreaxClient

client = AndreaxClient(
    wallet_address="0xYourAddress",
    private_key=None,          # optional; required only if auto_pay=True
    auto_pay=False,            # True = pay automatically within your caps
    per_call_cap_usd=0.10,
    daily_cap_usd=5.00,
)

tools = client.get_tools()          # -> list[dict] {name, description, price_usdc, endpoint}
result = client.call("traducir", {"texto": "hello", "idioma_destino": "es"})
```

## Autopay

With `auto_pay=True` and a `private_key`, a tool call that answers `402 Payment Required` is paid
automatically: this SDK signs an **EIP-3009 `transferWithAuthorization`** locally (your private key
never leaves the process) and retries the call with the signed payload in the `X-PAYMENT` header.
Every payment is checked against two caps first (`per_call_cap_usd`, `daily_cap_usd`).

Without `auto_pay` (or without a `private_key`), a paid call raises `PaymentRequired` with the full
402 challenge (amount, recipient, network) so you can decide.

## Status

Alpha (0.1.0). Built against Andreax's live x402 catalog and 402 challenge format. This is the
pure-Python sibling of `andreax-langchain-autopay` — same protocol, no LangChain dependency.

## License

MIT
