#AI agent for restaurants and delivery

An AI agent for a restaurant answers diners on WhatsApp, Instagram and your website: it books and cancels tables in your reservation system, answers questions about the menu, allergens and opening hours, and sends people to your ordering page. It only says a dish is free of an allergen when your menu says so, and it hands severe allergies and large groups to a person. With Vatio you describe that agent in one vatio.yml file and it runs on your own WhatsApp number and Instagram account.

#What the agent handles

Most of what diners write, usually mid-service, is one of these:

A typical exchange on WhatsApp:

Diner: hi! table for 4 tomorrow night?

Agent: Sure. Tomorrow we have 20:00 or 21:30 for four. Which one works?

Diner: 20:00. one of us is celiac, is that ok?

Agent: Several dishes are marked gluten-free and cooked separately, like the mushroom risotto. I’ll note it on the booking so the kitchen knows. What name should it be under?

Behind those replies were one call to find_tables and one knowledge lookup on gluten-free dishes, both visible in the inbox next to the reply they produced.

#Before writing anything: five questions for the restaurant

  1. Who writes in, and about what? Usually reservations, the menu and opening hours, then delivery.
  2. What does the menu say about allergens? Which dishes are confirmed free of what, and what the kitchen cannot rule out.
  3. What is a large group? The party size above which a person takes over, and what counts as an event.
  4. Which systems does it read from? The reservation system’s API, the ordering platform (an API, or only a page to link to), the menu.
  5. What must it never promise? That a dish is allergen-free, a specific table, a discount.

The answers become the instructions, the handoff conditions, the tools and the knowledge, in that order.

#The vatio.yml

workspace: olivo-kitchen
agent:
  name: Olivo Kitchen
  personality: Friendly and quick, like a good host. Short messages.
  instructions: |
    You answer diners of Olivo Kitchen about reservations, the menu,
    allergens, opening hours and orders.

    Reservations: ask for the date, time and number of people. For 8 or
    fewer, call find_tables and offer at most three times. Before calling
    book_table, ask for a name and read the booking back. Only say a
    table is booked when book_table returned it. Put any allergy or
    occasion in the notes. To cancel, ask for the reservation code, then
    call cancel_reservation.

    Groups of more than 8, private events and buyouts: do not look for
    tables. Say the events team handles them and hand off.

    Menu, allergens, hours and location: search knowledge_lookup first.

    Orders: send the order link. For an order's status, ask for the order
    number, then call order_status.

    Phone numbers: on WhatsApp the tools already have the diner's. On
    Instagram and the website, ask for it along with the name, the
    reservation code or the order number.

    Rules you never break:
    - Never say a dish is free of an allergen, or safe for an allergy,
      unless the menu in knowledge says so for that dish. When it does,
      also say what the menu says about cross-contact.
    - If someone mentions a severe allergy, do not reassure them. Note it
      on the booking, say the staff will confirm with the kitchen, and
      hand off.
    - If someone describes an allergic reaction happening now, tell them
      to call 911 or go to the nearest emergency room now.
  tools: [find_tables, book_table, cancel_reservation, order_status, knowledge_lookup, identify_contact]
  knowledge: [restaurant]
  links:
    order:
      url: https://olivo-kitchen.example/order
      when: The diner wants to order delivery or takeaway.
  handoff:
    after_turns: 10
    when:
      - the diner mentions a severe allergy
      - a group of more than 8, a private event or a buyout
      - a complaint about a meal, a delivery or a charge

A few choices worth explaining:

#Tools: reaching your reservations

A tool is one HTTP request to your backend, described in YAML. Store the address and key as secrets:

vatio secrets set OLIVO_API https://api.olivo-kitchen.example
vatio secrets set OLIVO_API_KEY sk_live_...

tools/find_tables.yml:

description: Find free tables for a date and party size.
when_to_use: The diner wants to book a table for 8 people or fewer.
parameters:
  type: object
  properties:
    date: { type: string, description: "YYYY-MM-DD" }
    party_size: { type: integer, minimum: 1, maximum: 8 }
  required: [date, party_size]
access: public
request:
  method: GET
  base_url: "$env.OLIVO_API"
  path: /availability
  headers:
    Authorization: "Bearer $env.OLIVO_API_KEY"
  query:
    date: "$params.date"
    party_size: "$params.party_size"
respond:
  data:
    slots: "$.slots"
  message:
    when_empty: No free tables for that party size on that date.
    default: "Found {{count}} free times."

tools/book_table.yml:

description: Book a table in a free slot.
when_to_use: The diner chose a time from find_tables and gave a name.
parameters:
  type: object
  properties:
    slot_id: { type: string }
    name: { type: string }
    phone: { type: string, description: "Instagram and web only. On WhatsApp the tool uses the contact's number" }
    notes: { type: string, description: "Allergies or occasion, as the diner said them" }
  required: [slot_id, name]
access: public
request:
  method: POST
  base_url: "$env.OLIVO_API"
  path: /reservations
  requires: [params.slot_id, params.name]
  headers:
    Authorization: "Bearer $env.OLIVO_API_KEY"
  body:
    slot_id: "$params.slot_id"
    name: "$params.name"
    phone: "$params.phone || $contact.phone_number"
    notes: "$params.notes"
