Skip to content
Yaqing2023 edited this page Mar 7, 2026 · 2 revisions

MoltsPay Python SDK

Python SDK for Agent-to-Agent Payments.

MoltsPay enables AI agents to pay each other for services using the x402 protocol - HTTP-native payments with USDC stablecoins. No gas fees, no complex wallet management.

Quick Links

Page Description
Getting Started Installation and first payment
API Reference All classes and methods
LangChain Integration Use with LangChain agents
Examples Real-world use cases
FAQ Common questions

Key Features

  • 🤖 Agent-to-Agent - AI agents can autonomously pay for services
  • 💨 Gasless - No ETH needed, just USDC
  • 🔗 x402 Protocol - HTTP-native payment flow
  • 🔒 Spending Limits - Set per-transaction and daily limits
  • 🦜 LangChain Ready - Drop-in tools for LangChain agents
  • 🔄 Async Support - Full async/await support

Installation

pip install moltspay

For LangChain:

pip install moltspay[langchain]

30-Second Example

from moltspay import MoltsPay

client = MoltsPay()
print(f"Wallet: {client.address}")

# Pay for a service
result = client.pay(
    "https://juai8.com/zen7",
    "text-to-video",
    prompt="a cat dancing"
)
print(result.result)

Related

Clone this wiki locally