Agents need to transact at speeds that today’s payment rails can’t support. MPP Sessions fix this by collapsing unlimited micropayments into two onchain transactions: one to open a session, one to settle. If you’re building agents or agentic payment infrastructure, get started at mpp.dev.
Agents already write code, handle customer support, and help people organize their schedules. To be truly helpful, agents need to be able to pay. This is why we partnered with Stripe to create the Machine Payments Protocol.
However, agents must be able to transact far faster than even the fastest payment systems allow. Card schemes, today’s most performant payment rails, can process thousands of transactions per second. That’s a lot when most payments are still made by humans. It’s nothing when payments are made by tireless AI agents.
MPP Sessions, an MPP primitive, was built to fix this. MPP Sessions allow the underlying payment rails to scale to 1 million TPS and beyond, which is the scale needed to support the agentic future.
An architecture built for speed
Enabling agents to pay at machine speed requires solving two problems: how machines pay, and how to scale the rails underneath. MPP addresses the first. MPP Sessions address the second:
-
MPP lets machines pay for services (including services provided by other agents) in real time, over plain HTTP. Today, the protocol enables two payment modes (or “intents”): “charge” for one-time payments (e.g. an API call), and “sessions” for continuous usage (e.g. compute).
-
MPP is agnostic to payment rails, and MPP Sessions is what allows those rails to scale to machine speed of agents. Instead of settling every payment individually, a session requires only two transactions to handle an unlimited number of payments.
You can think of sessions as a card authorization at a gas station. The pump pre-authorizes a hold, then charges the final amount when done. Two transactions, regardless of how much gas flows. MPP Sessions work the same way: every gallon is metered, but only two transactions hit the rail.
How MPP sessions work on Tempo
Tempo provides the reference implementation of MPP Sessions on a blockchain. A session requires only two transactions, but those two transactions need to settle instantly and definitively. Tempo’s sub-second finality ensures they do. A payment session goes through a simple lifecycle: open a session, consume the service, settle once at the end.
- With MPP, when an agent requests a paid resource, the server responds with a 402 and the supported payment options. The Tempo payment method enables payments using stablecoins, and supports both the “charge” and the “session” intents.
- For continuous usage (e.g. paying for LLM tokens as they stream in), an agent opens a payment session by depositing funds into an onchain escrow. The server then streams data back to the client.
- For each unit of service consumed, the agent signs an offchain message, or a voucher, with an incremented cumulative amount. A new voucher goes out on every stream tick (per token, per video chunk, per byte).
- Vouchers are exchanged offchain. The server only needs to verify a cryptographic signature before continuing to stream data, which takes microseconds. Each voucher replaces the previous one, so the server only needs to submit the last one onchain to settle.
- When the session ends, the agent closes it and the server submits the latest voucher onchain. The payment settles, and any unused funds from the original deposit are released back to the agent’s wallet. The result: you pay for exactly two onchain transactions (open and close), whether 10 or 10,000 vouchers were exchanged in between. That’s what makes sessions highly cost-efficient and enables millions of micropayments with near-zero fees.
MPP session demo
This demo runs an MPP session on Tempo’s testnet, Tempo Moderato. Click Sign up to create a wallet and Authorize a $10 PathUSD access key. The access key lets the session run without you having to sign every voucher. Click Send query to run the session: it opens a session, streams tokens with signed vouchers, and closes the session with a final transaction that settles the final amount and returns unused funds.
Where MPP sessions matter
From AI inference to financial markets to industrial IoT, MPP sessions enable real-time payments at scale. For example:
-
AI agent orchestration. A coordinator agent delegates tasks to specialized sub-agents: a web search agent, a summarization agent, a fact-checking agent, each charging per operation. The coordinator opens one session per sub-agent and settles once at the end.
-
LLM inference marketplace. An agent queries multiple LLM providers simultaneously and pays per token as responses stream in. MPP sessions allow the agent to pay for consumed tokens in real time, with settlement costs amortized across the entire session.
-
Dynamic compute allocation. An AI agent runs inference across a marketplace of GPU providers, switching between them based on real-time pricing. The agent opens sessions with multiple providers and pays per millisecond of compute time, redirecting work instantly as prices shift.
-
Real-time data feeds. A trading agent consumes market data from multiple providers, paying per tick at thousands of updates per second. MPP sessions enable the agent to pay for each update with an offchain voucher verified in microseconds.
-
IoT microtransactions. Industrial sensors sell real-time data to systems that need it. A weather station provides temperature and humidity readings to an agricultural AI, billing per data point. A supply chain sensor streams location data to logistics systems, billing per update.
In each case, the speed and cost structure of MPP sessions turn micropayments from a theoretical concept into practical infrastructure.
Start building with MPP
Whether you’re building AI agents or infrastructure for machine-to-machine payments, we can help you get started:
Learn about the Machine Payments Protocol
Read the specUnderstand the fundamentals of MPP, how payment sessions work, and the problems they solve. The protocol specification defines how machines negotiate payments over HTTP.
Learn about Tempo’s implementation of MPP
Read the docsExplore how Tempo implements MPP with native blockchain primitives, including one-time charges and pay-as-you-go sessions. Start with our documentation to understand the architecture.
Use SDKs
Get startedIf you’re ready to build, download SDKs for your language of choice in TypeScript, Python, or Rust. Our libraries handle session management, voucher signing, and settlement.
Frequently Asked Questions
What is a session?
MPP sessions are a payment primitive in the Machine Payments Protocol that let AI agents and machines transact at scale. A session requires only two onchain transactions, one to open and one to settle, regardless of how many payments occur in between.
Why not send an onchain transaction per request?
Because it’s too slow and expensive. Sessions move payments offchain so high-frequency, low-value payments can happen without onchain overhead.
How do payments work during a session?
The client sends signed vouchers representing cumulative payment. A voucher is a signed offchain message from the client that represents how much the server can claim from the session. The server verifies each voucher locally. No onchain interaction is needed per request.
How is the final payment settled?
The final payment is settled in an onchain transaction where the server submits the latest voucher to claim its payment from escrow, and any remaining funds are released back to the client.
What guarantees payment and prevents overspending?
Funds are locked onchain in an escrow contract at session start, and vouchers are signed by the client. The server can only claim what the client signed, and the client cannot exceed the locked amount.
When should I use sessions?
For continuous, usage-based payments like LLM tokens or streaming.
What are the costs of using MPP sessions?
An MPP session requires exactly two onchain transactions regardless of session length: one to open (deposit into escrow) and one to close (settle the final amount). All intermediate payments are offchain vouchers with zero transaction fees.
How fast is this?
Voucher verification is just a signature check, so it runs inside the request loop without waiting onchain.