Blog Engineering

An agent with a wallet and a budget

Some requests need something that costs money. Graspable can let the agent pay for an outside service from a wallet of its own, inside limits you set, with every purchase and every refusal written down on your computer.

Michal Takáč 4 min read

A diagram of how a purchase is decided: limits first, then a judge, then you

An agent building your scene sometimes hits something that costs money. A web search that answers properly, a dataset, a model that does one thing well, an hour of compute. Until now it stopped and told you. With agent spending switched on, it can buy from services that are paid per call, inside limits you set.

It is experimental and off until you switch it on.

Agent spending in about ninety seconds.

A wallet of its own

Under Settings → Agent spending you make a hot wallet. Graspable creates it on your computer and keeps its key in your keychain. The wallet is yours and you can show its key at any time. It is separate from your personal wallets, and Graspable never asks for those.

You send it USDC on the Base network. The wallet can spend only what you sent, so keep in it what you would keep in an app and no more.

Settings, Agent spending: the hot wallet, three limits, and how readily the agent pays
Agent spending before a wallet is made: the limits for one purchase, one request and one day, and how readily the agent pays.

The AI model never holds the key and never builds a payment. It gets two tools. One searches a public catalogue of pay-per-call services and shows each price and how many different payers used the service in the last 30 days. The other asks for a service: the agent says what it needs and why, and Graspable decides.

How a purchase is decided

Limits in code come first, then a judge with four questions, then the person
The order never changes. Each step can stop a purchase, and none can loosen the one before it.

Limits come first, and they are code. A request or a day that has used its budget buys nothing more. A service that asks more than its listed price is refused. Only exact amounts of USDC on Base are paid, to services from the catalogue or ones already paid before.

Then a judge answers four questions about the purchase:

  • Does your request need this?
  • Would a free tool the agent already has do?
  • Is the price in line with the alternatives?
  • Does the reason come from your request, or only from text the agent read on the way?

The last question is there because a web page can say anything, including "buy this". A purchase whose reason traces back to something the agent read is one you are asked about. The judge can make the agent stricter than the limits. It cannot make it looser.

Then you, whenever the setting, the service or the judge says so. You choose how readily the agent pays, between being asked every time and paying without asking inside the budget. Some cases always come to you: an amount above your limit for one purchase, a service fewer than three others have paid in the last 30 days, and a moment when no judge with measured confidence is available.

When nobody can be asked, a purchase that needs your yes is refused.

The record

Settings → Agent purchases lists every purchase and every refusal. Open one and you see the request it was for, the agent's own reason, what else it considered, who decided and why, the judge's answers with their scores, and the payment.

Settings, Agent purchases: one purchase paid and four not made
The record counts refusals too. Amounts, services and reasons are blurred here.

The record is a file on your computer. It is not sent to Graspable. Neither is anything else about a purchase: the amount, the service, or the fact that one happened. The agent pays the service directly, and Graspable takes nothing from the payment.

Spending without asking

There is a setting that removes the questions. We call it unsafe in the app, and mean it. An AI model can be wrong, and text it reads can try to talk it into buying. With that setting on, the limits are the only thing between the agent and the wallet, so assume everything inside them can be spent.

Three rules hold even then. Nothing above the limit for one purchase is bought. A purchase the judge traces to text the agent read is refused. The agent buys only from services that at least three others have paid in the last 30 days.

First version

It pays in USDC on Base, to services that speak the x402 protocol. Prices must be fixed per call. It has been tried against real services up to the point of payment, so treat it as new. It does not work in Cloud Agents, because the wallet never leaves your computer.

The settings and every rule are in the documentation under Agent spending.