← Back Home

📘 Manual Oficial de Referencia: iAgentPay (v8.5.0)

Bienvenido a iAgentPay, la infraestructura de pago más avanzada para Agentes de Inteligencia Artificial. Este manual técnico está diseñado para enseñarte a desbloquear el 100% de las capacidades de tus agentes, permitiéndoles operar, cobrar e invertir de forma autónoma a escala global.

🌎 1. Soporte Global y Arquitectura Multi-Cadena

Architecture Diagram

iAgentPay no es una simple API local; es una pasarela global financiera. Nuestro motor de enrutamiento le permite a tu agente mover dinero a través de todo el ecosistema Web3 y financiero mundial.

El agente es "Agnóstico a la moneda". Puedes elegir la moneda predeterminada. Las divisas integradas incluyen: USDC, USDT, EURC (Euro), CNHC (Yuan), GYEN (Yen), MXNT (Peso).

from iagent_pay import AgentPay # Agente especialista en el mercado asiático agente = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. Características Principales

A. Pagos Autónomos (x402)

tx_hash = agente.pay_token( recipient_address="0xProveedor...", amount=5.0 ) print(f"Pago completado: {tx_hash}")

B. Generación de Facturas

Invoicing

Si tu IA realiza un trabajo para un cliente (humano o máquina), puede generar una "Factura Inteligente".

factura_id = agente.invoices.create_invoice( amount=25.0, customer_address="0xCliente...", description="Auditoría de código" )

🛡️ 3. Safety Kernel (Núcleo de Seguridad)

Safety Kernel

Darle libertad financiera a un software requiere límites duros. Verifica cada transacción antes de tocar la red.

# Limitar a un máximo de $15 dólares por día agente = AgentPay(daily_limit=15.0) # Acuñar Identidad identidad = agente.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. Tesorería Autónoma (DeFi)

DeFi Yield

Deposita automáticamente los ahorros excedentes en protocolos mundiales como Aave v3, generando intereses mientras duermes.

# Mantener $50 en efectivo, invertir el resto agente.yield_manager.auto_invest(buffer_usd=50.0)

🏦 5. Puente Bancario Fiat (Fiat Bridge)

¿El cliente no tiene cripto? No hay problema. iAgentPay conecta directamente con Stripe para depositar dinero en cuentas bancarias tradicionales o cobrar con tarjeta de crédito.

from iagent_pay.fiat_bridge import FiatBridge bridge = FiatBridge() # Pagar a un programador freelancer por su banco bridge.send_stripe(amount_usd=150.0, stripe_account_id="acct_1M2...", description="Pago quincenal") # El agente crea un link para que el cliente pague con tarjeta link = bridge.create_payment_link(amount_usd=9.99, description="Acceso Premium API") print(link["url"]) # → https://buy.stripe.com/... # Router inteligente: decide solo si usar USDC o Stripe bridge.smart_send(amount_usd=25.0, recipient="cliente@empresa.com")

🌉 6. Enrutamiento Cross-Chain (Motor AP2)

El agente puede tener su dinero en una red (ej. Ethereum) y pagar en otra (ej. Polygon). El Motor AP2 evalúa todos los puentes disponibles y selecciona automáticamente el más barato y rápido.

from iagent_pay.cross_chain import CrossChainRouter router = CrossChainRouter() # Mover $100 USDC de Base → Polygon automáticamente tx = router.bridge_assets( source_chain="BASE", target_chain="POLYGON", amount=100.0, token="USDC" ) print(f"Bridge completado: {tx}")

🤖 7. Gestión de Flotas (Sub-Agentes)

Para equipos de múltiples agentes. Un Agente Maestro puede crear y controlar "sub-agentes" especializados, cada uno con su propio presupuesto, límites y historial de transacciones aislado.

from iagent_pay.sub_agents import SubAgentManager # Agente Maestro con presupuesto total de $500 manager = SubAgentManager(master_budget_usd=500.0) # Crear sub-agentes especializados investigador = manager.create("investigador", daily_limit_usd=20.0) redactor = manager.create("redactor", daily_limit_usd=10.0) # El sub-agente verifica seguridad antes de gastar investigador.kernel.check(amount=5.0, recipient="0xDataAPI...") investigador.spend(5.0, "USDC", "Compra de datos de mercado") # Pausar un agente en emergencias manager.pause("investigador") print(manager.get_status())

🌐 8. Diccionario Global Completo (Todas las Redes)

El sistema tiene registro oficial de las siguientes redes y monedas. Puedes usar cualquier combinación al inicializar tu agente:

Red Monedas Soportadas Caso de Uso
Ethereum (ETH)USDC, USDT, DAI, EURC, CNHC (Yuan), GYEN (Yen), XSGD, MXNTAlta liquidez, seguridad máxima
Base (BASE)USDC, USDT, DAI, EURC, WETHComisiones mínimas, Coinbase
Polygon (MATIC)USDC, USDT, DAI, WETHMicropagos rápidos
Arbitrum (ARB)USDC, USDT, DAI, WETHAlta velocidad, bajo costo
BNB (Binance)USDC, USDT, BUSD, DAIEcosistema Binance
Solana (SOL)USDC nativo, SOLVelocidad extrema (4000+ TPS)
# Ejemplo: Agente especializado en mercado latinoamericano agente = AgentPay(chain_name="BNB", default_stablecoin="USDT") # Ejemplo: Agente para pagos europeos agente_eu = AgentPay(chain_name="ETH", default_stablecoin="EURC") # Ejemplo: Agente para Asia con Yuan chino agente_asia = AgentPay(chain_name="ETH", default_stablecoin="CNHC")

⚙️ 9. Safety Kernel Avanzado (Configuración Completa)

Más allá de los límites diarios, el Safety Kernel tiene 4 capas de protección configurables de forma independiente:

