codespar_shop
Buy-side shopping — act as the shopper to search a store's catalog and buy a product, minting the store's real Pix. VTEX guest checkout and Mercado Livre. Call via session.execute().
codespar_shop
Meta-tool
codespar_shop is the buy-side primitive: the agent acts as the shopper, searching a store's catalog and buying a product, minting the store's real Pix copia-e-cola to settle from the governed wallet (via codespar_pay × pix). Use codespar_checkout when you are the merchant creating a checkout for a shopper to pay you.
Actions
action | What it does |
|---|---|
search | Returns products for a merchant query |
checkout | Drives the store's real checkout and returns the payable Pix + total |
Stores
| Store | Flow |
|---|---|
| VTEX guest checkout (Cobasi, Animale, Lojas Pompeia) | No login — vault the buyer's checkout identity once via codespar_manage_connections (save_profile) so later buys don't re-ask for CEP / email / CPF |
| Mercado Livre | Buys on the buyer's own account via a one-time connected login (codespar_manage_connections connect_start / connect_finish) |
Behind the meta-tool, a cart engine resolves product, price, and availability before payment — with adapters for VTEX, Mercado Livre, and a hosted browser-worker for sites without a programmatic API. Cart state is also reachable directly via the /v1/cart REST surface. codespar_shop mints the store's payable Pix; settle it with codespar_pay using method: "pix".
Direct execute
There is no typed wrapper for codespar_shop yet — call via session.execute().
// 1) search a store's catalog
const found = await session.execute("codespar_shop", {
action: "search",
merchant: "cobasi",
query: "ração golden 15kg",
});
// 2) drive the real checkout → returns the store's payable Pix
const cart = await session.execute("codespar_shop", {
action: "checkout",
merchant: "cobasi",
productId: found.products[0].id,
});
console.log(cart.pixCopiaECola, cart.total);# 1) search a store's catalog
found = session.execute("codespar_shop", {
"action": "search",
"merchant": "cobasi",
"query": "ração golden 15kg",
})
# 2) drive the real checkout → returns the store's payable Pix
cart = session.execute("codespar_shop", {
"action": "checkout",
"merchant": "cobasi",
"productId": found["products"][0]["id"],
})
print(cart["pixCopiaECola"], cart["total"])See also
- codespar_checkout — sell-side: create a merchant checkout for a shopper to pay you
- codespar_manage_connections — vault the shopper's checkout identity / connect login-walled stores
- codespar_pay — settle the minted Pix
- E-Commerce Checkout cookbook — cart → checkout → fulfillment
- Tools & meta-tools — full meta-tool list
codespar_checkout
Sell-side merchant checkout — as a merchant, create and process a checkout for a shopper to pay you. Routes to Stripe ACP, Asaas, or x402 by payment method. Call via session.execute().
codespar_invoice
Fiscal invoices. Default rail NFS-e via NFe.io; opt into NF-e for products, CFDI for Mexico, Factura AR for Argentina.