Product Station · Commerce

Terre & Table

DemoPlayground

Terre & Table is a demo store app built by Convoy AI. It sells fine food from the Drôme: you browse its products, build a selection, choose a delivery slot and order.

Thanks to this station, AI agents can safely do all of that as well. No order is placed without the signed-in person's own confirmation, three a day at most.

Opened to agents, through a station

Source

API operations

catalogue

  • searchProductsreadmapped
  • getDeliveryWindowsreadmapped

orders

  • checkDeliverablereadmapped
  • quoteDeliveryreadmapped
  • placeOrderwritemapped

identity

  • sendVerificationCodewritemapped
  • checkVerificationCodewritemapped

Not mapped

  • getOrdernot mapped
  • getProductnot mapped
  • getStocknot mapped
  • listOrdersnot mapped

An operation the station does not map is out of every agent's reach.

Capabilities

MCP
Skills and playbooks agents can call
  • productsskill

    Help the person put together a selection of products, by taste and budget.

    Calls · searchProducts

  • deliveryskill

    Confirm Terre & Table delivers to the person, then offer a delivery slot.

    Calls · getDeliveryWindows, placeOrder

  • place-an-orderplaybook

    Put together a selection of products, then choose a delivery slot.

    Steps · products, delivery

Policies

Checked by the station

At each access

  • Not signed in: may call searchProducts, getDeliveryWindows, checkDeliverable, quoteDelivery.anonymous
  • Signed in: may call searchProducts, getDeliveryWindows, checkDeliverable, quoteDelivery, placeOrder.signed-in
  • Signing in proves the person's email with a one-time code the app sends and checks itself; the agent never sees a password.identity

At each action

  • Choosing a slot asks the person their region, postcode, recipient's name, confirmation email and delivery address.delivery
  • checkDeliverable must accept the address, and quoteDelivery gives the fee, before the slot enters the selection.delivery
  • Three orders a day per person; the fourth is refused until tomorrow.orders-per-day

At the submit

  • No order is placed without the signed-in person's own confirmation.submit_guard

Products, then delivery

What you will see: Browsing is free and the playbook keeps the order: products first, then a slot.

Agent connected to the station through MCP
  1. HumanSome products for a dinner, delivered in Lyon.
  2. AgentI'll look for products first.
  3. MCP callproduits(limit: 8)
  4. StationProducts from the shop's API, with their price. No sign-in needed to browse.OKRule applied: playbook prise-de-commande
  5. The product carousel: Tomates Anciennes Bio at 4.90 EUR and Pommes Gala Locales at 3.20 EUR, each with an Ajouter button, then an empty Ma sélection box and 8 results.
  6. MCP callselection_add(produit: "tomates-anciennes-bio"), selection_add(produit: "pommes-gala-locales")
  7. StationBoth added to the selection: 8.10 EUR.OKRule applied:
  8. MCP calllivraison(region: "lyon")
  9. StationThe form asks region, postcode, name, email and address; then the slots for Lyon, each to choose. The shop checks the address and quotes the fee.OKRule applied: checkDeliverable, quoteDelivery
  10. The delivery step: Produits done, Livraison open, the address given, and three slots to choose: tomorrow 8h-12h, tomorrow 17h-20h, Saturday 8h-12h.

Connect your own agent to the station and test it live.

Try with
Convoy Station · Terre & TableTo connect
Step 1: connect to Claude

Open settings, connectors section, add a custom connector and paste the station MCP address.

https://mcp-terre-et-table-station.convoy-ai.com/mcp
Step 2: paste a request into Claude
Some products for a dinner, delivered in Lyon.
Order it now.
Book me a delivery slot for Friday first.

Then watch the agent: the station refuses, limits or asks for a human, as in the replay.

The configuration in detail

station_config.yaml (Console template)Read the docs →

Everything the station does fits in this file. The replay above applies it, and a copy starts from it. The values are examples to adapt, not a recommendation.

