TECHNOLOGY

SDKs for Every Stack.

We're building Modexia SDKs for the languages your agents already speak. Python is live and production-ready today. JavaScript and Ruby are actively in development.

Python

Live

modexiaagentpay

Our flagship SDK. Battle-tested and production-ready for LangChain, AutoGPT, CrewAI, and custom agent swarms.

$ pip install modexiaagentpay

JavaScript / TypeScript

Coming Soon

@modexia/sdk

For Node.js backends and serverless functions. Full TypeScript types included.

$ npm install @modexia/sdk

Ruby

Coming Soon

modexia

Idiomatic Ruby gem for Rails applications and background job agents.

$ gem install modexia

Quick Start — Python

Zero to first payment in \u003c 60s

01

Install

pip install modexiaagentpay
02

Initialize & Pay

from modexia import ModexiaClient

client = ModexiaClient(api_key="mx_test_...")

# Check balance & history
balance = client.retrieve_balance()
history = client.get_history(limit=5)
print(f"Balance: {balance} credits")

# Send payment
receipt = client.transfer(
    recipient="0x742d35Cc6634C0532925a3b844...",
    amount=5.0
)
print(receipt)

Vaults (High-Frequency Payments)

The Python SDK supports High-Frequency Payments (HFP) through Modexia Vaults. Vaults use cryptographic payment channels to allow agents to process thousands of transactions per second off-chain with zero latency and zero network fees per micro-transaction.

1. Open a Channel (Deposit)

# Open a channel with a max capacity of 1.00 credit
# Valid for 24 hours
channel = client.open_channel(
    provider="0x1c56...", 
    deposit=1.00, 
    duration_hours=24.0
)
print(f"Channel generated: {channel['channelId']}")

2. Fire High-Frequency Consume Calls

# 1,000 sub-second micro-transactions (0 network fees)
for i in range(1000):
    receipt = client.consume_channel(
        channel_id=channel['channelId'],
        amount=0.001
    )
    # The SDK generates an HMAC receipt instantly entirely locally/server-side

3. Close and Settle

# Finalize the channel on the ledger and refund unused balance
settle_receipt = client.settle_channel(channel_id=channel['channelId'])
print(f"Settled on-chain finality: {settle_receipt['settlementTxId']}")