from iagent_pay.safety_kernel import SafetyKernel, SafetyConfig kernel = SafetyKernel(SafetyConfig( daily_limit_usd=100.0, # Máximo diario weekly_limit_usd=500.0, # Máximo semanal session_limit_usd=20.0, # Máximo por sesión max_tx_usd=10.0, # Máximo por transacción individual max_tx_per_minute=5, # Máximo velocidad: 5 tx por minuto max_tx_per_hour=50, # Máximo velocidad: 50 tx por hora human_approval_threshold_usd=50.0, # Sobre $50 pide aprobación humana allowed_recipients=["0xAlice...", "0xBob..."], # Lista blanca de direcciones enable_whitelist=True, # Activar lista blanca )) # Verificar ANTES de cada pago (bloquea si viola alguna regla) kernel.check(amount=5.0, recipient="0xAlice...", currency="USDC") # Consultar el estado del presupuesto en tiempo real print(kernel.get_status()) # Obtener el historial de auditoría forense completo auditoria = kernel.get_audit_log()

💳 10. Gestor de Billeteras (WalletManager)

El módulo que crea, importa y protege las llaves criptográficas de tu agente. Soporta Keystores cifrados con contraseña (AES-128) y archivos .env para desarrollo.

from iagent_pay.wallet_manager import WalletManager wm = WalletManager() # Crea o carga la billetera automáticamente # Si existe un Keystore cifrado, se usa esa (más segura) wallet = wm.get_or_create_wallet(password="MiContraseñaSegura123") print(f"Dirección del Agente: {wallet.address}") # Importar billetera desde clave privada existente wallet_importado = wm.load_wallet("0xTuLlavePrivadaAqui...") # Crear billetera temporal (efímera, para pruebas) wallet_nuevo = wm.create_wallet()

🔤 11. Resolver de Nombres Sociales (Social Resolver)

En lugar de pegar direcciones como 0x7F5E..., tu agente puede resolver nombres humanos como dominios ENS (Ethereum) o nombres de Solana.

from iagent_pay.social_resolver import SocialResolver resolver = SocialResolver() # Pagar usando un nombre ENS (.eth) direccion = resolver.resolve("vitalik.eth") print(f"Dirección resuelta: {direccion}") # → 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 # Pagar usando un nombre Solana (.sol) sol_address = resolver.resolve("example.sol") # Usar con AgentPay directamente tx = agente.pay_token(resolver.resolve("socio.eth"), amount=10.0)

🔔 12. Webhooks en Tiempo Real (WebhookManager)

Registra URLs que reciben notificaciones automáticas de tus agentes. Cada evento está firmado con HMAC-SHA256 (el mismo estándar de Stripe) para garantizar que nadie los falsifica.

from iagent_pay.webhooks import WebhookManager wm = WebhookManager(default_secret="clave-secreta-compartida") # Registrar un endpoint (tu servidor Flask, FastAPI, etc.) wm.register("https://tuservidor.com/webhook", events=["payment.completed", "budget.exceeded"]) # Emitir evento manualmente wm.emit("payment.completed", {"tx_hash": "0xabc...", "amount": 5.0, "currency": "USDC"}) # Handler local (sin necesidad de servidor HTTP) def mi_handler(evento): print(f"Evento recibido: {evento['type']}") wm.on("payment.completed", mi_handler) # Eventos disponibles: payment.completed, payment.failed, # budget.exceeded, human.approval_needed, swap.completed, agent.paused

👤 13. Aprobación Humana (Human-in-the-Loop)

Para pagos grandes, el agente puede pausar y solicitar aprobación humana vía Telegram, Slack o consola. Si el humano no responde antes del tiempo límite, el pago se cancela automáticamente.

from iagent_pay.human_loop import HumanApproval, HumanLoopConfig hitl = HumanApproval(HumanLoopConfig( threshold_usd=20.0, # Pedir aprobación para pagos > $20 timeout_seconds=300, # Esperar máximo 5 minutos notify_telegram_token="BOT_TOKEN", # Token del Bot de Telegram notify_telegram_chat_id="CHAT_ID", # Tu ID de chat )) # El agente intenta pagar $50 → automáticamente pausa y notifica aprobado = hitl.request_approval( amount=50.0, currency="USDC", recipient="0xProveedor...", reason="Compra de acceso a datos premium" ) if aprobado: agente.pay_token("0xProveedor...", 50.0) else: print("Pago cancelado por el humano o por tiempo.")

🔄 14. Motor de Swaps (SwapEngine)

Intercambia tokens automáticamente. El agente puede convertir ETH a USDC, SOL a BONK, o cualquier par disponible en los exchanges descentralizados Jupiter (Solana) y Uniswap (EVM).

from iagent_pay.swap_engine import SwapEngine # El swap engine se inicializa con el agente swap = agente.swap_engine # Consultar precio antes de intercambiar (cotización) cotizacion = swap.get_quote(input_token="SOL", output_token="USDC", amount=1.0) print(f"1 SOL ≈ {cotizacion['output']} USDC (Slippage: {cotizacion['slippage']}%)") # Ejecutar el swap con protección anti-deslizamiento resultado = swap.execute_swap( input_token="ETH", output_token="USDC", amount=0.5, min_output_amount=900.0 # No acepta menos de 900 USDC ) print(f"Swap exitoso! Tx: {resultado['tx_hash']}")

🛒 15. Mercado de Datos (Data Marketplace)

Un registro descentralizado donde tus agentes pueden comprar y vender datos. Funciona junto con el protocolo x402: el comprador busca el mejor proveedor, paga automáticamente y recibe los datos.

from iagent_pay.data_marketplace import DataMarketplace, DataProvider, get_marketplace marketplace = get_marketplace() # Vendedor: registrar tu API como proveedor de datos marketplace.register(DataProvider( name="MiClimaAPI", data_type="weather", url="https://miapi.com/v1/clima", price_usdc=0.05, trust_score=95.0 )) # Comprador: buscar el mejor proveedor de clima (precio < $0.10) mejor = marketplace.find_best_provider("weather", max_price_usd=0.10) print(f"Mejor proveedor: {mejor.name} a ${mejor.price_usdc} USDC") # Ver todos los proveedores disponibles todos = marketplace.list_all()

🤝 16. Sistema de Reputación (ReputationManager)

Cada agente mantiene un historial de reputación local (0-5 estrellas) de sus contrapartes. Antes de pagarle a un agente desconocido, puedes verificar si ha sido confiable en transacciones anteriores.

from iagent_pay.reputation_manager import ReputationManager # El ReputationManager viene integrado en el AgentPay rep = agente.reputation # Calificar a un agente después de una transacción exitosa rep.rate_peer("0xProveedor...", score=4.8) # 0 a 5 estrellas # Verificar la reputación antes de pagar confianza = rep.get_trust_score("0xDesconocido...") print(f"Puntaje de confianza: {confianza}/5.0") if confianza < 3.0: print("⚠️ Este agente tiene baja reputación, proceder con cautela.") # Ver la lista de agentes más confiables top_agentes = rep.get_top_agents(limit=5)

🤖 17. Integración con Claude y Cursor (MCP Server)

iAgentPay es compatible con el Protocolo MCP (Model Context Protocol), el estándar que usa Claude de Anthropic, Cursor, Windsurf y VS Code. Esto significa que Claude puede ordenarle directamente a tu agente que haga pagos con lenguaje natural.

# Iniciar el servidor MCP desde la terminal: # iagent-pay mcp-server # Configurar en tu archivo claude_desktop_config.json: # { # "mcpServers": { # "iagentpay": { # "command": "python", # "args": ["-m", "iagent_pay.mcp_server"] # } # } # } # Una vez conectado, Claude puede ejecutar comandos como: # "Págale 5 USDC a 0xBob..." # "¿Cuál es el balance de mi agente?" # "Haz un swap de 0.1 ETH a USDC" # "Muéstrame el historial de transacciones"

💻 18. Interfaz de Línea de Comandos (CLI)

iAgentPay incluye comandos de terminal para administrar y probar tus agentes sin escribir código Python.

# Crear un nuevo proyecto de agente desde cero iagent-pay init mi-agente-empresa # Ver el balance y estado de tu agente iagent-pay status --chain BASE # Obtener links de faucets (dinero de prueba gratuito) iagent-pay faucet # Iniciar el servidor MCP para conectar con Claude/Cursor iagent-pay mcp-server

🌐 19. Servidor x402 — Vende tus propios Datos

La otra cara del protocolo x402. Si tú tienes una API con datos valiosos (financieros, climáticos, legales, etc.), puedes protegerla y cobrar automáticamente en USDC a cualquier agente que quiera acceder. Compatible con Flask y FastAPI.

# --- Ejemplo con FastAPI --- from fastapi import FastAPI, Request from iagent_pay.x402_server import X402Middleware app = FastAPI() # Proteger TODAS las rutas bajo /premium con 0.10 USDC app.add_middleware( X402Middleware, payment_address="0xTuDireccionDePago...", amount_usdc=0.10, protected_paths=["/premium", "/api/v2"], network="BASE" ) @app.get("/premium/data") async def datos_premium(): return {"data": "Aquí van tus datos exclusivos"} # --- Ejemplo con Flask (decorador) --- from flask import Flask, jsonify from iagent_pay.x402_server import x402_flask app_flask = Flask(__name__) @app_flask.route("/datos-clima") @x402_flask(amount_usdc=0.05, payment_address="0xTuDireccion...", description="Datos del Clima") def clima(): return jsonify({"temperatura": "25°C", "ciudad": "CDMX"})

📊 20. Observabilidad y Monitoreo (PaymentObserver)

Panel de control en tiempo real con estadísticas de todos los pagos. Detecta patrones de gasto anómalos automáticamente e integra con Prometheus y OpenTelemetry para infraestructura enterprise.

from iagent_pay.observability import PaymentObserver, ObservabilityConfig, get_observer # Configurar observador con detección de anomalías observer = PaymentObserver(ObservabilityConfig( log_level="INFO", log_format="json", # Logs estructurados JSON enable_anomaly_detection=True, # Alerta si un pago es 3x el promedio anomaly_threshold_multiplier=3.0, enable_prometheus=True, # Exponer métricas en /metrics prometheus_port=9090, )) # Registrar eventos manualmente o dejarlo automático observer.record_payment(amount=5.0, currency="USDC", to="0xBob...", success=True) observer.record_x402(url="https://api.datos.com/v1", amount=0.01, success=True) # Ver el dashboard en la terminal observer.print_dashboard() # ╔══════════════════════════════════════════════╗ # ║ iAgentPay Observability Dashboard ║ # ║ Total Payments: 42 Success Rate: 98.0% ║ # ║ Total Spent: $127.50 ║ # ╚══════════════════════════════════════════════╝ # Obtener métricas para Prometheus/Grafana metricas = observer.get_prometheus_metrics() # Usar el observer global (singleton) obs_global = get_observer()

💵 21. Motor de Precios en Tiempo Real (PricingManager)

Consulta el precio actual de ETH, SOL y XRP desde 3 fuentes simultáneas (CoinGecko, Coinbase, APIs on-chain). Si una fuente falla, usa automáticamente la siguiente. Si todas fallan, usa el valor en cadena como fallback.

from iagent_pay.pricing import PricingManager pricing = PricingManager() # Obtener precios en tiempo real precio_eth = pricing.get_price("ETH") # → 3200.50 precio_sol = pricing.get_price("SOL") # → 145.30 precio_xrp = pricing.get_price("XRP") # → 0.52 print(f"1 ETH = ${precio_eth:.2f} USD") # Calcular cuántos tokens necesito para pagar $50 cantidad_eth = 50.0 / precio_eth print(f"Para pagar $50 necesito {cantidad_eth:.6f} ETH") # El PricingManager viene integrado automáticamente en AgentPay # agente.pricing.get_price("ETH")

🌊 22. Red XRP Ledger (XRPLDriver)

Soporte nativo para la red XRP Ledger, uno de los sistemas de pagos más rápidos del mundo (3-5 segundos de confirmación, menos de $0.001 por transacción). Ideal para pagos internacionales de alto volumen.

from iagent_pay.agent_pay import AgentPay # Inicializar agente en la red XRP agente_xrp = AgentPay(chain_name="XRP") # Cargar billetera XRP desde semilla secreta agente_xrp.xrpl.load_wallet("sYourXRPSecretSeedHere...") # Verificar balance en XRP balance = agente_xrp.xrpl.get_balance() print(f"Balance: {balance} XRP") # Enviar XRP a otro agente (confirmación en 3-5 segundos) tx_hash = agente_xrp.xrpl.transfer( recipient="rDestinationAddress...", amount_xrp=10.0, destination_tag=12345 # Para exchanges institucionales ) print(f"Tx XRP confirmada: {tx_hash}")

🎯 23. Tablero de Recompensas (MarketplaceBridge)

Tu agente puede publicar misiones o recompensas para que humanos realicen tareas específicas. Una vez completada la tarea, el agente libera el pago automáticamente.

from iagent_pay.marketplace_bridge import MarketplaceBridge bridge = MarketplaceBridge(agente) # Publicar una recompensa para que un humano realice una tarea bounty_id = bridge.post_bounty( title="Traduce 10 documentos legales al inglés", reward_usd=75.0 ) print(f"Recompensa publicada: ID {bounty_id}") # Ver todas las recompensas activas mis_bounties = bridge.list_my_bounties() # Una vez verificado el trabajo, el agente paga automáticamente bridge.release_payment(bounty_id, human_address="0xFreelancer...")

🦾 24. Integración con CrewAI

CrewAI es el framework más popular para crear equipos de agentes de IA colaborativos. Con esta integración, cualquier agente dentro de un Crew puede pagar a otros agentes o servicios de forma nativa.

from iagent_pay.integrations.crewai import iAgentPayCrewTool from crewai import Agent, Task, Crew # Crear la herramienta de pagos con límite de seguridad herramienta_pago = iAgentPayCrewTool(chain="BASE", max_amount_usdc=5.0) # Dar la herramienta al agente tesorero del equipo tesorero = Agent( role="Tesorero del Equipo", goal="Gestionar pagos entre miembros del equipo de IA", backstory="Experto en finanzas on-chain para equipos de agentes.", tools=[herramienta_pago], ) tarea_pago = Task( description="Paga 2 USDC a 0xBob... por completar el análisis de datos", agent=tesorero ) crew = Crew(agents=[tesorero], tasks=[tarea_pago]) resultado = crew.kickoff()

🔗 25. Integración con LangChain

LangChain es el framework de IA más usado en el mundo. Con esta integración, cualquier cadena o agente LangChain puede enviar pagos cripto como si fuera una herramienta normal.

from iagent_pay.integrations.langchain import iAgentPayTool from langchain.agents import initialize_agent, AgentType from langchain_openai import ChatOpenAI # Crear la herramienta de pagos para LangChain herramienta = iAgentPayTool() # Usa AgentPay automáticamente # Agregar la herramienta al agente LangChain llm = ChatOpenAI(model="gpt-4") agente_lc = initialize_agent( tools=[herramienta], llm=llm, agent=AgentType.OPENAI_FUNCTIONS, verbose=True ) # El agente decide cuándo y cómo pagar basado en el contexto resultado = agente_lc.run( "Paga 0.001 ETH a 0xProveedor... como compensación por el servicio de datos." )

💰 26. Modelo de Comisiones por Volumen Acumulado

iAgentPay implementa un modelo de comisiones ultra-competitivo y transparente basado en el volumen acumulado de transacciones. En lugar de cobrar comisiones de porcentaje caras por cada transacción individual, el sistema cobra una tarifa fija de $1.00 USD por cada $1,000.00 USD de volumen acumulado.

🔒 27. Modos de Seguridad Multifirma y Human-in-the-Loop

Tu agente puede configurarse para operar bajo tres esquemas de seguridad diferentes definidos en la propiedad multisig_mode de tu SafetyConfig:

from iagent_pay.safety_kernel import MultisigMode # 1. ALLOWANCE_ONLY (Solo Límites Autónomos) # El agente ejecuta autónomamente pagos por debajo del límite de aprobación. # Cualquier pago superior se cancelará inmediatamente sin pedir confirmación. agente.safety_config.multisig_mode = MultisigMode.ALLOWANCE_ONLY # 2. PROPOSAL_ONLY (Solo Firma / Propuesta de Multifirma) # Ninguna transacción es autónoma. Cada pago (incluso de $0.01) se detiene # y requiere aprobación / firma explícita del humano para ejecutarse. agente.safety_config.multisig_mode = MultisigMode.PROPOSAL_ONLY # 3. HYBRID (Híbrido - Autonomía y Gobernanza) # El agente transacciona libremente montos pequeños. Si un pago supera # el umbral, se detiene y pide confirmación en lugar de fallar. agente.safety_config.multisig_mode = MultisigMode.HYBRID

🔄 28. Auto-Balanceo de Liquidez (Auto-Swap Fallback)

Cuando tu agente necesita pagar en una stablecoin o token específico (por ejemplo, USDC) pero no cuenta con suficiente balance del mismo, iAgentPay puede balancear automáticamente la liquidez usando las tenencias en la moneda nativa del agente (ETH o SOL).

Esta opción es totalmente configurable por el desarrollador / usuario mediante el flag enable_auto_swap:

# Habilitar Auto-Balanceo (Comportamiento por defecto) # Si falta USDC pero hay ETH/SOL, realiza un swap automático en Uniswap/Jupiter agente = AgentPay(enable_auto_swap=True) # Deshabilitar Auto-Balanceo # Si no hay suficiente USDC, la transacción fallará inmediatamente indicando # que es necesario recargar liquidez en ese token específico. agente = AgentPay(enable_auto_swap=False)

🔑 29. Copia de Seguridad Cifrada (Backup & Restore)

Para mayor seguridad y portabilidad, puedes realizar una copia de seguridad cifrada con contraseña de las credenciales de tu agente, lo cual te permite exportarlas o importarlas fácilmente en cualquier entorno:

A. Desde el SDK (Código Python)

# Crear una copia de seguridad cifrada (AES-128/256 standard keystore) agente.backup_wallet("mi_respaldo.enc", password="MiContraseñaSegura123")

B. Desde la Consola (CLI)

# Crear copia de seguridad interactiva (te pedirá la contraseña de forma segura) iagent-pay backup mi_respaldo.enc # Restaurar copia de seguridad en un nuevo servidor iagent-pay restore mi_respaldo.enc

📦 30. Transacciones por Lotes (Batch Transactions / Multicall)

iAgentPay introduce el soporte para pagos concurrentes optimizados por lotes. En lugar de enviar transacciones secuencialmente y esperar por su confirmación, el agente puede enviar decenas de pagos de stablecoins al mismo tiempo utilizando una arquitectura de flujo canalizado (pipelined nonces) en EVM, y firmas SPL concurrentes en Solana. Esto reduce el consumo de gas hasta un 30% y acelera la velocidad de dispersión x10.

# Pagar a múltiples proveedores o sub-agentes en un solo lote pagos = [ {"recipient": "0xProveedorA...", "amount": 10.0}, {"recipient": "0xProveedorB...", "amount": 25.0}, {"recipient": "vitalik.eth", "amount": 5.0} # Auto-resolución ENS ] # Ejecutar el lote (con auto-balanceo de liquidez y safety limits verificados sobre el total acumulado) tx_hashes = agente.pay_token_batch(pagos, token="USDC", wait=True) print(f"Transacciones enviadas con éxito: {tx_hashes}")

🔄 31. Auto-Rotación de RPC con Backoff Exponencial y Rate Limit Guard

Para aplicaciones empresariales que requieren una alta disponibilidad ininterrumpida, iAgentPay implementa un sistema automatizado de tolerancia a fallos en la conexión de red RPC. Al detectar errores de tasa de límite (HTTP 429) o fallos de conexión de red, el agente aplica un backoff exponencial inteligente y conmuta automáticamente a sus nodos de respaldo previamente configurados sin interrumpir la ejecución del código.

# El sistema utiliza internamente _execute_rpc_with_backoff en cada llamada web3 # Si un nodo falla de forma persistente, el agente rota su proveedor RPC principal: agente.rotate_rpc() print(f"Conectado al nuevo proveedor RPC: {agente.w3.provider.endpoint_uri}")

Modo Empresa: Para las empresas que ofrecen sus agentes como servicio, iAgentPay soporta transacciones "Sin Gas" (Paymasters). Los usuarios finales nunca tienen que comprar criptomonedas para operar.

📊 32. Panel de Control Visual Corporativo (Solo Lectura)

Para garantizar el máximo nivel de ciberseguridad sin comprometer la transparencia, iAgentPay introduce un panel visual de monitoreo en tiempo real con diseño corporativo en tonos pastel. Por diseño de seguridad, este panel es estrictamente de Solo Lectura (Read-Only). Esto evita que actores maliciosos o atacantes que vulneren la interfaz web puedan alterar la configuración del agente, el Safety Kernel, o desviar fondos de la cuenta.

🧪 33. Sandbox de Simulaciones Interactivas Avanzadas

Para propósitos de demostración y pruebas rápidas, iAgentPay cuenta con un Entorno Sandbox de Simulaciones interactivo en el dashboard. Esto permite a los desarrolladores y clientes experimentar con todas las funciones autónomas que ofrecemos en tiempo real sin arriesgar fondos reales y con total retroalimentación visual.

📘 Official Reference Manual: iAgentPay (v8.5.0)

Welcome to iAgentPay, the most advanced payment infrastructure for AI Agents. This technical manual is designed to teach you how to unlock 100% of your agents' capabilities, allowing them to operate, charge, and invest autonomously on a global scale.

🌎 1. Global Support & Multi-Chain Architecture

iAgentPay is not just a local API; it is a global financial gateway. Our routing engine allows your agent to move money across the entire Web3 ecosystem.

The agent is "Currency Agnostic". Built-in currencies include: USDC, USDT, EURC (Euro), CNHC (Yuan), GYEN (Yen), MXNT (Peso).

from iagent_pay import AgentPay # Agent specialized in the Asian market agent = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. Core Features

A. Autonomous Payments (x402)

tx_hash = agent.pay_token( recipient_address="0xProvider...", amount=5.0 ) print(f"Payment completed: {tx_hash}")

B. Invoicing

Invoicing

If your AI performs a job for a client, it can generate a "Smart Invoice".

invoice_id = agent.invoices.create_invoice( amount=25.0, customer_address="0xClient...", description="Code Audit" )

🛡️ 3. Safety Kernel

Safety Kernel

Giving financial freedom to software requires hard limits. Validates every transaction before touching the network.

# Limit to max $15 per day agent = AgentPay(daily_limit=15.0) # Mint Identity identity = agent.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. Autonomous Treasury (DeFi)

DeFi Yield

Automatically deposit excess savings into global protocols like Aave v3, generating yield while you sleep.

# Keep $50 in cash, invest the rest agent.yield_manager.auto_invest(buffer_usd=50.0)

🏦 5. Fiat Bridge (Bank & Card Payments)

Client doesn't have crypto? No problem. iAgentPay connects directly to Stripe to deposit money into traditional bank accounts or charge credit cards.

from iagent_pay.fiat_bridge import FiatBridge bridge = FiatBridge() # Pay a freelancer to their bank account bridge.send_stripe(amount_usd=150.0, stripe_account_id="acct_1M2...", description="Biweekly payment") # Agent creates a payment link for card payments link = bridge.create_payment_link(amount_usd=9.99, description="Premium API Access") print(link["url"]) # → https://buy.stripe.com/... # Smart router: automatically decides USDC or Stripe bridge.smart_send(amount_usd=25.0, recipient="client@company.com")

🌉 6. Cross-Chain Routing (AP2 Engine)

The agent can hold money on one network (e.g. Ethereum) and pay on another (e.g. Polygon). The AP2 Engine evaluates all available bridges and selects the cheapest and fastest automatically.

from iagent_pay.cross_chain import CrossChainRouter router = CrossChainRouter() # Move $100 USDC from Base → Polygon automatically tx = router.bridge_assets( source_chain="BASE", target_chain="POLYGON", amount=100.0, token="USDC" ) print(f"Bridge complete: {tx}")

🤖 7. Fleet Management (Sub-Agents)

For multi-agent teams. A Master Agent can create and control specialized "sub-agents", each with their own budget, limits, and isolated transaction history.

from iagent_pay.sub_agents import SubAgentManager # Master agent with $500 total budget manager = SubAgentManager(master_budget_usd=500.0) # Create specialized sub-agents researcher = manager.create("researcher", daily_limit_usd=20.0) writer = manager.create("writer", daily_limit_usd=10.0) researcher.kernel.check(amount=5.0, recipient="0xDataAPI...") researcher.spend(5.0, "USDC", "Market data purchase") # Emergency pause manager.pause("researcher") print(manager.get_status())

🌐 8. Full Global Token Dictionary

Network Supported Tokens Use Case
Ethereum (ETH)USDC, USDT, DAI, EURC, CNHC (Yuan), GYEN (Yen), XSGD, MXNTHigh liquidity, max security
Base (BASE)USDC, USDT, DAI, EURC, WETHMinimal fees, Coinbase
Polygon (MATIC)USDC, USDT, DAI, WETHFast micropayments
Arbitrum (ARB)USDC, USDT, DAI, WETHHigh speed, low cost
BNB (Binance)USDC, USDT, BUSD, DAIBinance ecosystem
Solana (SOL)USDC native, SOLExtreme speed (4000+ TPS)
agent_latam = AgentPay(chain_name="BNB", default_stablecoin="USDT") agent_eu = AgentPay(chain_name="ETH", default_stablecoin="EURC") agent_asia = AgentPay(chain_name="ETH", default_stablecoin="CNHC")

⚙️ 9. Advanced Safety Kernel

from iagent_pay.safety_kernel import SafetyKernel, SafetyConfig kernel = SafetyKernel(SafetyConfig( daily_limit_usd=100.0, weekly_limit_usd=500.0, session_limit_usd=20.0, max_tx_usd=10.0, max_tx_per_minute=5, max_tx_per_hour=50, human_approval_threshold_usd=50.0, allowed_recipients=["0xAlice...", "0xBob..."], enable_whitelist=True, )) kernel.check(amount=5.0, recipient="0xAlice...", currency="USDC") print(kernel.get_status()) audit_log = kernel.get_audit_log()

💳 10. Wallet Manager

Creates, imports and protects your agent's cryptographic keys. Supports AES-128 encrypted keystores and .env files for development.

from iagent_pay.wallet_manager import WalletManager wm = WalletManager() # Create or load wallet automatically wallet = wm.get_or_create_wallet(password="MySecurePassword123") print(f"Agent Address: {wallet.address}") # Import existing wallet from private key imported = wm.load_wallet("0xYourPrivateKeyHere...") # Create ephemeral wallet (for testing) temp_wallet = wm.create_wallet()

🔤 11. Social Name Resolver

Instead of copying addresses like 0x7F5E..., your agent can resolve human-readable names like ENS domains or Solana Name Service.

from iagent_pay.social_resolver import SocialResolver resolver = SocialResolver() # Pay using ENS name address = resolver.resolve("vitalik.eth") # → 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 # Pay using Solana name sol_address = resolver.resolve("example.sol") # Use directly with AgentPay tx = agent.pay_token(resolver.resolve("partner.eth"), amount=10.0)

🔔 12. Real-Time Webhooks

Register URLs that receive automatic notifications from your agents. Each event is signed with HMAC-SHA256 (Stripe's same standard) to prevent forgery.

from iagent_pay.webhooks import WebhookManager wm = WebhookManager(default_secret="my-shared-secret") wm.register("https://myserver.com/webhook", events=["payment.completed", "budget.exceeded"]) # Emit event manually wm.emit("payment.completed", {"tx_hash": "0xabc...", "amount": 5.0}) # Local handler (no HTTP server needed) def my_handler(event): print(f"Event received: {event['type']}") wm.on("payment.completed", my_handler) # Available events: payment.completed, payment.failed, # budget.exceeded, human.approval_needed, swap.completed, agent.paused

👤 13. Human-in-the-Loop Approval

For large payments, the agent pauses and requests human approval via Telegram, Slack, or console. If no response within the timeout, the payment is automatically cancelled.

from iagent_pay.human_loop import HumanApproval, HumanLoopConfig hitl = HumanApproval(HumanLoopConfig( threshold_usd=20.0, # Ask approval for payments > $20 timeout_seconds=300, # Wait max 5 minutes notify_telegram_token="BOT_TOKEN", notify_telegram_chat_id="CHAT_ID", )) approved = hitl.request_approval( amount=50.0, currency="USDC", recipient="0xVendor...", reason="Premium data access purchase" ) if approved: agent.pay_token("0xVendor...", 50.0)

🔄 14. Swap Engine

Exchange tokens automatically. The agent can convert ETH to USDC, SOL to BONK, or any pair on Jupiter (Solana) and Uniswap (EVM).

swap = agent.swap_engine # Get a price quote before swapping quote = swap.get_quote(input_token="SOL", output_token="USDC", amount=1.0) print(f"1 SOL ≈ {quote['output']} USDC (Slippage: {quote['slippage']}%)") # Execute swap with slippage protection result = swap.execute_swap( input_token="ETH", output_token="USDC", amount=0.5, min_output_amount=900.0 # Reject if less than 900 USDC received ) print(f"Swap successful! Tx: {result['tx_hash']}")

🛒 15. Data Marketplace

A decentralized registry where your agents can buy and sell data. Works with x402: the buyer finds the best provider, pays automatically, and receives the data.

from iagent_pay.data_marketplace import DataMarketplace, DataProvider, get_marketplace marketplace = get_marketplace() # Seller: register your API as a data provider marketplace.register(DataProvider( name="MyWeatherAPI", data_type="weather", url="https://myapi.com/v1/weather", price_usdc=0.05, trust_score=95.0 )) # Buyer: find best weather provider under $0.10 best = marketplace.find_best_provider("weather", max_price_usd=0.10) print(f"Best: {best.name} at ${best.price_usdc}")

🤝 16. Reputation System

Each agent maintains a local reputation ledger (0-5 stars) for its counterparts. Before paying an unknown agent, check their track record.

rep = agent.reputation # Rate a peer after a successful transaction rep.rate_peer("0xVendor...", score=4.8) # Check reputation before paying trust = rep.get_trust_score("0xUnknown...") if trust < 3.0: print("Low trust agent — proceed with caution.") # View most trusted agents top = rep.get_top_agents(limit=5)

🤖 17. Claude & Cursor Integration (MCP Server)

iAgentPay is fully compatible with the Model Context Protocol (MCP), used by Claude, Cursor, Windsurf, and VS Code. Claude can directly instruct your agent to make payments in natural language.

# Start MCP server from terminal: # iagent-pay mcp-server # Configure in claude_desktop_config.json: # { # "mcpServers": { # "iagentpay": { # "command": "python", # "args": ["-m", "iagent_pay.mcp_server"] # } # } # } # Once connected, Claude can say: # "Pay 5 USDC to 0xBob..." # "What is my agent balance?" # "Swap 0.1 ETH to USDC" # "Show recent transaction history"

💻 18. Command Line Interface (CLI)

iAgentPay includes terminal commands to manage and test agents without writing Python code.

# Create a new agent project from scratch iagent-pay init my-enterprise-agent # View agent balance and status iagent-pay status --chain BASE # Get testnet faucet links (free test money) iagent-pay faucet # Start the MCP server for Claude/Cursor integration iagent-pay mcp-server

🌐 19. x402 Server — Sell Your Own Data

The other side of the x402 protocol. If you have an API with valuable data (financial, weather, legal, etc.), you can protect it and automatically charge USDC to any agent that wants access. Compatible with Flask and FastAPI.

# --- FastAPI Example --- from fastapi import FastAPI, Request from iagent_pay.x402_server import X402Middleware app = FastAPI() # Protect all /premium routes for 0.10 USDC app.add_middleware( X402Middleware, payment_address="0xYourPaymentAddress...", amount_usdc=0.10, protected_paths=["/premium", "/api/v2"], network="BASE" ) @app.get("/premium/data") async def premium_data(): return {"data": "Your exclusive data here"} # --- Flask Example (decorator) --- from iagent_pay.x402_server import x402_flask @app_flask.route("/weather-data") @x402_flask(amount_usdc=0.05, payment_address="0xYourAddress...", description="Weather Data") def weather(): return jsonify({"temperature": "25°C", "city": "NYC"})

📊 20. Observability & Monitoring

Real-time dashboard with statistics for all payments. Automatically detects anomalous spending patterns and integrates with Prometheus and OpenTelemetry for enterprise infrastructure.

from iagent_pay.observability import PaymentObserver, ObservabilityConfig observer = PaymentObserver(ObservabilityConfig( log_level="INFO", log_format="json", enable_anomaly_detection=True, anomaly_threshold_multiplier=3.0, enable_prometheus=True, prometheus_port=9090, )) observer.record_payment(amount=5.0, currency="USDC", to="0xBob...", success=True) # Print terminal dashboard observer.print_dashboard() # ╔══════════════════════════════════════════════╗ # ║ iAgentPay Observability Dashboard ║ # ║ Total Payments: 42 Success Rate: 98.0% ║ # ╚══════════════════════════════════════════════╝ # Prometheus metrics for Grafana metrics = observer.get_prometheus_metrics()

💵 21. Real-Time Pricing Engine

Queries current prices of ETH, SOL, and XRP from 3 simultaneous sources. Automatically falls back to the next source if one fails.

from iagent_pay.pricing import PricingManager pricing = PricingManager() eth_price = pricing.get_price("ETH") # → 3200.50 sol_price = pricing.get_price("SOL") # → 145.30 # Calculate how many tokens needed to pay $50 eth_needed = 50.0 / eth_price print(f"To pay $50 you need {eth_needed:.6f} ETH")

🌊 22. XRP Ledger Network

Native support for XRP Ledger, one of the fastest payment networks in the world (3-5 second confirmation, under $0.001 per transaction). Ideal for high-volume international payments.

from iagent_pay.agent_pay import AgentPay agent_xrp = AgentPay(chain_name="XRP") agent_xrp.xrpl.load_wallet("sYourXRPSecretSeedHere...") balance = agent_xrp.xrpl.get_balance() print(f"Balance: {balance} XRP") # Send XRP (confirmed in 3-5 seconds) tx_hash = agent_xrp.xrpl.transfer( recipient="rDestinationAddress...", amount_xrp=10.0, destination_tag=12345 ) print(f"XRP Tx confirmed: {tx_hash}")

🎯 23. Bounty Marketplace (MarketplaceBridge)

Your agent can post bounties for humans to complete specific tasks. Once the task is verified, the agent releases payment automatically.

from iagent_pay.marketplace_bridge import MarketplaceBridge bridge = MarketplaceBridge(agent) # Post a bounty for a human task bounty_id = bridge.post_bounty( title="Translate 10 legal documents to Spanish", reward_usd=75.0 ) # View active bounties my_bounties = bridge.list_my_bounties() # Once work is verified, agent pays automatically bridge.release_payment(bounty_id, human_address="0xFreelancer...")

🦾 24. CrewAI Integration

CrewAI is the most popular framework for building collaborative AI agent teams. With this integration, any agent in a Crew can pay other agents or services natively.

from iagent_pay.integrations.crewai import iAgentPayCrewTool from crewai import Agent, Task, Crew # Create payment tool with safety limit pay_tool = iAgentPayCrewTool(chain="BASE", max_amount_usdc=5.0) treasurer = Agent( role="Team Treasurer", goal="Manage payments between AI team members", tools=[pay_tool], ) pay_task = Task( description="Pay 2 USDC to 0xBob... for completing data analysis", agent=treasurer ) crew = Crew(agents=[treasurer], tasks=[pay_task]) result = crew.kickoff()

🔗 25. LangChain Integration

LangChain is the world's most used AI framework. With this integration, any LangChain chain or agent can send crypto payments as a native tool.

from iagent_pay.integrations.langchain import iAgentPayTool from langchain.agents import initialize_agent, AgentType from langchain_openai import ChatOpenAI pay_tool = iAgentPayTool() llm = ChatOpenAI(model="gpt-4") lc_agent = initialize_agent( tools=[pay_tool], llm=llm, agent=AgentType.OPENAI_FUNCTIONS, verbose=True ) result = lc_agent.run( "Pay 0.001 ETH to 0xVendor... as compensation for data services." )

💰 26. Volume Accumulation Fee Model

iAgentPay implements an ultra-competitive and transparent pricing fee structure based on accumulated transaction volume. Instead of charging expensive percentage-based fees on individual transactions, the system logs total transaction volume in the background and settles a flat fee of $1.00 USD for every $1,000.00 USD of total volume transacted.

🔒 27. Multisig & Human-in-the-Loop Security Modes

Your agent can be configured to run under three distinct security and governance schemes using the multisig_mode property in your SafetyConfig:

from iagent_pay.safety_kernel import MultisigMode # 1. ALLOWANCE_ONLY (Autonomous Limits Only) # The agent executes payments autonomously under the threshold. # Any transaction exceeding the limit is aborted immediately without prompt. agent.safety_config.multisig_mode = MultisigMode.ALLOWANCE_ONLY # 2. PROPOSAL_ONLY (Proposal & Multisig Signing Only) # No autonomous payments allowed. Every transaction (even $0.01) is paused # and requests a manual signature/approval from the human administrator. agent.safety_config.multisig_mode = MultisigMode.PROPOSAL_ONLY # 3. HYBRID (Hybrid — Autonomy & Governance) # The agent transacts autonomously for small payments. If a payment exceeds # the threshold, the SDK pauses and requests human approval instead of failing. agent.safety_config.multisig_mode = MultisigMode.HYBRID

🔄 28. Auto-Liquidity-Balancing (Auto-Swap Fallback)

When your agent needs to make a payment in a specific stablecoin or token (e.g. USDC) but does not have enough balance, iAgentPay can automatically balance liquidity by swapping the agent's native holdings (ETH or SOL).

This feature is fully configurable by the developer / user via the enable_auto_swap config flag:

# Enable Auto-Balancing (Default Behavior) # Swaps ETH/SOL automatically on Uniswap/Jupiter to cover missing stablecoin balance agent = AgentPay(enable_auto_swap=True) # Disable Auto-Balancing # If USDC balance is insufficient, the transaction fails immediately. # The agent will prompt the user to manually reload liquidity in that specific token. agent = AgentPay(enable_auto_swap=False)

🔑 29. Encrypted Key Backup & Restore

For enhanced portability and security, you can create a password-encrypted backup of your agent's credentials. This allows you to securely export and import them to any new server or environment:

A. Via the SDK (Python Code)

# Create password-encrypted backup (AES-128/256 standard Web3 keystore format) agent.backup_wallet("backup_wallet.enc", password="MySecureBackupPassword123")

B. Via the CLI

# Create an interactive encrypted backup (prompts securely for password) iagent-pay backup backup_wallet.enc # Restore the backup to a new server/active local agent keystore iagent-pay restore backup_wallet.enc

📦 30. Batch Transactions (Pipelined Multicall)

iAgentPay introduces support for optimized concurrent batch payments. Instead of sending transactions sequentially and waiting for confirmation, the agent can send dozens of stablecoin payments simultaneously using a pipelined nonce architecture on EVM and concurrent SPL transfers on Solana. This reduces gas overhead by up to 30% and accelerates payouts by 10x.

# Pay multiple vendors or sub-agents in a single batch payments = [ {"recipient": "0xVendorA...", "amount": 10.0}, {"recipient": "0xVendorB...", "amount": 25.0}, {"recipient": "vitalik.eth", "amount": 5.0} # Automatic ENS resolution ] # Execute the batch (with auto-liquidity balancing and safety limits evaluated on the cumulative sum) tx_hashes = agent.pay_token_batch(payments, token="USDC", wait=True) print(f"Transactions successfully broadcasted: {tx_hashes}")

🔄 31. RPC Auto-Rotation with Exponential Backoff & Rate Limit Guard

For enterprise-grade applications requiring uninterrupted high-availability, iAgentPay implements an automated RPC network connection failover system. Upon detecting rate limits (HTTP 429) or persistent connection drops, the agent applies an intelligent exponential backoff and automatically rotates to alternative backup nodes without halting execution.

# The SDK automatically wraps all web3 calls in _execute_rpc_with_backoff # If a node exhibits persistent failures, the agent rotates to the next node: agent.rotate_rpc() print(f"Switched to backup RPC provider: {agent.w3.provider.endpoint_uri}")

Enterprise Mode: For companies offering agents as a service, iAgentPay supports "Gasless" transactions (Paymasters). End users never have to buy crypto to operate.

📊 32. Corporate Visual Dashboard (Read-Only)

To guarantee the highest level of cybersecurity without compromising transparency, iAgentPay introduces a real-time visual monitoring dashboard with a clean pastel corporate design. By security design, this panel is strictly Read-Only. This prevents malicious actors or attackers from modifying agent configurations, altering the Safety Kernel, or draining funds through web interface exploits.

🧪 33. Advanced Interactive Simulation Sandbox

For demonstration and quick-testing purposes, iAgentPay features an interactive Simulation Sandbox Environment on the dashboard. This allows developers and clients to experiment with all autonomous capabilities in real time without risking real funds, coupled with complete visual telemetry feedback.

📘 官方参考手册:iAgentPay (v8.5.0)

欢迎来到 iAgentPay,这是为人工智能代理提供的最先进支付基础设施。本技术手册旨在教您如何解锁代理 100% 的能力,使其能够在全球范围内自主运营、收费和投资。

🌎 1. 全球支持和多链架构

Architecture Diagram

iAgentPay 不仅仅是一个本地 API;它是一个全球金融网关。我们的路由引擎允许您的代理在整个 Web3 生态系统中转移资金。

代理是“货币不可知论者”。内置货币包括:USDC, USDT, EURC(欧元), CNHC(人民币), GYEN(日元), MXNT(比索)。

from iagent_pay import AgentPay # 专注于亚洲市场的代理 agent = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. 核心功能

A. 自主支付 (x402)

tx_hash = agent.pay_token( recipient_address="0xProvider...", amount=5.0 ) print(f"支付完成: {tx_hash}")

B. 开具发票 (Invoicing)

Invoicing

如果您的 AI 为客户完成工作,它可以生成“智能发票”。

invoice_id = agent.invoices.create_invoice( amount=25.0, customer_address="0xClient...", description="代码审计" )

🛡️ 3. 安全内核 (Safety Kernel)

Safety Kernel

赋予软件财务自由需要严格的限制。在接触网络之前验证每笔交易。

# 每天最多限制 15 美元 agent = AgentPay(daily_limit=15.0) # 铸造身份 identity = agent.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. 自主国库 (DeFi)

DeFi Yield

自动将多余的储蓄存入像 Aave v3 这样的全球协议,在您睡觉时产生收益。

# 保留 50 美元现金,其余投资 agent.yield_manager.auto_invest(buffer_usd=50.0)

企业模式: 对于提供代理即服务的公司,iAgentPay 支持“无 Gas”交易(Paymasters)。最终用户永远不需要购买加密货币即可操作。

📊 32. 企业级可视化控制面板 (只读模式)

为了在不影响透明度的前提下保证最高级别的网络安全,iAgentPay 引入了具有干净淡雅企业色彩的实时可视化监控面板。从安全设计的角度出发,此面板严格处于只读 (Read-Only) 模式。这防止了恶意人员通过 Web 界面篡改代理配置、修改安全内核 (Safety Kernel) 或窃取资金。

🧪 33. 高级交互式模拟沙盒 (Sandbox)

为了便于演示和快速测试,iAgentPay 控制面板包含一个交互式 模拟沙盒环境。这允许开发人员和客户实时体验我们提供的所有自主功能,而无需冒着损失真实资金的风险,并获得完整的可视化遥测反馈。

📘 आधिकारिक संदर्भ मैनुअल: iAgentPay (v8.5.0)

iAgentPay में आपका स्वागत है, जो AI एजेंट्स के लिए सबसे उन्नत भुगतान बुनियादी ढांचा है। यह तकनीकी मैनुअल आपको सिखाने के लिए डिज़ाइन किया गया है कि अपने एजेंट्स की 100% क्षमताओं को कैसे अनलॉक करें, जिससे वे वैश्विक स्तर पर स्वायत्त रूप से काम कर सकें, शुल्क ले सकें और निवेश कर सकें।

🌎 1. वैश्विक समर्थन और मल्टी-चेन आर्किटेक्चर

Architecture Diagram

iAgentPay सिर्फ एक स्थानीय API नहीं है; यह एक वैश्विक वित्तीय गेटवे है। हमारा रूटिंग इंजन आपके एजेंट को पूरे Web3 इकोसिस्टम में पैसा ट्रांसफर करने की अनुमति देता है।

एजेंट "मुद्रा अज्ञेयवादी" है। अंतर्निहित मुद्राओं में शामिल हैं: USDC, USDT, EURC (यूरो), CNHC (चीनी युआन), GYEN (जापानी येन), MXNT (मैक्सिकन पेसो)।

from iagent_pay import AgentPay # एशियाई बाजार में विशेषज्ञ एजेंट agent = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. मुख्य विशेषताएं

A. स्वायत्त भुगतान (x402)

tx_hash = agent.pay_token( recipient_address="0xProvider...", amount=5.0 ) print(f"भुगतान पूरा हुआ: {tx_hash}")

B. चालान जनरेशन (Invoicing)

Invoicing

यदि आपका AI क्लाइंट के लिए काम करता है, तो यह एक "स्मार्ट इनवॉइस" उत्पन्न कर सकता है।

invoice_id = agent.invoices.create_invoice( amount=25.0, customer_address="0xClient...", description="कोड ऑडिट" )

🛡️ 3. सेफ्टी कर्नेल (Safety Kernel)

Safety Kernel

सॉफ्टवेयर को वित्तीय स्वतंत्रता देने के लिए सख्त सीमाओं की आवश्यकता होती है। नेटवर्क को छूने से पहले हर लेन-देन को सत्यापित करता है।

# प्रतिदिन अधिकतम $15 तक सीमित करें agent = AgentPay(daily_limit=15.0) # पहचान बनाएँ identity = agent.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. स्वायत्त खजाना (DeFi)

DeFi Yield

अतिरिक्त बचत को स्वचालित रूप से Aave v3 जैसे वैश्विक प्रोटोकॉल में जमा करें, जिससे आपके सोते समय भी ब्याज उत्पन्न हो।

# $50 नकद रखें, बाकी निवेश करें agent.yield_manager.auto_invest(buffer_usd=50.0)

एंटरप्राइज मोड: उन कंपनियों के लिए जो सेवा के रूप में एजेंट प्रदान करती हैं, iAgentPay "गैसलेस" (Paymasters) लेन-देन का समर्थन करता है। अंतिम उपयोगकर्ताओं को संचालित करने के लिए कभी भी क्रिप्टो खरीदने की आवश्यकता नहीं होती है।

📊 32. कॉर्पोरेट विज़ुअल डैशबोर्ड (केवल-पठन)

बिना पारदर्शिता से समझौता किए उच्चतम स्तर की साइबर सुरक्षा की गारंटी के लिए, iAgentPay एक साफ पेस्टल कॉर्पोरेट डिज़ाइन के साथ वास्तविक समय विज़ुअल मॉनिटरिंग डैशबोर्ड पेश करता है। सुरक्षा डिज़ाइन के अनुसार, यह पैनल **कड़ाई से केवल-पठन (Read-Only)** है। यह दुर्भावनापूर्ण अभिनेताओं को वेब इंटरफेस के माध्यम से एजेंट कॉन्फ़िगरेशन को बदलने, सेफ्टी कर्नेल को संशोधित करने या धन निकालने से रोकता है

🧪 33. उन्नत इंटरएक्टिव सिमुलेशन सैंडबॉक्स (Sandbox)

प्रदर्शन और त्वरित परीक्षण उद्देश्यों के लिए, iAgentPay डैशबोर्ड पर एक इंटरैक्टिव सिमुलेशन सैंडबॉक्स वातावरण प्रदान करता है। यह डेवलपर्स और ग्राहकों को वास्तविक धन को जोखिम में डाले बिना वास्तविक समय में हमारी सभी स्वायत्त सुविधाओं का अनुभव करने की अनुमति देता है।

📘 دليل المرجع الرسمي: iAgentPay (v8.5.0)

مرحبًا بك في iAgentPay، البنية التحتية للمدفوعات الأكثر تقدمًا لوكلاء الذكاء الاصطناعي. تم تصميم هذا الدليل الفني لتعليمك كيفية فتح 100٪ من قدرات وكلائك، مما يسمح لهم بالعمل والتحصيل والاستثمار بشكل مستقل على نطاق عالمي.

🌎 1. الدعم العالمي وبنية السلاسل المتعددة

Architecture Diagram

iAgentPay ليست مجرد واجهة برمجة تطبيقات محلية؛ إنها بوابة مالية عالمية. يسمح محرك التوجيه الخاص بنا لوكيلك بنقل الأموال عبر نظام Web3 بالكامل.

الوكيل "لا يعتمد على عملة معينة". العملات المدمجة تشمل: USDC, USDT, EURC (اليورو), CNHC (اليوان الصيني), GYEN (الين الياباني), MXNT (البيزو المكسيكي).

from iagent_pay import AgentPay # وكيل يركز على الأسواق الآسيوية agent = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. الميزات الرئيسية

أ. الدفع الذاتي (x402)

tx_hash = agent.pay_token( recipient_address="0xProvider...", amount=5.0 ) print(f"اكتمل الدفع: {tx_hash}")

ب. إصدار الفواتير (Invoicing)

Invoicing

إذا كان الذكاء الاصطناعي الخاص بك يكمل عملاً لعميل، فيمكنه إنشاء "فاتورة ذكية".

invoice_id = agent.invoices.create_invoice( amount=25.0, customer_address="0xClient...", description="تدقيق الكود" )

🛡️ 3. نواة الأمان (Safety Kernel)

Safety Kernel

منح البرمجيات الحرية المالية يتطلب قيودًا صارمة. يتم التحقق من كل معاملة قبل إرسالها إلى الشبكة.

# حد أقصى 15 دولارًا في اليوم agent = AgentPay(daily_limit=15.0) # صك الهوية identity = agent.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. الخزانة المستقلة (DeFi)

DeFi Yield

قم بإيداع المدخرات الزائدة تلقائيًا في بروتوكولات عالمية مثل Aave v3 لتوليد عوائد أثناء نومك.

# احتفظ بـ 50 دولارًا نقدًا واستثمر الباقي agent.yield_manager.auto_invest(buffer_usd=50.0)

وضع المؤسسات: بالنسبة للشركات التي تقدم وكلاء كخدمة، يدعم iAgentPay المعاملات "الخالية من الغاز" (Paymasters). لا يحتاج المستخدمون النهائيون أبدًا إلى شراء عملات مشفرة للتشغيل.

📊 32. لوحة التحكم المرئية للمؤسسات (للقراءة فقط)

لضمان أعلى مستويات الأمن السيبراني دون المساومة на الشفافية، تقدم iAgentPay لوحة مراقبة مرئية في الوقت الفعلي بتصميم ألوان مهدئة للمؤسسات. وتصميمًا للأمان، تكون هذه اللوحة **للقراءة فقط (Read-Only) بشكل صارم**. هذا يمنع الجهات الخبيثة من تغيير تكوينات الوكيل، أو تعديل نواة الأمان (Safety Kernel)، أو سحب الأموال عبر واجهة الويب.

🧪 33. بيئة محاكاة تفاعلية متقدمة (Sandbox)

لأغراض العرض والاختبار السريع، تتضمن لوحة معلومات iAgentPay بيئة محاكاة تفاعلية (Sandbox). يتيح ذلك للمطورين والعملاء تجربة جميع الميزات المستقلة في الوقت الفعلي دون المخاطرة بأموال حقيقية.

📘 Manual de Referência Oficial: iAgentPay (v8.5.0)

Bem-vindo ao iAgentPay, a infraestrutura de pagamentos mais avançada para Agentes de Inteligência Artificial. Este manual técnico foi projetado para ensinar você a desbloquear 100% das capacidades dos seus agentes, permitindo-lhes operar, cobrar e investir autonomamente em escala global.

🌎 1. Suporte Global e Arquitetura Multi-Chain

Architecture Diagram

O iAgentPay não é apenas uma API local; é um gateway financeiro global. Nosso mecanismo de roteamento permite que seu agente mova fundos por todo o ecossistema Web3.

O agente é "agnóstico à moeda". Moedas integradas incluem: USDC, USDT, EURC (Euro), CNHC (Yuan chinês), GYEN (Iene japonês), MXNT (Peso mexicano).

from iagent_pay import AgentPay # Agente com foco no mercado asiático agent = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. Recursos Principais

A. Pagamentos Autônomos (x402)

tx_hash = agent.pay_token( recipient_address="0xProvider...", amount=5.0 ) print(f"Pagamento concluído: {tx_hash}")

B. Emissão de Faturas (Invoicing)

Invoicing

Se a sua IA conclui um trabalho para um cliente, ela pode gerar uma "fatura inteligente".

invoice_id = agent.invoices.create_invoice( amount=25.0, customer_address="0xClient...", description="Auditoria de Código" )

🛡️ 3. Kernel de Segurança (Safety Kernel)

Safety Kernel

Dar liberdade financeira a softwares exige limites rígidos. Verifica cada transação antes de tocar na rede.

# Limita a no máximo $15 por dia agent = AgentPay(daily_limit=15.0) # Emitir identidade identity = agent.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. Tesouraria Autônoma (DeFi)

DeFi Yield

Deposite automaticamente economias excedentes em protocolos globais como Aave v3, gerando rendimento enquanto você dorme.

# Mantém $50 em caixa, investe o restante agent.yield_manager.auto_invest(buffer_usd=50.0)

Modo Enterprise: Para empresas que fornecem agentes como serviço, o iAgentPay suporta transações "gasless" (Paymasters). Os usuários finais nunca precisam comprar cripto para operar.

📊 32. Painel Visual Corporativo (Apenas Leitura)

Para garantir os mais altos níveis de segurança cibernética sem comprometer a transparência, o iAgentPay apresenta um painel de monitoramento visual em tempo real com cores pastéis corporativas limpas. Por design de segurança, este painel é **estritamente de apenas leitura (Read-Only)**. Isso impede que agentes maliciosos alterem a configuração do agente, modifiquem o Kernel de Segurança (Safety Kernel) ou retirem fundos através da interface web.

🧪 33. Sandbox de Simulação Interativa Avançada (Sandbox)

Para fins de demonstração e teste rápido, o painel do iAgentPay inclui um ambiente interativo de sandbox de simulação. Isso permite que desenvolvedores e clientes experimentem todos os nossos recursos autônomos em tempo real, sem arriscar fundos reais.

📘 Официальное справочное руководство: iAgentPay (v8.5.0)

Добро пожаловать в iAgentPay, самую передовую платежную инфраструктуру для агентов искусственного интеллекта. Это техническое руководство разработано, чтобы научить вас раскрывать 100% возможностей ваших агентов, позволяя им автономно работать, взимать плату и инвестировать в глобальном масштабе.

🌎 1. Глобальная поддержка и мультичейн-архитектура

Architecture Diagram

iAgentPay — это не просто локальный API; это глобальный финансовый шлюз. Наш механизм маршрутизации позволяет вашему агенту перемещать средства по всей экосистеме Web3.

Агент не зависит от конкретной монеты. Поддерживаемые валюты включают: USDC, USDT, EURC (Евро), CNHC (Китайский юань), GYEN (Японская иена), MXNT (Мексиканское песо).

from iagent_pay import AgentPay # Агент с фокусом на азиатский рынок agent = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. Ключевые особенности

A. Автономные платежи (x402)

tx_hash = agent.pay_token( recipient_address="0xProvider...", amount=5.0 ) print(f"Платеж выполнен: {tx_hash}")

B. Выставление счетов (Invoicing)

Invoicing

Если ваш ИИ выполняет работу для клиента, он может создать «умный счет».

invoice_id = agent.invoices.create_invoice( amount=25.0, customer_address="0xClient...", description="Аудит кода" )

🛡️ 3. Ядро безопасности (Safety Kernel)

Safety Kernel

Предоставление программному обеспечению финансовой свободы требует строгих ограничений. Проверяет каждую транзакцию перед отправкой в сеть.

# Ограничение до $15 в день agent = AgentPay(daily_limit=15.0) # Выпуск идентификатора identity = agent.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. Автономное казначейство (DeFi)

DeFi Yield

Автоматически вносите избыточные сбережения в глобальные протоколы, такие как Aave v3, получая доход, пока вы спите.

# Хранить $50 наличными, остальное инвестировать agent.yield_manager.auto_invest(buffer_usd=50.0)

Корпоративный режим: Для компаний, предоставляющих агентов как услугу, iAgentPay поддерживает транзакции без комиссии за газ (Paymasters). Конечным пользователям не нужно покупать криптовалюту.

📊 32. Корпоративная визуальная панель управления (только для чтения)

Чтобы гарантировать высочайший уровень кибербезопасности без ущерба для прозрачности, iAgentPay представляет визуальную панель мониторинга в реальном времени с чистыми пастельными корпоративными цветами. В целях безопасности эта панель **строго работает в режиме "только для чтения" (Read-Only)**. Это предотвращает изменение конфигурации агента, модификацию ядра безопасности (Safety Kernel) или вывод средств злоумышленниками через веб-интерфейс.

🧪 33. Продвинутая интерактивная песочница симуляции (Sandbox)

Для демонстрации и быстрого тестирования панель управления iAgentPay включает интерактивную симуляционную песочницу. Это позволяет разработчикам и клиентам тестировать все наши автономные функции в реальном времени без риска потери реальных средств.

📘 公式リファレンスマニュアル: iAgentPay (v8.5.0)

iAgentPay へようこそ。これは AI エージェント向けに設計された最先端の決済インフラストラクチャです。この技術マニュアルは、エージェントの能力を 100% 引き出し、グローバル規模で自律的な運用、課金、および投資を行えるようにするためのものです。

🌎 1. グローバルサポートとマルチチェーンアーキテクチャ

Architecture Diagram

iAgentPay は単なるローカル API ではありません。グローバルな金融ゲートウェイです。ルーティングエンジンにより、エージェントは Web3 エコシステム全体で資金を移動できます。

エージェントは通貨に依存しません。対応通貨:USDC, USDT, EURC (ユーロ), CNHC (オフショア人民元), GYEN (日本円), MXNT (メキシコペソ)。

from iagent_pay import AgentPay # アジア市場に特化したエージェント agent = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. 主な機能

A. 自律的な支払い (x402)

tx_hash = agent.pay_token( recipient_address="0xProvider...", amount=5.0 ) print(f"支払い完了: {tx_hash}")

B. 請求書生成 (Invoicing)

Invoicing

AI がクライアント向けのタスクを完了した際、「スマート請求書」を作成できます。

invoice_id = agent.invoices.create_invoice( amount=25.0, customer_address="0xClient...", description="コード監査" )

🛡️ 3. セーフティカーネル (Safety Kernel)

Safety Kernel

ソフトウェアに資金の自由を与えるには、厳格な制限が必要です。ネットワークに送信する前にすべてのトランザクションを検証します。

# 1日あたり最大15ドルに制限 agent = AgentPay(daily_limit=15.0) # IDをミント identity = agent.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. 自律的トレジャリー (DeFi)

DeFi Yield

余剰資金を Aave v3 のようなグローバルプロトコルに自動預入し、眠っている間にも利回りを生成します。

# 50ドルを手元に残し、残りを投資 agent.yield_manager.auto_invest(buffer_usd=50.0)

エンタープライズモード: エージェントをサービスとして提供する企業向けに、ガスレス取引(Paymasters)をサポート。エンドユーザーが暗号通貨を購入する必要はありません。

📊 32. 企業向けビジュアルダッシュボード (読み取り専用)

透明性を損なうことなく最高水準のサイバーセキュリティを保証するため、iAgentPay は落ち着いたパステル調の企業向けリアルタイムビジュアル監視ダッシュボードを導入しています。セキュリティ設計上、このパネルは**厳格に読み取り専用 (Read-Only)**です。これにより、悪意のある攻撃者がウェブインターフェースを通じてエージェントの設定を変更したり、セーフティカーネル (Safety Kernel) を書き換えたり、資金を盗み出したりすることを完全に防止します。

🧪 33. 高度なインタラクティブシミュレーションサンドボックス (Sandbox)

デモおよび迅速なテストのため、iAgentPay ダッシュボードはインタラクティブなシミュレーションサンドボックス環境を提供します。これにより、開発者やクライアントはリアルマネーを危険にさらすことなく、すべての自律機能をリアルタイムで体験できます。

📘 Offizielles Referenzhandbuch: iAgentPay (v8.5.0)

Willkommen bei iAgentPay, der fortschrittlichsten Zahlungsinfrastruktur für KI-Agenten. Dieses technische Handbuch führt Sie in die Freischaltung von 100 % der Fähigkeiten Ihrer Agenten ein, sodass diese autonom operieren, abrechnen und weltweit investieren können.

🌎 1. Globaler Support und Multi-Chain-Architektur

Architecture Diagram

iAgentPay ist nicht nur eine lokale API; es ist ein globales Finanzgateway. Unsere Routing-Engine ermöglicht es Ihrem Agenten, Gelder im gesamten Web3-Ökosystem zu bewegen.

Der Agent ist währungsunabhängig. Integrierte Währungen umfassen: USDC, USDT, EURC (Euro), CNHC (chinesischer Yuan), GYEN (japanischer Yen), MXNT (mexikanischer Peso).

from iagent_pay import AgentPay # Agent mit Fokus auf den asiatischen Markt agent = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. Hauptmerkmale

A. Autonome Zahlungen (x402)

tx_hash = agent.pay_token( recipient_address="0xProvider...", amount=5.0 ) print(f"Zahlung abgeschlossen: {tx_hash}")

B. Rechnungsstellung (Invoicing)

Invoicing

Wenn Ihre KI eine Arbeit für einen Kunden abschließt, kann sie eine „intelligente Rechnung“ erstellen.

invoice_id = agent.invoices.create_invoice( amount=25.0, customer_address="0xClient...", description="Code-Audit" )

🛡️ 3. Sicherheitskernel (Safety Kernel)

Safety Kernel

Software finanzielle Freiheit zu gewähren, erfordert strenge Limits. Jede Transaktion wird validiert, bevor sie an das Netzwerk gesendet wird.

# Täglich maximal 15 USD zulassen agent = AgentPay(daily_limit=15.0) # Identität prägen identity = agent.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. Autonome Schatzkammer (DeFi)

DeFi Yield

Zahlen Sie überschüssige Ersparnisse automatisch in globale Protokolle wie Aave v3 ein, um Renditen zu erzielen, während Sie schlafen.

# 50 USD in bar halten, den Rest investieren agent.yield_manager.auto_invest(buffer_usd=50.0)

Unternehmensmodus: Für Unternehmen, die Agenten als Dienstleistung anbieten, unterstützt iAgentPay gaslose Transaktionen (Paymasters). Endbenutzer müssen keine Kryptowährung kaufen.

📊 32. Visuelles Dashboard für Unternehmen (schreibgeschützt)

Um ein Höchstmaß an Cybersicherheit zu garantieren, ohne die Transparenz zu beeinträchtigen, bietet iAgentPay ein Echtzeit-Überwachungsdashboard mit klaren Pastelltönen. Aus Sicherheitsgründen ist dieses Dashboard **streng schreibgeschützt (Read-Only)**. Dies verhindert, dass böswillige Akteure Agentenkonfigurationen über die Weboberfläche ändern, den Sicherheitskernel manipulieren oder Gelder stehlen.

🧪 33. Erweiterte interaktive Simulations-Sandbox (Sandbox)

Für Demonstrations- und schnelle Testzwecke enthält das iAgentPay-Dashboard eine interaktive Simulations-Sandbox. So können Entwickler und Kunden alle autonomen Funktionen in Echtzeit testen, ohne echtes Geld zu riskieren.

📘 Manuel de Référence Officiel: iAgentPay (v8.5.0)

Bienvenue sur iAgentPay, l'infrastructure de paiement la plus avancée pour les agents d'Intelligence Artificielle. Ce manuel technique est conçu pour vous apprendre à débloquer 100 % des capacités de vos agents, leur permettant d'opérer, de facturer et d'investir de manière autonome à l'échelle mondiale.

🌎 1. Support Global et Architecture Multi-Chaînes

Architecture Diagram

iAgentPay n'est pas qu'une simple API locale ; c'est une passerelle financière mondiale. Notre moteur de routage permet à votre agent de déplacer des fonds à travers tout l'écosystème Web3.

L'agent est agnostique vis-à-vis de la monnaie. Les devises intégrées comprennent : USDC, USDT, EURC (Euro), CNHC (Yuan chinois), GYEN (Yen japonais), MXNT (Peso mexicain).

from iagent_pay import AgentPay # Agent axé sur le marché asiatique agent = AgentPay(chain_name="BASE", default_stablecoin="CNHC")

⚡ 2. Fonctionnalités Clés

A. Paiements Autonomes (x402)

tx_hash = agent.pay_token( recipient_address="0xProvider...", amount=5.0 ) print(f"Paiement complété: {tx_hash}")

B. Facturation (Invoicing)

Invoicing

Si votre IA effectue un travail pour un client, elle peut générer une « facture intelligente ».

invoice_id = agent.invoices.create_invoice( amount=25.0, customer_address="0xClient...", description="Audit de Code" )

🛡️ 3. Noyau de Sécurité (Safety Kernel)

Safety Kernel

Donner une liberté financière à des logiciels nécessite des limites strictes. Chaque transaction est validée avant d'être envoyée au réseau.

# Limite à 15 USD par jour maximum agent = AgentPay(daily_limit=15.0) # Émettre une identité identity = agent.identity.mint_soulbound_id("Bot", "0xOwner")

📈 4. Trésorerie Autonome (DeFi)

DeFi Yield

Déposez automatiquement vos excédents de trésorerie dans des protocoles mondiaux comme Aave v3 pour générer des rendements pendant votre sommeil.

# Conserver 50 USD en espèces, investir le reste agent.yield_manager.auto_invest(buffer_usd=50.0)

Mode Entreprise: Pour les entreprises qui fournissent des agents en tant que service, iAgentPay prend en charge les transactions sans frais de gaz (Paymasters). Les utilisateurs finaux n'ont pas besoin d'acheter de crypto.

📊 32. Tableau de bord visuel d'entreprise (lecture seule)

Pour garantir les plus hauts niveaux de cybersécurité sans compromettre la transparence, iAgentPay introduit un tableau de bord de surveillance visuelle en temps réel aux couleurs pastel épurées. Par conception de sécurité, ce panneau est **strictement en lecture seule (Read-Only)**. Cela empêche les acteurs malveillants de modifier la configuration de l'agent, d'altérer le noyau de sécurité (Safety Kernel) ou de retirer des fonds via l'interface web.

🧪 33. Sandbox de simulation interactive avancée (Sandbox)

À des fins de démonstration et de test rapide, le tableau de bord iAgentPay comprend un environnement interactif de sandbox de simulation. Cela permet aux développeurs et aux clients de tester toutes nos fonctionnalités autonomes en temps réel, sans risquer de fonds réels.