⚡ A-Pay Protocol (AgentPay)
The Universal Micropayment & Economic Layer for Autonomous AI Agents
🌐 Live Production Network & On-Chain Addresses
- Live Web App & Console: https://apay-network.vercel.app
- Target Network: Base Sepolia L2 (Chain ID
84532) - Live Contracts:
- $APAY Token (ERC-20):
0x8dd4ff9035c7d4e0Bef30aa64FC30d128A4066C3(100M Cap, Base L2) - APayRouter (V1 Gateway):
0x71434344beEF9C44fF3BC95572bEB7bFB8847ec6(1.0% Protocol Fee) - APayRouterV2 (Enterprise Router):
0xD08c8A337E5339d1c083E06d74A9265956ceEA16(Cumulative Channels & Merkle Claims) - EscrowVault (Session Keys):
0x3E35a9E802627a3D9A86D6554e72b1C446E34aAF(Sub-Agent Delegated Spending) - StakingVault (Anti-Spam Collateral):
0xD2f3F4D97f4a3fdC9d4eEDfB9747BF9D80CF6225(Anti-Spam Staking & Slashing Engine)
- $APAY Token (ERC-20):
🎯 Vision & Identity
A-Pay is an ultra-lightweight, zero-latency, open economic rail designed for the machine-to-machine (M2M) economy. Just as UPI revolutionized human digital payments in India, A-Pay enables autonomous AI software agents to discover, consume, and pay for data, compute, APIs, and micro-services on the fly—without credit cards, human KYC, or seed phrase friction.
🚀 1-Command Experience
1. Website / API Owners (The Sellers)
Protect ANY existing website or API with an instant HTTP 402 crypto paywall—zero code modifications required:
apay protect --target http://localhost:8000 --price 0.001 --wallet 0xYourWalletAddress
- Incoming requests from AI bots will automatically receive an HTTP 402 Payment Required challenge.
- Once the AI agent's cryptographic micropayment is verified (<15ms), the request is forwarded to your server and data is unlocked!
2. AI Agent Developers (The Buyers)
Give your AI agent an in-memory wallet and strict spending guardrails with 2 lines of code:
from apay import APaySession, AgentWallet
# Generate or load wallet with daily safety limit
wallet = AgentWallet(private_key="0x...", max_per_call_usdc=0.01, daily_budget_usdc=5.0)
session = APaySession(wallet)
# Automatically handles HTTP 402 challenges & settles on the fly
response = session.get("https://protected-api.com/market-data")
print(response.json())
📦 Directory Structure
apay/
├── src/
│ └── apay/
│ ├── __init__.py # Package exports
│ ├── cli.py # ⚡ 1-Command CLI (`apay protect`, `apay wallet new`, `apay pay`)
│ ├── client.py # 🤖 Auto-settling HTTP client (sync & async)
│ ├── wallet.py # 🔐 In-memory wallet + local spending limits
│ ├── proxy.py # 🛡️ Ultra-light reverse proxy paywall (Starlette + EIP-712)
│ ├── relayer.py # 📊 Settlement journal & batch relayer
│ └── integrations/ # 🔗 LangChain & CrewAI agent wrappers
├── contracts/ # Base Sepolia Smart Contracts (APAYToken & APayRouter)
├── tests/ # Automated integration & security test suite
├── spec/ # RFC wire format & security model specifications
└── pyproject.toml # Hatchling packaging configuration
🛠️ Installation & Quickstart
# 1. Install A-Pay via pip
pip install apay
# 2. Generate a new Agent Wallet with spending limits
apay wallet new
# 3. Protect any website or API with an instant HTTP 402 Paywall
apay protect --target http://localhost:8000 --price 0.001 --wallet 0xYourPayoutWalletAddress
A-Pay is an open-source decentralized economic protocol for autonomous machine agents. Built on Base L2.
Metadata
Release files for apay 0.1.5
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 | Actions |
|---|---|---|---|---|
| apay-0.1.5.tar.gz | 50.9 kB | Without provenance | Details for apay-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apay-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for apay-0.1.5-py3-none-any.whl |
Total release size: 108.3 kB
Release files / apay-0.1.5.tar.gz
| Download URL | apay-0.1.5.tar.gz |
|---|---|
| Size | 50.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cab7b1b52a7c41798ad11c5e9fbc03e471baa8b29cebb3a925be11456b4c4780
|
|
BLAKE2b-256 checksum How to use checksums |
26c3c4ed6adee5c8d3625cc6c640e8cc6c59e337405f9f27e9a118459434cc86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / apay-0.1.5-py3-none-any.whl
| Download URL | apay-0.1.5-py3-none-any.whl |
|---|---|
| Size | 57.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ce3867cb3ed9e7852d28927b8b770cb60cec2fb211143a279eaf33bd9789095
|
|
BLAKE2b-256 checksum How to use checksums |
405c2a87b802480b7680e19b1a7c0312c93996825abc3a20c1ff57a4fc92279a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for apay 0.1.5
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.