# Terre & Table: your own shop station on Terre & Table's demo API, ready to publish as it is.
#
# Terre & Table is a fictional French delicatessen whose API is public for you to build on:
# https://terre-et-table.convoy-ai.com (its OpenAPI: /openapi.json, its pages: /docs). It has
# products, stock, delivery windows, a delivery check and quote, POST /orders, and a sign-in by
# one-time code. It never reads an order back to anyone: what others filed stays private.
#
# What this station does, in order:
#   1. `products` searches the catalogue and shows each product with its price and picture;
#   2. `delivery` asks where to deliver, checks Terre & Table delivers there (`check`), prices the
#      slot (`update`), then files the order on Terre & Table's API (`submit`);
#   3. to file it, the person SIGNS IN, then confirms (`submit_guard`): browsing and choosing are
#      open to anyone, the order is a signed-in person's own act, and the assistant never orders.
# It speaks French and English: the person's own language when it is one of them.
#
# To try it, sign in with any @example.com address (Terre & Table's demo sends no e-mail and accepts
# only those), with the code shown at https://terre-et-table.convoy-ai.com/demo/inbox.
#
# Then try its POLICIES: the rules Convoy applies whatever the model says. One is on (each person's
# orders per day): see it on the station's Policies tab. Another example is below as a comment,
# ready to enable: remove the « # » of the lines it says, check, publish. A new version each time: roll back from the Versions tab, watch the
# effect in Analytics.

station:
  id: my-shop   # Convoy sets this to your station's name when you publish
  name: "Terre & Table"
  # Signing in: a one-time code to the person's e-mail, sent and checked by Terre & Table's own
  # operations. The address signed in is the order's (`customer_email`, the delivery form's field
  # marked `identifies`): no one files an order under someone else's address.
  identity:
    providers:
      email:
        mechanism: otp
        verifies: customer_email
        via: tenant
        send: sendVerificationCode
        check: checkVerificationCode
  # Policies for the whole station, each cited by its name (defined under `policies:` below).
  # `at: submit`: judged on every line the submit would send, before the person's confirmation.
  policies:
    - {policy: orders-per-day, at: submit}

global:
  language: fr          # the default, when the person speaks neither of the station's languages
  languages: [fr, en]
  currency: EUR
  locale: fr-FR

domain:
  domain_type: retail
  entity_name: product
  entity_name_plural: products

voice:
  tone: friendly
  persona: "a delicatessen assistant, warm and precise about where each product comes from"
  rules:
    - "Never invent a price, an origin or a stock level: ask the API."
    - "Say plainly when a product is out of stock, and offer an alternative."
    - "Check the delivery area BEFORE proposing a slot."
  emoji: false

# Terre & Table's API. Three entries on one API with different operations: what reads, what
# writes and what signs in are separated, so the boundary shows in the config instead of being
# implied. No key: this API is open (filing an order and the sign-in are rate-limited).
apis:
  - name: catalogue
    openapi_url: "https://terre-et-table.convoy-ai.com/openapi.json"
    base_url: "https://terre-et-table.convoy-ai.com"
    operations:
      - {id: searchProducts, access: read}
      - {id: getDeliveryWindows, access: read}
    auth: {type: none}

  - name: orders
    openapi_url: "https://terre-et-table.convoy-ai.com/openapi.json"
    base_url: "https://terre-et-table.convoy-ai.com"
    operations:
      - {id: checkDeliverable, access: read}
      - {id: quoteDelivery, access: read}
      - {id: placeOrder, access: write}
    auth: {type: none}

  - name: identity
    openapi_url: "https://terre-et-table.convoy-ai.com/openapi.json"
    base_url: "https://terre-et-table.convoy-ai.com"
    operations:
      - {id: sendVerificationCode, access: write}
      - {id: checkVerificationCode, access: write}
    auth: {type: none}

# Who may call what. Closed by default: an operation no profile grants is called for no one.
# Anyone browses, chooses and is quoted a delivery; only a signed-in person files an order. Asked
# before that, Convoy has them sign in, then files it.
profiles:
  anonymous:
    when: "$identity.authenticated == false"
    grants:
      - catalogue.searchProducts
      - catalogue.getDeliveryWindows
      - orders.checkDeliverable
      - orders.quoteDelivery
  signed-in:
    when: "$identity.authenticated"
    grants:
      - catalogue.searchProducts
      - catalogue.getDeliveryWindows
      - orders.checkDeliverable
      - orders.quoteDelivery
      - orders.placeOrder

