Skip to main content

The Universal Payment Standard for AI Agents (EVM + Solana)

Project description

🤖 iAgentPay SDK v2.1 (Beta)

The Universal Payment Standard for AI Agents. Build autonomous agents that can Buy, Sell, Swap, and Tip across any blockchain.

PyPI version License: MIT


🌟 Key Capabilities & Advantages

iAgentPay is the only payment standard designed specifically for autonomous AI agents.

Feature Advantage
Universal Identity Your agent works on Ethereum, Solana, Base, and Polygon simultaneously. One wallet, all chains.
Brain-Safe Security Built-in Capital Guard prevents wallet draining even if the AI is compromised.
Retail Ready Native support for Meme Coins (BONK, PEPE) and Stablecoins (USDC).
DeFi Native Agents can Auto-Swap tokens (e.g., earn SOL, swap to USDC) without human help.
B2B Protocol Includes AIP-1 for agents to send invoices and bill each other programmatically.

🚀 Why iAgentPay?

Most crypto SDKs are too complex for AI. iAgentPay abstracts 1000s of lines of blockchain code into simple English commands.

  • Multi-Chain: Ethereum, Base, Polygon, Solana.
  • Universal Tokens: Pay in ETH, SOL, USDC, USDT, BONK, PEPE.
  • Social Tipping: agent.pay("vitalik.eth", 10)
  • Auto-Swap: agent.swap("SOL", "BONK") (DeFi Integration).
  • Gas Guardrails: Protect your agent from high fees.

📦 Installation

pip install iagent-pay

⚡ Quick Start

1. Initialize (Dual-Core Engine)

from iagent_pay import AgentPay, WalletManager

# Create Wallet (Auto-Saved securely)
wm = WalletManager()
wallet = wm.get_or_create_wallet(password="MySecurePassword")

# 🟢 Connect to Base (L2 - Fast & Cheap)
agent_evm = AgentPay(wallet, chain_name="BASE")

# 🟣 Connect to Solana (High Frequency)
agent_sol = AgentPay(wallet, chain_name="SOL_MAINNET")

2. Simple Payments (The "Hello World")

# Pay 0.01 ETH on Base
agent_evm.pay_agent("0x123...", 0.01)

# Pay 0.1 SOL on Solana
agent_sol.pay_agent("4jjCQ...", 0.1)

3. Retail & Memecoins (New in v2.1!) 🐕

Don't worry about contract addresses. We handle them.

# Send USDC (Stablecoin)
agent_evm.pay_token("CLIENT_ADDRESS", 100.0, token="USDC")

# Send BONK (Meme - Solana)
agent_sol.pay_token("FRIEND_ADDRESS", 1000.0, token="BONK")

# Send PEPE (Meme - Ethereum)
agent_evm.pay_token("DEGEN_ADDRESS", 5000.0, token="PEPE")

4. Social Tipping 🎁

Human-readable names auto-resolve to addresses.

# Resolves .eth (ENS) or .sol (SNS)
agent_evm.pay_agent("vitalik.eth", 0.05)
agent_sol.pay_token("tobby.sol", 50.0, token="USDC")

5. Auto-Swap (DeFi) 🔄

Agent earning in SOL but wants to hold BONK?

# Buys BONK with 1 SOL instantly
result = agent_sol.swap(input="SOL", output="BONK", amount=1.0)
print(f"Swapped! Hash: {result['tx_hash']}")

🧾 B2B Invoicing (AIP-1)

Standardized Agent-to-Agent billing protocol.

1. Create Invoice (Seller)

# Create a request for 50 USDC on Base
invoice_json = agent.create_invoice(
    amount=50.0,
    currency="USDC",
    chain="BASE",
    description="Consulting Services - Feb 2026"
)
# Send this JSON string to the other agent via HTTP/WebSocket

2. Pay Invoice (Buyer)

# The buyer agent receives the JSON and pays it
tx_hash = agent.pay_invoice(invoice_json)
print(f"Paid! Tx: {tx_hash}")

> Helper: Checks if invoice was already paid to prevent double-spending.


🛡️ Business Features

Dynamic Pricing

Update your agent's service fees remotely without redeploying code.

from iagent_pay import PricingManager
pm = PricingManager("https://api.myagent.com/pricing.json")
fee = pm.get_price()

Gas Guardrails ⛽

Prevent your agent from burning money when the network is congested.

# Aborts if Gas > 20 Gwei
try:
    agent_evm.pay_agent("Bob", 0.1, max_gas_gwei=20)
except ValueError:
    print("Gas too high, sleeping...")

🛡️ Security & Capital Control (New!)

Prevent your AI from draining your wallet if it gets "hallucinated" or compromised.

Daily Spending Limit (Circuit Breaker)

By default, sending native tokens (ETH/SOL) is capped at 10.0 units per 24 hours.

Configure at start:

# Limit to 5.0 ETH per day
agent = AgentPay(wallet, chain_name="BASE", daily_limit=5.0)

Update dynamically:

# Increase limit for a big purchase
agent.set_daily_limit(50.0)

# Lock wallet (Disable spending)
agent.set_daily_limit(0)

> If an agent tries to spend over the limit, a SecurityAlert error is raised.


🛠️ Configuration

Dual-Treasury support for collecting fees in both ecosystems. pricing_config.json:

{
  "treasury": {
      "EVM": "0xYourEthWallet...",
      "SOLANA": "YourSolanaWallet..."
  },
  "trial_days": 60,
  "subscription_price_usd": 26.00
}

📄 License

MIT License. Built for the Agent Economy.

Project details


Download files

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

Source Distribution

iagent_pay-2.1.1.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

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

iagent_pay-2.1.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file iagent_pay-2.1.1.tar.gz.

File metadata

  • Download URL: iagent_pay-2.1.1.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for iagent_pay-2.1.1.tar.gz
Algorithm Hash digest
SHA256 803d534f8462f3dad47c9424988e6691d517eab07353744a678bea974dddf732
MD5 ef2def69b37b70a92f8801f25a182897
BLAKE2b-256 d7bae276b3f895f31b979b34873d81b69a232395ee5f9813b1d2c0bff2c23e4b

See more details on using hashes here.

File details

Details for the file iagent_pay-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: iagent_pay-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for iagent_pay-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20bf9bbd26bce7c88add360914d0d7a9a8fe628ea6ea424c95fb25beb5622bf9
MD5 a3047cc8f2dd38473d2ca3ca71c374e4
BLAKE2b-256 f4159400148c4bad5d24bab33c047b7d6711f0bcfbda75dbc1f053b680292d52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page