respond:
  data:
    reservation: "$.reservation"

On WhatsApp the diner’s number comes with their message, so phone falls back to $contact.phone_number and the agent asks for it only on Instagram and the website. cancel_reservation is a POST with the reservation code and the phone, filled the same way, and your backend checks that the two match before cancelling anything: the model fills a tool’s parameters, and anyone can type a code. order_status follows the same rule, order number plus phone, and returns only the stage and the estimated time.

For orders, links.order is the simplest setup, and the safeguards strip any URL the agent was not given. If your ordering system has an API, placing the order can be a tool that creates it and returns a payment link; a link a tool returned is one the agent may send. The agent never asks for card details.

#Knowledge: the menu and opening hours

vatio kb create restaurant
vatio kb write restaurant menu-mains menu-mains.md
vatio kb write restaurant menu-desserts menu-desserts.md
vatio kb write restaurant hours-and-location hours-and-location.md

Write the allergens in each dish’s own section, so a lookup for one dish brings its allergens with it:

# Menu: mains

## Mushroom risotto
Arborio rice, mushrooms, parmesan, butter. Vegetarian, not vegan.
Allergens: milk. Gluten-free: yes, cooked in pans used only for gluten-free dishes.

## Pistachio tagliatelle
Allergens: gluten, egg, milk, tree nuts (pistachio).

## About allergens in our kitchen
We handle gluten, nuts, sesame, shellfish and milk. Only dishes marked
gluten-free are prepared separately; for other allergens we cannot rule
out cross-contact.

Vatio does not read your website, so the menu goes into entries. When a dish changes, a supervisor edits its entry from the inbox, and every edit is kept as a version.

#Allergens: where a helpful answer is the risk

A wrong allergen answer usually comes from the agent trying to help: reading “chocolate tart” and deciding it probably has no nuts. The setup above closes that path. The menu states allergens per dish, and the instruction allows only that source, so for any dish it does not cover the answer is “I can’t confirm that, I’ll check with the kitchen”. Severe allergies go to a person, because only the kitchen knows what went through the fryer today.

The rules hold for voice notes and fragments too. Vatio transcribes audio and groups messages sent in a row, so “table for 6 saturday” followed by “oh, my wife has a nut allergy” is read as one request.

#Try it before any diner does

vatio push
vatio chat "Table for 4 tomorrow at 8pm? One of us is celiac"
vatio chat --new "Is the tagliatelle ok? My son has a severe nut allergy"
vatio chat --new "Does the chocolate tart have nuts?"
vatio chat --new "We are 25 people for a birthday on Saturday"
vatio chat --new "I ate there an hour ago and my lips are swelling"
vatio chat show

The last four matter most: a severe allergy to hand off, a dessert the menu does not cover, a group it must not seat, and a reaction where the only answer is the emergency number. chat show reads every tool call. Then add your phone and Instagram handle as test accounts on the shared WhatsApp and Instagram previews, up to five each, and repeat them there.

#Make it better every week

When the manager reads the inbox, they flag any wrong reply and write what should have happened: “the risotto has parmesan, it is not vegan”. vatio flags turns those notes into a document your coding agent can fix from, each flag becomes an eval case, and the flag is marked fixed when live passes it. See Improve your agent.

#Go live

vatio publish

Then connect your WhatsApp Business number and Instagram professional account on the inbox’s Channels page, then switch WhatsApp’s Live on. Instagram answers as soon as the account is connected. A reply from the WhatsApp Business app on the host stand’s phone takes the conversation over until it is released. The agent only answers messages diners send; reminders stay with your reservation system.

What your local rules require you to tell diners about allergens is yours to check, and the menu entries are where it has to be right.

Frequently asked questions

Can an AI agent take restaurant reservations on WhatsApp?

Yes. The agent calls your reservation system through tools you describe in YAML: one to find free tables and one to book. Vatio runs the conversation on WhatsApp, Instagram and your website, and your reservation system stays the one that confirms the booking.

Can an AI agent answer allergen questions safely?

Only from what you write. Put the allergens of every dish in the menu entries the agent reads, and tell it never to say a dish is free of an allergen unless the menu says so. Severe allergies go to a person through handoff, because only the kitchen knows what it cooked today.

Can the agent take delivery and takeaway orders?

It can send the link to your ordering page and, with a tool, tell someone where their order is by order number and phone. Placing the order in the chat needs your ordering system's API behind one tool that returns a payment link. The agent never takes payment details itself.

Does the agent send reservation reminders or promotions?

Yes, when your reservation system asks for them. It calls Vatio's Messages API for each diner, with an approved WhatsApp template when they have not written in 24 hours, and the agent handles the reply. Promotions to your list work the same way, one request per guest from your system; Vatio has no campaign dashboard of its own.

What happens when someone asks for a table for a large group?

Above the limit you set, the agent does not look for tables. It says the events team handles groups and hands the conversation off, and it shows in the inbox as waiting for a person. Vatio does not notify anyone of a handoff yet, so someone needs to have the inbox open.

Updated: