How do I cap how much my AI agent can spend?
Last reviewed: August 2026
Enforce the cap outside the model, where the agent cannot talk its way past it. Limit what the agent can reach (a funded balance or a prepaid card loaded with a fixed amount), then add a per-payment limit the agent can read but not change. With Laso that is the account spend limit, set by the human owner from $1 to $50,000, plus a maxAmountUsdc price cap on every payment.
Why a prompt is not a cap
Telling an agent “spend at most $50” in its instructions is a request, not a control. A confused or manipulated agent can ignore it. A real cap has three properties: it is checked before money moves, it lives outside the agent’s code and context, and the agent cannot raise it. The layers below each give you one or more of those.
Layer 1: limit what the agent can reach
The strongest cap is the money that is available at all. Fund a managed agent wallet with only what the agent needs for the job. A payment larger than the balance is caught before signing and comes back as an inner 402 with errorReason: "insufficient_funds", and nothing is charged.
For purchases at a merchant checkout, load a prepaid card with exactly the checkout total. Laso cards are non-reloadable and hold the amount ordered, from $5 to $1,000, so the merchant cannot charge beyond it. The card is the budget.
curl "https://laso.finance/get-card?amount=50" \
-H "Authorization: Bearer $LASO_ID_TOKEN"
# Returns a pending card_id. Poll /get-card-data?card_id=... until
# status is "ready"; available_balance is the most it can ever spend.
Layer 2: a per-payment limit the agent cannot raise
The human who owns the account sets a maximum for any single payment in the Laso dashboard under Spend limit. It defaults to $1,000 and ranges from $1 to $50,000. It applies to every payment agentX402Pay makes, whether to a Laso route or an external URL, and to an agentWalletTransfer send to Base. A payment above it is refused before anything is signed.
The agent can read the limit with getAgentSpendLimit but cannot change it. setAgentSpendLimit refuses agent sessions, so only the human can move it.
curl https://laso.finance/getAgentSpendLimit \
-H "Authorization: Bearer $LASO_ID_TOKEN" \
-H "Content-Type: application/json" \
-d '{"data":{"userId":"usr_..."}}'
# { "result": { "maxPerPaymentUsdc": 1000, "min": 1, "max": 50000, "default": 1000 } }
Compare the fee-inclusive total of a payment against maxPerPaymentUsdc, since fees are added on top of the amount requested. If a payment is refused for exceeding the limit, the agent should stop and tell its human, not split the payment into smaller ones.
Layer 3: a price cap on every call
When the agent pays an external x402 endpoint, that endpoint writes its own price and receiver. Pin what you agreed to pay with maxAmountUsdc, and add expectedAsset, expectedNetwork, and expectedPayTo to refuse any challenge that substitutes a different token, chain, or receiver.
curl https://laso.finance/agentX402Pay \
-H "Authorization: Bearer $LASO_ID_TOKEN" \
-H "Content-Type: application/json" \
-d '{"data":{
"userId":"usr_...",
"url":"https://api.example.com/v1/paid-endpoint",
"note":"Market data for the portfolio summary you asked for",
"maxAmountUsdc":0.01
}}'
# { "result": { "status": 200, "body": { ... }, "txHash": "..." } }
maxAmountUsdc can only tighten the account spend limit, never raise it. A challenge that quotes a higher price is refused and nothing is signed. For Laso routes, pin the fee-inclusive total, because a cap computed from the pre-fee amount lands a cent or two short and refuses your own payment.
Layer 4: visibility
Every external payment appears in the agent’s activity list on the dashboard with the one-sentence note the agent supplied, settled or failed. A refused payment is recorded as policy_filtered or insufficient_funds. This does not stop spending, but it lets the owner see what the agent tried. To be alerted as it happens, see how to get notified when an agent spends money.
What these caps do not do
- There is no per-day or per-user velocity limit yet. The spend limit and
maxAmountUsdcbound each payment, not a sequence, so keep the wallet balance small to bound the total. - A cap protects against overspending, not against a bad purchase. A prepaid card can still be spent on the wrong thing up to its balance.
- If you need spending policies on a wallet you control yourself, hosted agent wallet products from other providers offer their own limit and allowlist features. Check their current docs; the tradeoff is who holds the key and who can change the policy.
Full reference: spend limit and activity log, guardrails for external endpoints, and paying from the managed wallet.
Frequently asked questions
How do I set a spending limit on an AI agent?
The account owner sets a per-payment limit in the Laso dashboard under Spend limit, between $1 and $50,000. It applies to every payment the agent makes and the agent cannot change it.
Can my AI agent raise its own spend limit?
No. The agent can read the limit with getAgentSpendLimit, but setAgentSpendLimit refuses agent sessions, so only the human owner can change it.
How do I limit what an AI agent can pay for one API call?
Pass maxAmountUsdc to agentX402Pay. A challenge that quotes more than the cap is refused before anything is signed.
How do I give an agent a card that cannot overspend?
Order a prepaid card loaded with exactly the amount to spend. Laso cards are non-reloadable and hold the amount ordered, so charges cannot exceed it.
What happens when my agent tries to pay more than the limit?
The payment is refused before signing and no funds leave the wallet. The agent should stop and tell its human the amount attempted and the limit it hit.
More guides
- How to give your AI agent a credit card — An AI agent cannot pass credit underwriting, but it can issue itself a virtual prepaid card over an API in about a minute. The working pattern, with real requests: x402 payment in, card number out.
- x402 vs AP2 vs ACP vs MPP vs UCP: which should your agent use? — All five agent payment protocols compared honestly: x402 and MPP for machine-to-machine HTTP payments, ACP for ChatGPT checkout, UCP for Google surfaces, AP2 for authorization. Which layer each one is, when to use each, and a worked x402 example.
- x402 vs Stripe Issuing for AI agents — Two real ways to put a card in an AI agent’s hands: Stripe Issuing behind a business account, or x402 card issuance the agent drives itself. An honest comparison of onboarding, funding, controls, and when each wins.
- Issue a virtual card with one x402 call — A complete, runnable walkthrough: pay one x402 request in USDC and receive a virtual prepaid card with number, expiry, and CVV. Real endpoints, real response shapes, error handling included.
- How can an AI agent pay for an API call with USDC? — An AI agent pays for an API call with USDC by answering the API’s HTTP 402 challenge with a signed payment. Two ways to do it: your own wallet with an x402 client, or a managed wallet with a price cap and no private key.
- How do I give an AI agent a bank account? — Two real ways to give an AI agent bank details: a business checking account it can operate (Meow) or a U.S. bank account that converts incoming dollars to USDC in the agent’s wallet (Laso). What each one is, who approves what, and when to pick which.
- How do I send money to someone’s debit card from code? — Send USD, EUR, or GBP to a debit card with one API call paid in USDC. No payment processor account: you get a redemption link, the cardholder enters their own card details, and the funds are pushed to the card.
- What are the best ways to pay someone on Venmo or PayPal from an AI agent? — Four ways an AI agent can pay a person on Venmo or PayPal: the PayPal Payouts API, a USDC-paid payout through Laso, a bank or card payout instead, or a human approving each payment. Tradeoffs for each.
- How do I let my AI agent buy a gift card through an API? — An AI agent buys a gift card with two calls: search the catalog for a laso_server_id, then order it with a USDC payment. The redemption code comes back in the same response. Includes a runnable example and the currency gotcha.
- How do I let my AI agent buy something online? — Two working ways for an AI agent to buy something online: spend the account holder’s saved card with their approval on each order, or pay for a prepaid card in USDC and check out like any cardholder. How Laso and Crossmint each handle it, with runnable calls.
- How do I send dollars to a bank account from an AI agent? — Pay a U.S. bank account by ACH from an AI agent. Register the recipient once, then make one API call paid in USDC. Limits, fees, settlement time, and a runnable example.
- What are the best ways to give an AI agent its own wallet? — Four ways to give an AI agent a wallet it can spend from: a key you hold yourself, Coinbase Agentic Wallet, Crossmint agent wallets, or a Laso managed wallet. Custody, spend limits, and tradeoffs for each.
- How do I get notified when my AI agent spends money? — Get an alert every time your AI agent spends: register one signed webhook for card orders, payouts, withdrawals and deposits, or poll the balance and card transaction endpoints. Working code included.
- How do I convert USDC to fiat in my app without a multi-week integration? — Three ways to turn USDC into dollars, euros, or pounds from code: Laso pay-per-call payouts over x402, a Stripe stablecoin balance, or Circle Mint redemption. Onboarding, outputs, and tradeoffs for each.
- How do I let my AI agent use my own credit card safely? — Let an AI agent pay with your own card without ever handling the number: save the card once behind a passkey, let the agent build the cart over an API, and approve each order on your own device. Working calls included.
- How do I let my AI agent pay for a subscription that bills every month? — A subscription charges the same card again each month, so a single-use card fails at the first renewal. Four ways to give an AI agent a card that stays open, from Privacy, Ramp, Meow, and Laso, with the calls for a reloadable card funded in USDC.
- How do I move USDC between Solana and Base from an AI agent? — Move USDC between Solana and Base from an AI agent with one HTTP call: no bridge UI, no gas token on either chain, and no private key in the agent. Working curl examples, fees, and timing.
- How do I give my AI agent a card I can top up with USDC? — Three ways to give an AI agent a card that spends USDC and can be refilled: MoonPay’s MoonAgents Card, the Interlace Agent Card, and a Laso reloadable card. How each is funded, what limits apply, who can use it, and the calls to top one up.
- How can my AI agent buy from an online store outside the US? — Let an AI agent pay a non-U.S. online store: order an international prepaid card in USDC over x402, wait for it to be fulfilled, then check out with the returned card number and billing address. Working code included.
- What are the best ways for an AI agent to send money to someone in another country? — Five ways an AI agent can pay a person abroad: the Wise API, PayPal Payouts, a USDC-paid debit card payout in EUR or GBP, a gift card in the recipient’s country, or USDC sent straight to their wallet. Setup, limits, and tradeoffs for each.
- All agent guides, or how Laso compares to the alternatives
Try it: connect a wallet at laso.finance and you'll have a card, gift card, or payout in minutes.
Building an agent? Point it at laso.finance/SKILL.md — it can set itself up.