laso

← All agent guides

How do I cap how much my AI agent can spend?

Last reviewed: August 2026

The short answer

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.

What these caps do not do

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

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.