Between intent and settled money,there is a runtime.
CodeSpar takes an agent's intent and runs everything the money needs: a signed mandate, a policy decision, the right rail, the fiscal document and a sealed receipt. Commerce checkout or payroll run, it is the same four moving parts.
Works with the agent frameworks teams already build on
The four moving parts
Mandate. Route. Settle. Audit.
Not four products. One runtime, four guarantees on every transaction it touches.
Mandate engine
Every agent acts under a signed, revocable authorization: this agent, for this principal, up to this budget. Mandates are HMAC-signed, scoped by policy, and die the moment they are revoked.
Policy router
Intent comes in, a rail comes out: Pix, boleto, card or USDC, picked by policy and live conditions in under a second. The agent never learns a provider API and never touches a raw key.
Settlement correlation
The runtime matches every confirmation back to the transaction that caused it. The receipt binds payee, price, the Pix endToEndId and the fiscal document into one verifiable record.
Audit ledger
Hash-chained and append-only, with the NF-e attached. When the CFO asks who authorized a payment and under which budget, the answer is one record, not log-file archaeology.
One intent. The right rails. Settled.
Real outcomes, not just chat. Pick a commerce intent and watch the agent run the actual CodeSpar meta-tools — charge, pay, invoice, ship, KYC — across the LATAM provider catalog.
Cobra R$240 da Maria pelo pedido #1042, manda o Pix no WhatsApp dela e emite a nota.
Found order #1042 — 2× Tênis SKU-ABX, R$240. I'll charge via Pix, drop the QR in Maria's WhatsApp, then issue the NF-e.
codespar_chargeAsaascodespar_notifyZ-APIcodespar_invoiceNFe.ioCharged R$240 via Pix, dropped the QR into Maria's WhatsApp, and issued NF-e #4471 — in one turn.
Give your AI agents
commerce superpowers
One SDK. Payments, invoices, shipping, notifications, ERP. Across Latin America. Five lines to run the Complete Loop.
Session-first DX
One line to create a session. One line to send a message. Your agent gets payments, invoicing, shipping, messaging, ERP, and banking in a single call.
Commerce Meta-Tools, Not the Raw Catalog
A full LATAM commerce catalog spans more than a hundred MCP servers and well over a thousand raw tools. CodeSpar collapses them into a small set of commerce meta-tools that pick the best provider per call. Your agent sees clear categories, not noise.
Managed Auth
OAuth, API keys, token refresh, lifecycle management. Connect once per provider. The SDK handles credentials, refresh, and storage.
Framework Agnostic
Works with Claude, OpenAI, Vercel AI SDK, or any MCP client. Swap models based on cost or capability. Your tools and auth carry over.
From intent to ledger.One function call.
Your agent says it once. CodeSpar orchestrates all six providers, confirms every result, and seals the transaction in an immutable ledger. No callbacks, no cron jobs, no reconciliation spreadsheet.
const result = await session.send( "Charge R$ 150 via Pix, issue the NF-e, dispatch with Melhor Envio, notify on WhatsApp, and post it all to Omie." );
What sits underneath.Rails, primitives, protocols.
Three groups. Every integration is opt-in and swappable — same meta-tool, different provider underneath.
- Instant paymentsPix BCB · SPEI · Transferencias 3.0
- CardsStripe · Zoop · PagSeguro · Cielo · Asaas
- StablecoinsCircle USDC · Mercado Bitcoin · Bitso
- Bank transfersStark Bank · Open Finance · BCB
- Fiscal docsNFe.io · Focus NFe · Conta Azul
- LogisticsMelhor Envio · Correios · VTEX
- MessagingEvolution · Z-API · Twilio · Zenvia
- ERPOmie · Bling · Tiny
- Stripe ACPAgent checkout inline in chat
- Google UCPUnified commerce protocol
- x402HTTP 402 · machine-to-machine
- AP2Agent-to-agent scoped spend
One map of the surface area.
Each card is a real feature with its own page or section. No vapourware.
MCP Server Catalog
Every LatAm commerce API, wrapped as an MCP server and published on npm.
MCP Generator
Point at your code (Express, Fastify, Next.js). Get a production-ready MCP server.
The Complete Loop
One function call orchestrates charge → invoice → ship → notify → sync → reconcile.
Guardrails
Policy engine, HMAC mandates, payment router, escrow, immutable audit. Managed.
CLI
Terminal-native tools for the whole stack. Generate, test, deploy, revoke.
Use cases
Seven patterns early builders are shipping today — from fulfillment to refunds.
Open source is free.You pay when transactions settle.
MCP servers and the SDK are MIT-licensed and published on npm. Orchestration is usage-based — $0.10 per settled transaction, plus 0.5% on cross-border FX. No minimums. No setup fee.
See the whole thing running.
Open the Sandbox and run a real transaction in under a minute. Or book a demo and we walk you through it end-to-end.