Metadata-Version: 2.5
Name: agentpay-gateway
Version: 0.1.0
Summary: AgentPay Reverse Proxy & Seller Gateway for Autonomous Agent Micro-Payments
Project-URL: Homepage, https://github.com/july-whj/AgentPay
Project-URL: Documentation, https://github.com/july-whj/AgentPay/blob/main/specs/gateway-guide.md
Project-URL: Repository, https://github.com/july-whj/AgentPay
Author: AgentPay Contributors
License-Expression: Apache-2.0
Keywords: agent,ai,arbitrum,eip-712,gateway,reverse-proxy,usdc,x402
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: Proxy Servers
Classifier: Topic :: Security
Requires-Python: >=3.10
Requires-Dist: fastapi>=0.110.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: open-agentpay>=0.1.0
Requires-Dist: pydantic-settings>=2.2.0
Requires-Dist: pydantic>=2.6.0
Requires-Dist: uvicorn>=0.28.0
Provides-Extra: dev
Requires-Dist: mypy>=1.9.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Description-Content-Type: text/markdown

# AgentPay Gateway (`agentpay-gateway`)

[![PyPI Version](https://img.shields.io/pypi/v/agentpay-gateway.svg)](https://pypi.org/project/agentpay-gateway/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)

**Autonomous Agent Payment Gateway & Reverse Proxy for API Monetization.**

`agentpay-gateway` sits directly in front of existing REST APIs and AI microservices, monetizing requests via HTTP 402 Payment Required challenges settled gaslessly on-chain (Arbitrum Sepolia & Base).

---

## ⚡ Quickstart

### Installation
```bash
pip install agentpay-gateway
```

### Configuration (`gateway.yaml`)
```yaml
version: "1.0"

server:
  host: "0.0.0.0"
  port: 8000
  db_path: "./data/gateway.db"

facilitator:
  url: "http://127.0.0.1:8001"

settlement:
  default_network: "eip155:421614"                        # Arbitrum Sepolia
  default_asset: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" # Circle USDC
  default_pay_to: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"

routes:
  - path: "/v1/market-data"
    upstream: "https://httpbin.org/get"
    price: "0.001 USDC"
```

### Running the Gateway
```bash
python3 -m agentpay_gateway.server --config ./gateway.yaml
```

For complete documentation, visit [AgentPay Gateway Guide](https://github.com/july-whj/AgentPay/blob/main/specs/gateway-guide.md).
