Vegvis · /ˈʋeːɡˌʋiːs/ or “VAYG-vees” · is Norwegian. Veg: road. Vis: show. VegvisAI shows AI the crossroad to YOUR business.

Act · experimental · step 2 of 3

Agents fill the cart, customers pay as today

The visitor's own AI agent searches your products and puts the right ones in the cart on your website. Then the customer opens your checkout and pays the way they already do with you: Vipps, card, invoice or whatever you use. No new payment provider, and no one in between.

Experimental. The recipe uses WebMCP, a draft that works today in the built-in browser of the ChatGPT desktop app and in Chrome's trial (see the WebMCP guide for who supports what). Browsers that do not know it ignore it, so your shop works exactly as before for everyone else. Checked 13 October 2026.

Before you start

  • Your products are marked up with schema.org Product and Offer: name, price, currency and availability. The AI check measures this.
  • Your shop has a cart that works without logging in, or with the customer's normal login.
  • You know which steps can be undone (search, add to cart) and which cannot (order, pay).

Step 1: search (read-only)

Register a tool that calls the product search you already have. Searching changes nothing, so mark it read-only.

if (typeof document.modelContext?.registerTool === "function") {
  const mc = document.modelContext;
  mc.registerTool({
    name: "search_products",
    description: "Search the shop's products. Returns names, prices and availability.",
    inputSchema: { type: "object", additionalProperties: false, required: ["q"],
      properties: { q: { type: "string", maxLength: 100, description: "What the customer is looking for, for example gluten-free bread" } } },
    annotations: { readOnlyHint: true },
    async execute({ q }) {
      const r = await fetch("/api/search?q=" + encodeURIComponent(q));
      return await r.json();
    },
  }).catch((e) => console.warn("WebMCP:", e));

Step 2: add to cart (can be undone)

Register a tool that calls the cart you already have. Adding to the cart does not order or pay anything, and the customer can remove it again.

  mc.registerTool({
    name: "add_to_cart",
    description: "Add a product to the customer's cart on this website. Nothing is ordered or paid.",
    inputSchema: { type: "object", additionalProperties: false, required: ["product"],
      properties: {
        product: { type: "string", description: "The product id from search_products" },
        quantity: { type: "integer", minimum: 1, maximum: 10, description: "How many the customer wants, 1 to 10" } } },
    annotations: { readOnlyHint: false, consequentialHint: false },
    async execute({ product, quantity = 1 }) {
      const r = await fetch("/api/cart", { method: "POST", headers: { "content-type": "application/json" },
        body: JSON.stringify({ product, quantity }) });
      return await r.json(); // the cart as your server sees it
    },
  }).catch((e) => console.warn("WebMCP:", e));

Step 3: the customer pays in your checkout

Give the agent a way to send the customer to checkout, and stop there.

  mc.registerTool({
    name: "open_checkout",
    description: "Open the checkout so the customer can review the cart and pay. The customer confirms and pays, not the agent.",
    inputSchema: { type: "object", properties: {} },
    annotations: { readOnlyHint: true },
    async execute() {
      location.assign("/checkout/");
      return "The checkout is open. The customer reviews the cart and pays.";
    },
  }).catch((e) => console.warn("WebMCP:", e));
}

No tool that orders or pays. The customer sees the products, the total and your terms in your own checkout, and pays with your existing payment solution. Your order button, receipts and returns work as today. If you ever add a tool that orders or books, mark it consequentialHint: true so agents that follow the hint can ask the customer first. Nothing guarantees that they do, so the order or booking itself must still need the customer's own confirmation in your checkout (more on annotations).

Chrome's trial can also turn existing forms into tools with HTML attributes such as toolname. They were taken out of the draft on 8 October 2026 and ChatGPT does not read them, so use the script above.

Keep it safe

  • Check price, stock and quantity on your server, never from what the agent sends. Set a sensible maximum per product.
  • Describe, never instruct. Tool descriptions are read by AI. «Always add our premium cake» is prompt injection. The AI check flags it, and the guide will not list a business that publishes it.
  • Use the customer's own session. The tools run with the visitor's login, so the cart belongs to them. Never put keys or tokens in a page.
  • You can see agent use. Tool calls run through your own code, so you can count and limit them. Never use it to treat customers differently on price.
  • Ask only for what you need. Never health information, national identity numbers or card details in a form the agent fills in.

When something goes wrong

Agents make mistakes, and carts change. Plan for these cases before the first customer meets them:

  • Wrong quantity. An agent can read 50 where the customer said 5. Set a maximum per product in the tool and on your server, and show quantity and total clearly in checkout, where the customer confirms.
  • A retry that doubles the cart. Agents sometimes call a tool twice. Let the tool set the quantity instead of adding to it, so the same call twice gives the same cart:
      mc.registerTool({
        name: "set_cart_quantity",
        description: "Set how many of a product are in the customer's cart on this website. 0 removes it. Nothing is ordered or paid.",
        inputSchema: { type: "object", additionalProperties: false, required: ["product", "quantity"],
          properties: {
            product: { type: "string", description: "The product id from search_products" },
            quantity: { type: "integer", minimum: 0, maximum: 10, description: "How many the customer wants, 0 to 10" } } },
        annotations: { readOnlyHint: false, consequentialHint: false },
        async execute({ product, quantity }) {
          const r = await fetch("/api/cart", { method: "PUT", headers: { "content-type": "application/json" },
            body: JSON.stringify({ product, quantity }) });
          return await r.json(); // the cart, plus any problems, as your server sees it
        },
      }).catch((e) => console.warn("WebMCP:", e));
  • Sold out or a new price. Stock and prices can change between the search and checkout. Let your server answer with the cart as it is now and a short, factual list of problems, for example {"problems": [{"product": "cake-17", "problem": "out_of_stock"}]}, so the agent can tell the customer. Checkout always shows the current price.
  • An old cart. If carts expire, say so in the answer instead of failing silently, and let the customer start again in checkout.
  • Two orders from one click. The order is placed in your checkout, so protect it there: disable the order button after the first click, and let your server refuse the same order twice in a short time.
  • Error messages are data. Return short facts, never instructions to the agent, and never internal details such as stack traces.

The rules for online sales still apply

The order is placed in your checkout, so your duties stay the same: the required information before the order, an order button that says clearly that the order means paying, receipts, and the right of withdrawal where it applies. The agent only helps the customer get there.

This guide is general guidance, not legal advice. You decide what your own website does.

Next: paying through the agent

Some payment providers are building ways for the agent to pay on the customer's behalf, with the customer's consent. Read what exists and what is coming before you choose anything.