# Reusable policies: written once here, cited by name where they apply (a skill's `select.guards`,
# or `station.policies` above). A policy nobody cites is refused when the config loads.
policies:
  # ON. Each person's orders per day: at most 3. Each delivery slot filed is one order (`when`),
  # `count: true` counts it once, and `scope: identity` counts per signed-in person, whatever the
  # conversation; the day starts at 00:00 UTC. The fourth order is held before the confirm, and
  # the person reads `reason`. Try `mode: observe`: it refuses nothing and writes in the journal
  # what it would have refused.
  orders-per-day:
    budget: {count: true, per: day, scope: identity, max: 3}
    when: "$item.kind == 'slot'"
    reason: "three orders a day per person; come back tomorrow"

skills:
  - name: products
    cognitive:
      objective: "help the person put together a selection of products, by taste and budget"
      diagnose: [the kind of product, the budget, any dietary preference]
    # What the model may give: the person's words, a category and the page. Each may be left
    # out, and the API's own default applies.
    params:
      q: {type: text, set_by: [agent], required: false}
      category: {type: text, set_by: [agent], required: false}
      limit: {type: integer, set_by: [agent], required: false}
      offset: {type: integer, set_by: [agent], required: false}
    invoke:
      method: searchProducts
      args: {q: "$params.q", category: "$params.category", limit: "$params.limit", offset: "$params.offset"}
    kinds: {product: {}}
    # How a result is drawn: its name, its price, its picture. `from` is the API's own field.
    present:
      fields:
        name: {from: name, type: text, role: title}
        price: {from: price, type: price, role: billed}
        image: {from: image_url, type: image}
    # OFF. A cap per product line: at most 6 of each. To enable it, uncomment the next 2 lines.
    # select:
    #   quantity: {max: 6}
    render: {component: carousel}

  - name: delivery
    cognitive:
      objective: "confirm Terre & Table delivers to the person, then offer a delivery slot"
      diagnose: [the region, the postcode, the slot wanted]
    params:
      region: {type: text, set_by: [agent]}
    invoke: {method: getDeliveryWindows, args: {region: "$params.region"}}
    kinds: {slot: {}}
    # A slot only makes sense once products are chosen: choosing products first is enforced.
    depends_on: {products: {on_loss: clear}}
    present:
      fields:
        name: {from: label, type: text, role: title}
    select:
      max_items: 1
      guards:
        # The form the person fills (its labels are one text: the shop's French); the submit below
        # reads these fields back as `$item.fields.*`.
        - form:
            region: {type: text, required: true, label: "Région", enum: [lyon, grenoble, valence, paris]}
            postcode: {type: text, required: true, label: "Code postal"}
            customer_name: {type: text, required: true, label: "Nom du destinataire"}
            customer_email: {type: email, required: true, label: "E-mail de confirmation", identifies: true}
            customer_address: {type: text, required: true, label: "Adresse de livraison"}
        # `check` asks Terre & Table whether it delivers there; the person is told if not.
        - check: checkDeliverable
        # `update` replaces the slot's price by Terre & Table's quote.
        - update: {price: quoteDelivery}
    # The order itself, filed on the person's confirm. A dotted key builds the API's nested body.
    submit:
      - name: placeOrder
        mode: request
        tool: placeOrder
        args:
          body.items: "$selection[kind=product]"
          body.region: "$item.fields.region"
          body.window: "$item.ref"
          body.delivery_fee: "$item.price"
          body.customer.name: "$item.fields.customer_name"
          body.customer.email: "$item.fields.customer_email"
          body.customer.address: "$item.fields.customer_address"
          body.customer.postcode: "$item.fields.postcode"
          # One key per person and order: a retry reuses it, so an order is never filed twice.
          body.idempotency_key: "$action.key"
        # Terre & Table's order line is `{slug, quantity}`: how a selected product becomes one.
        line:
          slug: "$line.ref"
          quantity: "$line.quantity"
    render: {component: cards}

# The order of a complete purchase: products, then a slot. Both are required.
playbooks:
  - name: place-an-order
    goal: "Put together a selection of products, then choose a delivery slot."
    activation: {when: "true"}
    tasks:
      products:
        skill: products
        required: true
      delivery:
        skill: delivery
        required: true
        after: [products]   # a slot comes once products are chosen: the steps show it in this order

# Who submits. The person in the conversation, with their own click (`confirm`): the assistant never
# files an order. And only the room's owner, SIGNED IN (`submitted_by`): holding the conversation's
# code is not enough to order in someone's name.
submit_guard:
  confirm: true
  submitted_by: [{who: owner}]