Use cases
What agents build on top of CodeSpar.
Ten patterns early builders are shipping today, organized by the money movement they run: commerce, procurement, payroll, treasury and cross-border. Each one is a short composition of the same primitives: sessions, mandates, routing, audit.
CommerceProcurement / APPayroll + payoutsTreasuryCross-border
Commerce
04Autonomous fulfillment agentEnd-to-end order handling for LatAm marketplacesAn agent watches the order stream, charges the buyer on the cheapest local rail, issues the fiscal document, prints a shipping label, notifies on WhatsApp, and reconciles it all into the ERP. Unattended, audit-sealed.58sfrom order to sealed ledgerSee exampleWhatsApp commerce botConversational checkout that settles in chatCustomer browses, negotiates, and pays without leaving WhatsApp. The agent generates a Pix QR inline, confirms payment, issues the fiscal doc, and sends tracking once the carrier picks up. No links, no redirects.3-tapcheckout inside chatSee exampleSubscription billing agentMulti-currency charges with local railsCharge $10 USD equivalent in each customer's local currency, on the rail they prefer, with the right fiscal doc. Handles dunning, retries, downgrades, and mid-cycle changes without a human touching the payments.12 currenciesfrom one base priceSee exampleSupport refund agentTicket to refund in under a minuteThe agent reads the complaint, verifies the order against the ERP, refunds on the original rail, issues the credit note, and notifies the customer. Policy-checked against per-agent spend limits. Every step sealed.12scomplaint to refund + auditSee example
Procurement / AP
02Fiscal compliance autopilotNF-e, CFDI, Factura issued automaticallyEvery transaction triggers the right fiscal document in the right country. The agent validates CNPJ/RFC/CUIT, emits the document, stores the PDF + XML, and registers in the ERP. No more end-of-month fiscal panic.100%auto-issued on transactionSee exampleMulti-country ERP bridgeOne source of truth across Omie, Bling, SAPAgents write every transaction to the right ERP per country and entity. Currency-converted, fiscal-attached, counterparty-matched. The accounting team wakes up to a reconciled ledger, not a reconciliation to-do.Zeromanual reconciliation entriesSee example
Treasury
03Treasury agentIdle balance managed by policyThe agent watches wallet balances across currency slots, keeps the operating float liquid, and moves the rest between BRL and USDC slots under the same mandate. One wallet, per-currency caps, every move sealed.1 walletBRL + USDC slots, no FX deskSee exampleAuto top-upThe float refills itselfWhen the BRL slot drops below the floor, the agent mints a dynamic Pix charge against the funding source and tops the wallet up, under the same mandate, inside the same caps. Payouts never stall at 2am because the float ran dry.0 stallsfloat keeps itself liquidSee exampleMachine spend (x402)Pay-per-call APIs in USDCAn x402-priced API answers with a quote; the agent settles it in USDC from its wallet slot, inside the per-tx cap, and the receipt is sealed with the mandate that allowed it. Machine-to-machine spend with a budget, not a blank check.1 USDCspent per call, sealed with the mandateSee example
Your idea is not here?It is probably just a few servers away.
Every use case above is a short composition of the same primitives — sessions, mandates, routing, audit. Open the sandbox and try yours in ten minutes.