Skip to main content
All use cases
Procurement / Storefront automationOperations

The agent shops the real store. No API, no punch-out, no project.

Packing tape, cardboard boxes, gloves — the recurring, low-value supplies that never got a procurement integration. The agent drives a hosted browser session through the supplier's real VTEX storefront: it searches the catalog, builds the cart, and checks out exactly the way a human buyer would. Every purchase runs inside a signed spending mandate with its own ceiling, and closes out with a sealed receipt — no vendor API, no punch-out catalog, no integration project.

BeforeManual reorder on the supplier's site, every cycle
AfterMandated agent buys the same cart, on schedule, sealed
0
API integrations required
Try it in the Sandbox
VTEX
Proven in production
A real purchase has already run end to end on a live VTEX storefront
0
Store-side integration
No API, no punch-out catalog, no vendor project to buy through the real site
Signed mandate
Spend capped
Every checkout runs inside the same mandate that governs any other agent spend
Sealed receipt
Cart to payment
Search, cart and checkout bound into one audit record
What operations sees

The agent shops the real storefront. The mandate never leaves the checkout.

One reorder cycle, end to end: the agent searches the supplier's live VTEX storefront, adds the same SKUs from the last approved order to the cart, and checks out — no API call, no catalog feed, just the store as it exists today. The Pix the store mints at checkout is settled from the governed wallet, capped by the signed procurement mandate, and the whole session closes into one sealed receipt.

  • A hosted browser session drives search, cart and checkout on the real storefront — no store-side integration
  • The store's own Pix is minted at checkout and settled from the governed wallet, inside the mandate's cap
  • Cart, checkout and payment seal into one receipt the auditor can replay

Reorder packing tape and boxes when stock drops below two weeks of cover.

Tape and small boxes are under threshold — opening EmbalaSul's storefront to rebuild last cycle's cart inside the July supplies mandate.

Storefront purchase · recurring supplies
PO-4417 · EmbalaSul (VTEX)
Purchased · sealed
LojaVTEX storefront · embalasul.com.br
ItensFita adesiva 45mm ×24 · Caixa nº3 ×100
TotalR$ 1.180,00
Mandatocm_supplies…3K9 · cap R$5.000/mês
PixMinted at checkout · paid
cart-po4417.jsonreceipt-po4417.json
purchased · sealedrcp_shop4417
The pain

The conversation is the easy part.

The supplies operations actually reorders — packaging, office supplies, small MRO parts — never get an API. Every cycle means a person opening the same site, re-searching the same SKUs, rebuilding the same cart from memory, and paying with a shared card nobody tracks. It's spend too small for an integration project and too recurring to keep doing by hand.

Open the supplier's site and rebuild the same cart from memory, every reorder cycle

The agent drives the real storefront and rebuilds the last approved cart automatically

Wait on the vendor's dev team for an API or punch-out catalog before automating anything

A hosted browser session buys through the storefront exactly as it exists today — no vendor project

Hand a shared card to whoever restocks, with no spend ceiling and no owner

Every checkout runs inside a signed mandate with its own cap, no shared credentials

Dig up a store confirmation email to prove what was actually bought

A sealed receipt binds the cart, checkout and mandate for the record

How the agent does it

Shop drives the store you already have.

codespar_shop acts as the shopper: it searches the supplier's real storefront, builds the cart, and starts the store's own checkout — a hosted browser session standing in for the human buyer. codespar_pay settles the store's minted Pix from the governed wallet, capped by the signed procurement mandate. codespar_ledger seals the cart, checkout and payment into one audit record. No API, no punch-out catalog — the same store, bought the same way a person would.

01
Search
codespar_shop

Catalog searched · same SKUs

VTEX storefront
02
Cart
codespar_shop

Browser checkout started

Hosted browser worker
03
Checkout
codespar_shop

Store's Pix minted

VTEX checkout
04
Pay
codespar_pay

Pix settled · mandate

Pix rail
05
Reconcile
codespar_ledger

Cart + receipt sealed

Audit ledger
Architecture

The agent runs a hosted browser session against the supplier's live VTEX storefront — the same site a human buyer would use, with no API or catalog feed behind it. codespar_shop drives search, cart and checkout; the store mints its own Pix at the end, which codespar_pay settles from the governed wallet inside the tenant's procurement mandate. The session's cart, checkout confirmation and payment are sealed into one audit record when the order closes.

In code

A few lines. The whole loop.

storefront-reorder.ts
const session = await codespar.sessions.create();

const found = await session.execute("codespar_shop", {
  action: "search",
  merchant: "embalasul",
  query: "fita adesiva mm",
});

// START the store's real checkout — returns immediately, do not block
const started = await session.execute("codespar_shop", {
  action: "checkout",
  merchant: "embalasul",
  items: lastApprovedCart.map((item) => ({
    variant_id: item.skuId,
    quantity: item.quantity,
  })),
});

// poll until the store's payable Pix is ready
let status;
do {
  await sleep(15_000);
  status = await session.execute("codespar_shop", {
    action: "checkout_status",
    checkout_session_id: started.checkout_session_id,
  });
} while (status.status === "in_progress");

// the store's own Pix, settled inside the supplies mandate
await session.execute("codespar_pay", {
  method: "pix",
  code: status.pix_copia_e_cola,
  amount: status.total,
  mandate: "cm_supplies",
});
0 · sealedreceipt · rcp_agent-
Featured tools
codespar_shop

Drives a hosted browser session through the real storefront — search, cart, checkout — no store-side API required.

codespar_pay

Settles the store's minted Pix from the governed wallet, inside the signed procurement mandate.

codespar_ledger

Seals the cart, checkout and payment into one audit record.

See the meta-tool reference
MCP servers wired

Ship it this afternoon.

Open the sandbox, point a session at your providers, and run the whole loop against real rails in minutes — not the quarter it takes to build it by hand.

Storefront shopping agent — CodeSpar | CodeSpar