
What know your agent means for onchain lending
Gareth Christian-Lim, Midnight Foundation
Moment at 1:00:10Episode 3 · Credit Markets on Demand
Protofire builds agentic payments for firms whose software agents pay with stablecoins. The firm keeps the keys and gets spending limits in a Safe it controls, a payment client, and refund and ledger records. We deployed Safe on 120+ EVM networks, and Safe's registry lists our allowance module deployments.

Reviewed by Luis Medeiros, Field CTO at ProtofireLast reviewed: November 2026
Work shipped for 60+ networks and 95+ protocols, including
An agent that pays on your firm's behalf needs a spending limit written as a rule in code that the agent cannot edit. A sentence in the agent's instructions is no such rule. For example, your finance lead asks one thing before an agent pays its first invoice: what stops the agent from spending the whole balance?
Protofire's agentic payments development builds the spending limit and the parts around it. For your agents, we build the wallet limits and the payment client. We also build the paywall on your API, the refund path and the ledger entries. A wallet product built around a user's account falls under wallet development. Our guide compares the agent payment protocols.
Your firm holds the keys and writes the spending policy. Protofire builds the code that enforces the policy. The facilitator or payment provider settles each payment.
An agent that pays by itself spends from a wallet, and the payment protocol does not decide how much.The x402 specification lists "Client-side budget management" as out of scope. TRM Labs describes the result in its analysis of 9 September 2026: "No human approves the payment. The agent signs and a facilitator broadcasts, with no review in between."
An instruction to the agent does not supply the missing budget control. Coinbase's documentation says that an instruction to the agent "is not a server-enforced session spending limit". The same documentation says that settled x402 payments are irreversible. Coinbase's x402 SDK keeps the cumulative spend ledger in memory by default. So the count is lost on a restart unless you provide a persistent store.
Cards expose the firm too. The Visa Rules make the cardholder responsible for what an agentic payment provider does in an agentic transaction (Rule 4.1.23.10, October 2026 edition). The cardholder answers for it "as if the Cardholder initiated the Transaction". If the limit is left in the prompt, a wrong x402 payment cannot be taken back once it settles.
You have KYC and KYB and AML checks. We've got KYA, which is know your agents.
The limits are caps per payment, day and payee, a payee allowlist and an expiry. They are stored in a wallet that the agent does not control. Protofire builds them in a Safe, with the Safe's allowance module and the policy code around it. On accounts built with account abstraction, the limits run as session rules.
Protofire's payment client reads the price in a 402 response and checks it against the limits. The client then signs the payment and retries the request. It logs each payment with the request that led to it. x402 works over HTTP, MCP and agent-to-agent calls.
Protofire adds an x402 or MPP payment step to your API, data or inference endpoint. Payments go through the facilitator or provider you pick. Prices of less than a cent settle in batches under x402's batch-settlement scheme.
Protofire connects your catalog and checkout to agent checkout in the ACP and UCP style. The connection goes through the payment provider you already use. Where an agent buys without the shopper present, we add AP2 mandates, which record what the user approved. For cards, Visa's 2 July 2026 release says its Trusted Agent Protocol and Agent Directory are "designed to help merchants to securely recognise and work with verified AI agents".
Protofire builds the refund path and an indexer that ties each settlement to its order in your ledger. The indexer makes that match with x402's idempotency key and receipts. Screening results are passed into your stack through compliance integration.
Each payment is tied to the agent action that caused it. Monitoring runs on your side, or under a written scope as managed onchain operations.
The agent spends from keys your firm holds, under a policy your firm wrote.Protofire holds no keys and no client funds. Safe's own quickstart for an AI agent with a spending limit describes the mechanism. Once the allowance module is active on a Safe, "you can set an allowance per token for a spender". The allowance is one-time, or it "resets after a certain time interval (for example, 100 USDC every day)".
Your firm sets the spending policy in a written design. The design names the caps, the payees and the expiry, and the amount over which a person approves a payment. Protofire's code enforces the policy in a place that the agent's client cannot change.
To stop the agent, your signers remove its allowance with a Safe transaction. The Safe itself calls the module's deleteAllowance function, for one delegate and one token. So the agent cannot call it, and Protofire cannot either. If your firm already holds its keys on a custody platform such as Fireblocks, Protofire integrates that platform.
Where a limit is stored decides who can change it and what a restart does to it.
Spend ledger in Coinbase's x402 SDK: In memory by default. A persistent store is an option.
Allowance in your Safe: Onchain, in a module on a Safe that your owners control.
Spend ledger in Coinbase's x402 SDK: The default store is process-local, so the cumulative count is lost unless you provide a persistent one.
Allowance in your Safe: The allowance is stored onchain and resets on the interval you set, such as 100 USDC a day.
Spend ledger in Coinbase's x402 SDK: Whoever writes and deploys the agent's client.
Allowance in your Safe: The Safe's signers, who set an allowance and delete it.
Protofire builds an agent's budget as a spending limit in a Safe.We deployed Safe on 120+ EVM networks, where it secures $2B+.
Between October 2025 and April 2026, Safe merged 10 pull requests from Protofire engineers. The pull requests added allowance, ERC-4337 and passkey module deployments for networks including Chiliz, Morph, Shape, Sei, Moonbeam and Ethereal. Six of them are Allowance Module deployments, for Ethereal, Chiliz, Morph, Shape, Boba and Hoodi. Safe's docs use the Allowance Module for an agent's spending limit.
Plasma's account abstraction page lists Protofire Safe on Plasma Mainnet and Testnet. The page says: "Protofire Safe provides modular smart account infrastructure and account abstraction stack."
In May 2026 the Safe Ecosystem Foundation's forum stated that Protofire "has been contributing to Safe since 2018". Our Safe deployment work is described on the Safe multisig deployment page.
Work with Protofire starts with the first flow you want to measure.You tell us who pays whom, on which rail, and who in your firm signs for the agent. Commercial terms are on our how we work page.
How we work shows a worked proposal.
A plain API key or a provider's own wallet is sometimes enough.

Gareth Christian-Lim, Midnight Foundation
Moment at 1:00:10Episode 3 · Credit Markets on Demand
Tell us what you are building. An engineer reads it, we have a short call, and the written proposal follows within one business day.