Learn · agent payments

The map of AI agent payments.

Guides for engineers putting an AI agent in charge of money: on-chain spending limits, destination allowlists, human approval, x402 pay-per-request, and Solana vault architecture.

5 guides · 6 topic clusters · updated 26 Nov 2026

the topic map

Everything a paying agent has to get right.

root topicAI agent paymentswho may spend / how much / where / when a human decides
branch 01

Spending limits

Caps that live where the money does, not in the prompt.

branch 02

Guardrails

Allowlists, approvals and a kill switch for the bad days.

branch 03

Solana vaults

Program-derived accounts, an agent key with no balance, sponsored fees.

branch 04

x402 & machine payments

Pay-per-request APIs where the 402 is settled by the agent.

branch 05

Agent frameworks

Wire a wallet into the loop without handing over the vault.

branch 06

Operations

Reconciliation, audit trails and what to check before real money.

Guides, in reading order.

x402 & machine payments7 min

x402 payments for AI agents, with a budget

x402 lets an agent settle an HTTP 402 invoice automatically. Here is how the protocol works, why autonomous settlement needs a spending cap, and how to stop a 402 retry loop before it empties a wallet.

Read the guide

Questions people actually ask.

What is Patram?

Patram is an open source payment platform for autonomous AI agents. Each agent gets a Solana vault (a program-derived account) with on-chain spending limits, a destination allowlist and a human approval step for anything above its budget. The agent holds a key with no money on it, so a leaked key cannot empty the vault.

How do you set a spending limit for an AI agent?

Use three layers: an instruction in the system prompt, a policy check in your own service, and a cap enforced by the account that actually holds the funds. Only the last one cannot be talked out of a decision. On Solana the limit is stored on the vault account (a u64 in lamports) and the transfer instruction fails with DailyLimitExceeded when the amount would cross it.

Does Patram work with the Vercel AI SDK?

Yes. patram-sdk ships PatramTools, a set of AI SDK tool definitions (intraTransfer and fetchPremiumData) with typed schemas, so a model can pay invoices or buy paywalled data without you writing tool wrappers. It also works from plain function calling, LangChain or any framework that can call a TypeScript function.

What is x402 and why does an agent need a budget for it?

x402 revives HTTP status 402 so a server can ask for a stablecoin payment before returning a resource, and an agent can settle it and retry automatically. That automation is the risk: a bug or a hostile endpoint can produce an unbounded loop of small payments. A spending cap turns the loop into a bounded, reviewable event.

Is Patram custodial?

No. Funds sit in a vault PDA owned by the Anchor program, not in a Patram wallet. The owner signs vault initialization and over-limit approvals from their own wallet. The agent key can only request transfers inside the policy the program enforces.

Which networks does Patram support?

Solana devnet today, with the Anchor program deployed at DuTvz2VmSRTCPAtA9kLocWUZqEzhjBPqWAZVTzjwNKv7. Mainnet is a configuration and audit step, not a code change, because the program is the same.

Put a limit on the agent, not on your ambition.

Devnet, no card, four credentials to a guarded vault.

Start free