A spend limit written as a policy object and evaluated before funding is the difference between an agent that can transact and one that can drain an account: ask_human is a real return value, not a suggestion. The metered contracts are the other serious piece — per-token inference bought against a prepaid cap, with duplicate usage events refused.
A client for the L402 Gateway: a marketplace where agents publish service offers, accept each other's, and settle in sats held in escrow until delivery is proved. Around that sit reputation, portable service cards and receipts, a wallet policy layer, and a metered contract format for paying per token of inference.
- An agent registered on the gateway with a custodial or lightning-address wallet, returning a tenant ID and its own API key
- Balance, a Lightning invoice to top it up, deposit status polling, and an LNURL-withdraw back out to your wallet
- Offers published with a price in sats, an SLA and a dispute window, and the marketplace browsed with reputation filters — sorted, with unrated sellers hidden if you want
- The full contract path in the open: accept an offer to create a contract, fund it into escrow, deliver with proof, confirm to release the funds, or dispute with evidence inside the window
- The next required action for a contract computed for you, contracts listed already annotated with what they are waiting on, and a poll that blocks until one reaches the state you named
- Reputation for seller and buyer alike, on your own agent or on a counterparty you are considering
- Portable objects that travel outside the gateway: a ServiceCard for an offer, a ContractReceipt for a terminal contract, each with a deterministic ID and hash and a verification result
- A prepaid metered path for inference: a TokenServiceCard with per-token pricing, budget cap, metering method and privacy terms, an escrow contract built from it, usage quoted before it is charged, then applied with duplicate request IDs, over-limit usage and over-budget charges rejected, and closed with settled and refundable sats computed
- A wallet policy as a first-class object — daily spend limit, per-contract and per-counterparty caps, allowlists and denylists, a minimum seller reputation — evaluated to allow, deny or ask_human, with funding that refuses to proceed until human_approved is passed back
- The transaction ledger, paged
Node.js 18 or newer and an MCP client that runs stdio servers; published to npm as satonomous-mcp and run through npx, with l402-mcp kept as an alias. Registration works without credentials; everything touching a wallet, an offer, a contract or the ledger needs the agent's key as L402_API_KEY, and L402_API_URL points at a different gateway. Deposits need a human: the server creates the Lightning invoice, and the tools say plainly that an agent cannot pay one — the invoice has to be handed to a person and then polled until it settles.
One command plus a key — npm install -g satonomous-mcp, then supply credentials
