Applied AI
AI waiter agent and kitchen display
Two-agent prototype for restaurants: an AI waiter that understands orders in plain language and an AI-free kitchen, organised by section, that queues and times every order and analyses each service.
Tools
- Claude Haiku 4.5 (Anthropic API)
- Tool use
- Netlify Functions
- Preact
- Web Speech API
- Deterministic simulation
Own prototype. Demonstration project built for this portfolio: the restaurant, menu and prices are made up.
Situation
In a busy restaurant, an order passes through several hands: the waiter jots it down in a hurry, allergen questions depend on what they remember, and the kitchen receives orders with no clear sequence and no idea how long each has been waiting. At peak times, every mistake ends up on the table. And the crew is allocated to sections from memory, with no data on where the kitchen gets stuck.
Solution
Two agents with distinct roles. In the dining room, an AI waiter understands the order in plain language and uses tools to check the menu and the state of the kitchen and to create the order: everything it says about dishes, prices, allergens and waiting times comes from data and rules, and the order is validated against the menu before reaching the kitchen. The kitchen uses no AI: queue, timers and priorities are deterministic logic, predictable, auditable and with no per-use cost. Each dish goes to its section (pizza oven, hot line, salads and cold starters, desserts and wash-up), and gluten-free dishes go to a separate area run only by the designated person. At the start of service each employee is assigned a section, and capacity and waiting times are worked out per section. At peak time the kitchen prioritises by dish; when the wait goes up, a rule automatically notifies the online ordering platforms (via API or webhook) of the estimated wait, and the waiter tells guests in the dining room. Guests see what stage their order is at (in the oven, nearly ready, ready), and the waiter knows it too if they ask. Every dish is recorded, and the service analysis shows demand, bottlenecks and the best crew allocation, always by section and never by person. AI is used only where it adds value: understanding people and talking to them. Rules make the decisions.
Result
A working prototype you can try in the browser: from an order in plain language to a ticket in the kitchen, read aloud, with allergen information always taken from the menu and the usage and cost limits a public-facing service needs. In a simulated peak with fictitious data, automatic priority gets 8 of 10 tables served on time, against 7 of 10 in order of arrival, without lengthening the longest wait (19 minutes in both cases). No online order is turned away, and all 4 are ready within the time quoted to the customer; with the platform's usual time, only one would have been. Over eight weeks of simulated services, the analysis points to the pizza oven as the bottleneck: with a single person, 56% of pizzas run late, against 7% with two. And the crew planner finds that on a Friday night with 7 people it pays to put 3 on pizzas and 2 on the hot line (83% of orders on time) rather than 2 and 3 (81%).
How it works
The guest orders in plain language
“One margherita without basil and two beers.”
The AI waiter checks the menu and the kitchen
Through tools: it never answers from memory. It knows the wait in each section and warns guests when the kitchen is busy.
Decision point
Is everything on the menu?
Yes
It summarises the order and asks for confirmation.
No
It says so clearly and offers what is available.
Order validated against the menu
Dishes, quantities and allowed changes. Only menu data reaches the kitchen, never free text.
AI-free kitchen: sections, queue, timers and voice
Each dish goes to its section, gluten-free dishes to their own area, drinks to the bar. At peak time, priority by dish; when the wait goes up, an automatic notice to the online platforms. Guests see what stage their order is at.
Order served and recorded
Each dish records when it arrives, starts and is ready, its section and the crew size: the basis for the service analysis.
Demo
Order in the dining room as you would with a waiter and watch the ticket reach the kitchen. The restaurant, menu, prices, employees and history are made up.
Order in plain language, as you would with a waiter. The agent checks the menu, answers allergen questions and, once you confirm, sends the order to the kitchen, where the display queues it, times it and reads it aloud.
Fictitious restaurant, menu, prices and staffDining room
Virtual waiter · AI
What the waiter knows about the kitchen: Normal load · estimated wait ~12 min · no delay notice
- Waiter: Hello and welcome to Trattoria Ficticia! What would you like? I can help you with the menu and allergens.
Ideas to get started
Kitchen
Kitchen display · no AI
Service crew · Friday dinner · 7 people (2-3-1-1)
Assign each (fictitious) employee to a section. In the pizza oven and on the hot line, one person handles gluten-free dishes, with their own area and utensils.
- Employee 1
- Employee 2
- Employee 3
- Employee 4
- Employee 5
- Employee 6
- Employee 7
- Orders in queue
- 0
- Portions pending
- 0
- Average wait (min)
- 0
Wait by section
- Pizza oven ~12 min
- Hot line ~10 min
- Salads & cold starters ~5 min
- Desserts & wash-up ~3 min
- Gluten-free ~12 min
Normal serviceQueue in order of arrival
Normal loadestimated wait ~12 min
Online platforms: usual time (15 min)
10 tables and 4 fictitious online orders in about 17 min, with the service crew cooking on its own. The clock switches to ×30.
Order queue
No orders yet. When the waiter sends one, it will appear here and be read aloud.
Service analysis
Fictitious historyEight weeks of fictitious services, Tuesday to Sunday, lunch and dinner, generated with the same kitchen simulator. Demand changes with the day and the hour, and the crew changes from one service to the next (sick days, extra hands, people switching sections). Each dish records when it arrives, starts and is ready, its section and how many people were in it.
Your service, live
Dishes that have gone through the kitchen display during this visit, with the same record. They are kept only in your browser and cleared on reload.
No dishes ready yet: order something in the dining room, send the sample order or simulate a peak time.
The dining room uses AI (Claude Haiku 4.5) only to understand and converse; the menu is its only source. The kitchen uses no AI: queue, timers and alerts are fixed logic. Up to 15 messages per conversation. Please do not enter personal data.
More details
AI with clear boundaries
- The menu is the only source. The model looks dishes up with a tool and the order is validated on the server: it cannot invent dishes, ingredients or prices. On allergens it only reports what is declared and never claims a dish is “safe”.
- “Gluten-free” only where it can be guaranteed. It is a regulated claim: the dish must not exceed 20 mg/kg of gluten (Regulation (EU) No 828/2014). The waiter only uses it for dishes made in the gluten-free area with their own utensils; for everything else it says “no gluten declared”.
- AI communicates; rules decide. The estimated wait, the load level and the delay notice to the platforms are calculated by fixed rules. The waiter only passes them on and cannot change them, not even if someone claims to be the manager.
- No personal data. The waiter never asks for names, phone numbers or payment details, and the table is set by the screen itself.
- Bounded cost. Short replies, a cap on messages per conversation, limits per visitor and per day, and a monthly spending cap on the API account. The key never reaches the browser.
- If the AI fails, service carries on. The kitchen does not depend on the model: it works just the same with a sample order.
Thoroughly tested: fixed rules around the model
The waiter was put through a battery of 65 test conversations, many of them tricky: allergens and coeliac disease, a minor asking for a beer, someone posing as the manager, requests for discounts, cancellations, impossible quantities, notes for the kitchen, other languages and a forged chat history. Real failures came up, such as saying an order had been sent when it had not, making up a price or promising a cancellation it could not make. The critical ones were not fixed with instructions alone, but with rules on the server:
- If the guest confirms the order that has just been summarised, the server forces it to be sent; if the reply still claims it was sent without sending it, the turn is repeated.
- Totals and per-dish waiting times are worked out by a tool (revisar_pedido), not by the model. Any amount that does not come from the tools or the conversation is corrected before the guest sees it.
- When an allergy is involved, a reply that guarantees something is “safe”, “suitable” or “risk-free” is corrected too.
- Every reply from the waiter is signed by the server: the history that comes back from the browser cannot be forged to make it “say” something it never said.
The battery is rerun after every change to the instructions, and the rules have automated tests with a simulated model, at no cost.
The waiter in person, and order tracking
The conversation takes place in an illustrated trattoria, by day or by night depending on the page theme. The waiter, a caricature, gestures according to what is happening: he greets you, takes out his notepad while you type, shows you the menu, does the chef’s kiss when recommending, gives a thumbs-up when the order is sent, raises a finger for allergens, checks his watch when the kitchen is busy and comes out with the plate when your order is ready. The gestures are chosen by fixed rules, not by the AI. Below the chat, order tracking shows what stage each of the table’s orders is at (received, in the oven or on the hot line, nearly ready, ready), how many minutes are left and whether it is running late. The waiter receives the same tracking with every message, so “how is my order going?” gets an answer based on data, not guesswork.
Sections and the service crew
The kitchen works by section, like a real one: pizza oven, hot line, salads and cold starters, and desserts and wash-up (whoever does desserts also washes up, so they handle less at once). At the start of service you choose the day and assign each employee a section. Capacity comes from the people and the equipment in each section: for example, each pizza chef handles 3 batches at once and the oven takes 8. On the pizza oven and the hot line, one person is designated for gluten-free dishes, with their own area and utensils, and only they prepare those dishes; without one, the service cannot start. Each section has its own wait, so the waiter can say a salad will come out well before a pizza.
Peak time: priority measured, not assumed
With 4 orders in the queue or 10 portions pending, the kitchen switches to “peak time” on its own, and returns to normal service with a lower load so it does not flip back and forth. The priority rule was chosen by measuring several alternatives on the same orders. Across 30 scenarios, with different loads and crew allocations, it never does worse than order of arrival, either in tables served on time or in the longest wait, and an automated test checks this again with every change. And the simulation makes one conclusion clear: when the kitchen is overwhelmed, no ordering fixes it; you need more hands.
Busy kitchen: no order turned away, the real wait communicated
Load is measured by what a new order would wait: the pending work in each section shared among the people in it, plus the dish’s own preparation time. From 20 minutes, the kitchen automatically notifies the online ordering platforms of that wait, updates it if it changes by 5 minutes or more, and withdraws the notice once it drops below 17: online customers see a realistic time and the restaurant does not lose the order. In the demo the notice is a simulated webhook (the call is shown, but nothing is sent); in a real restaurant it would connect to the platform’s API or to an order integrator, which allow the preparation time to be updated. In the dining room, the waiter mentions the wait when the load is high and suggests dishes from the least busy sections.
Service analysis: by section, never by person
Each dish records when it arrives, when it should start, when it starts and when it is ready, its section and how many people were in it. To show what those records can reveal, the demo generates eight weeks of fictitious services, Tuesday to Sunday, lunch and dinner, with the same kitchen simulator: demand changes with the day and the hour, and the crew from one service to the next. The panel shows demand by day and hour, the busiest services, the most ordered dishes and the share of gluten-free, the dishes that run late most often, the sections that act as bottlenecks and how each section performs by crew size. The crew planner tries every possible allocation against that service’s actual demand and proposes the best one. In a real restaurant, the records would go to a database with a dashboard on top (for example, PostgreSQL and Superset); each chart shows the equivalent SQL query.
There is no employee ranking, on purpose. Using AI to evaluate workers’ performance is high-risk under the EU AI Act (Annex III); in Spain, any algorithm that affects working conditions must have its rules disclosed to the works council (art. 64.4.d of the Workers’ Statute), and the GDPR requires personal data to be kept to a minimum. Besides, a section’s pace depends on the workload and the crew, not just on who is in it. That is why the records keep how many people were in each section, not who.