Skip to content

MPPI

Exchange inference tokens. Settle in USDC.

MPPI is a headless inference service, designed for AI.

Give your agent a wallet to buy inference from other agents. MPPI connects their SDKs, coordinates payment as work progresses, and settles in USDC on Arc.

01Introduction

Give your agent a wallet. Let it pay for inference.

The Machine Payments Protocol for Inference connects agents that need inference with agents that provide it. An agent brings its wallet, chooses a registered provider and model, and pays in USDC at the prices it accepts.

One funded session can serve multiple requests. The SDKs coordinate payment authorization and usage, while MPPI's contract on Arc handles USDC collection and refunds. Start with Circle Agent Wallet or integrate another wallet provider.

SDK release
Agent 0.1.6 · Provider 0.2.0
Wire version
mppi.v1
Metering
Inference tokens
Settlement
USDC on Arc
Transport
gRPC

02Network

Agents and agent providers. One protocol between them.

Agent and provider SDKs exchange inference over gRPC. Payments are authorized off-chain and collected in USDC on Arc. ERC-8004 connects each provider's identity to its published offering.

Providers publish identities and model catalogues through ERC-8004 on Arc. The agent SDK resolves a selected provider's registered ID and checks its published offering.

03Exchange

Inference keeps flowing. Payment follows the work.

Fund a session and authorize work before inference begins. As work proceeds, the SDKs exchange usage and payment messages. Explore four of them below, with excerpts from the protobuf schema.

Agent
Agent provider

protoRequestAgent → Provider

The agent signs a request bound to its model and accepted prices. The provider SDK checks funded payment coverage before authorizing execution.

message CompleteRequest {
  optional string model = 1;
  optional bool stream = 2;
  optional bytes session_id = 3;
  optional bytes run_id = 4;
  optional uint64 control_generation = 5;
  optional bytes rate_card_hash = 6;
  optional bytes auth_signature = 7;
  optional bytes payload = 8;
}

04Terminology

Inference in tokens. Payment in USDC.

Tokens measure model usage. USDC pays for it. These are the terms behind the exchange.

Agent
An agent that uses a wallet to buy inference from an agent provider.
Agent provider
An agent that offers inference, publishes its models and prices, and collects USDC for reported usage.
Arc
The blockchain where MPPI sessions are funded, payments are collected and unused USDC is returned. USDC also pays network fees.
Inference tokensusage
Input, cached input and output tokens measure model usage. Each run retains the prices the agent accepted for it.
USDCsettlement
The asset used to fund sessions and pay agent providers. MPPI accounts in six-decimal USDC base units.
Funded session
USDC held in the MPPI contract for requests to one agent provider. Funding can support multiple runs; closing the session returns unused funds.
Voucher
An agent-signed ceiling on cumulative payment for a session. It authorizes collection within that limit; signing it does not transfer USDC.
Receipt
A run's final accounting record, including usage and observed session settlement. Confirmed collection on Arc establishes the USDC paid.

05SDKs and transport

One connection. Separate streams for inference and payment.

Native gRPC carries binary protobuf over HTTP/2. Completions carries inference; Control coordinates payments alongside it. The SDKs handle protocol messages and signing, with profiles for Arc testnet and mainnet.

MPPI inference and payment interfaces
InterfaceUsed byTransportPurpose
CompletionsUsed byAgentTransportgRPC requestInference JSON, model, accepted prices and a signed run authorization.
CompletionsUsed byProviderTransportgRPC streamInference output and a definitive run outcome.
ControlUsed byBothTransportgRPC streamSession state, usage meters, vouchers and receipts.
Arc contractsUsed byBothTransportTransactionsSession funding, eligible USDC collection and refunds.
MPPI SDKs and shared protocol package
PackageLanguage and versionPurpose
mppi-agentPython · 0.1.6PurposeRequest inference, authorize payment and manage sessions.
mppi-providerPython · 0.2.0PurposeConnect your inference service to MPPI's payment runtime.
mppi-providerRust · 0.2.0PurposeIntegrate the native provider runtime or use its CLI.
mppi-protocolPython · 0.1.4PurposeShared wire types and validation. The agent and provider SDKs both use 0.1.4.

06Get started

Choose your side of the exchange. Start on testnet.

For agents

  1. 01Create a Circle account and wallet, or integrate another wallet provider.
  2. 02Register your agent identity and prepare its session signer.
  3. 03Choose a registered provider and model, then review its token prices.
  4. 04Fund a session, request inference and close the session when finished.

For agent providers

  1. 01Set up your operator wallet, registered identity, models and payout address.
  2. 02Connect the Python or Rust provider SDK to your inference service.
  3. 03Check payment coverage before work; report usage and final outcomes from your engine.
  4. 04Collect eligible USDC and retain the state needed for recovery.
Python · after quickstart setup
# Complete the agent quickstart through step 5 first.
# MPPI_PROVIDER and MPPI_MODEL come from that setup.
import os
from mppi_agent import Client

with Client.from_config(
    os.environ["MPPI_PROVIDER"],
    testnet=True,
    # Review the deposit budget in quickstart step 6.
    # This is not an output-token limit.
    initial_session_tokens=10_000,
) as client:
    response = client.chat.completions.create(
        model=os.environ["MPPI_MODEL"],
        messages=[{"role": "user", "content": "Hello"}],
    )
    print(response.decode("utf-8"))
    for session in client.sessions.list().sessions:
        print("Session:", session.session_id.hex(), session.status)

# The session stays funded for reuse after this block.
# Follow the session guide to close it and reclaim funds.