AI-Powered Booking Automation for Tables and Rooms

We design and deploy artificial intelligence systems: from prototype to production-ready solutions. Our team combines expertise in machine learning, data engineering and MLOps to make AI work not in the lab, but in real business.
Showing 1 of 1All 1566 services
AI-Powered Booking Automation for Tables and Rooms
Medium
~1-2 weeks
Frequently Asked Questions

AI Development Areas

AI Solution Development Stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1319
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1226
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    927
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1161
  • image_logo-advance_0.webp
    B2B Advance company logo design
    621
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    897

AI-Powered Booking Automation for Tables and Rooms

"Book a table for two, Friday evening, preferably by the window" — this is a standard request. A button-based chatbot handles it in 5–7 steps. AI-powered booking for tables and rooms is automation that processes natural guest requests. Our AI agent parses the intent from the first message. It extracts date, time, and preferences. Then it checks availability via the restaurant's API. It confirms the booking in a single dialogue. We implemented an architecture with an agentic loop. The LLM calls tools and iteratively refines the data.

The guest writes "five of us on Saturday evening." The agent normalizes the date into ISO. It parses the time range (18:00–22:00). It extracts the number of guests. Then it checks availability. No forms, no operator. This is the key difference from a simple chatbot. The agentic loop allows the LLM to call tools — availability check, booking creation, confirmation sending — and iteratively gather information through dialogue. The prompt includes entity extraction before tool calls. This reduces error rates by 83% based on our project data.

AI Agent Architecture: Agentic Loop

from anthropic import Anthropic
from datetime import datetime, timedelta
import json
import re

client = Anthropic()


class BookingAgent:
    BOOKING_TOOLS = [
        {
            "name": "check_table_availability",
            "description": "Checks table availability in the restaurant",
            "input_schema": {
                "type": "object",
                "properties": {
                    "date": {"type": "string", "description": "Date in YYYY-MM-DD format"},
                    "time": {"type": "string", "description": "Time in HH:MM format"},
                    "guests": {"type": "integer", "description": "Number of guests"},
                    "preferences": {
                        "type": "array",
                        "items": {"type": "string"},
                        "description": "Preferences: window, terrace, private, bar",
                    },
                },
                "required": ["date", "time", "guests"],
            },
        },
        {
            "name": "check_room_availability",
            "description": "Checks room availability in the hotel",
            "input_schema": {
                "type": "object",
                "properties": {
                    "check_in": {"type": "string", "description": "Check-in date YYYY-MM-DD"},
                    "check_out": {"type": "string", "description": "Check-out date YYYY-MM-DD"},
                    "guests": {"type": "integer"},
                    "room_type": {
                        "type": "string",
                        "enum": ["standard", "superior", "deluxe", "suite", "family"],
                    },
                },
                "required": ["check_in", "check_out", "guests"],
            },
        },
        {
            "name": "create_booking",
            "description": "Creates a confirmed booking",
            "input_schema": {
                "type": "object",
                "properties": {
                    "booking_type": {"type": "string", "enum": ["table", "room"]},
                    "slot_id": {"type": "string", "description": "Slot ID from check_availability"},
                    "guest_name": {"type": "string"},
                    "guest_phone": {"type": "string"},
                    "guest_email": {"type": "string"},
                    "special_requests": {"type": "string"},
                },
                "required": ["booking_type", "slot_id", "guest_name", "guest_phone"],
            },
        },
        {
            "name": "send_confirmation",
            "description": "Sends booking confirmation via SMS/email/WhatsApp",
            "input_schema": {
                "type": "object",
                "properties": {
                    "booking_id": {"type": "string"},
                    "channel": {"type": "string", "enum": ["sms", "email", "whatsapp"]},
                },
                "required": ["booking_id", "channel"],
            },
        },
        {
            "name": "cancel_booking",
            "description": "Cancels booking by ID or guest name",
            "input_schema": {
                "type": "object",
                "properties": {
                    "booking_id": {"type": "string"},
                    "guest_phone": {"type": "string"},
                },
            },
        },
    ]

    def __init__(self, booking_backend, notification_service):
        self.backend = booking_backend
        self.notifier = notification_service
        self.sessions: dict[str, dict] = {}

    async def _execute_tool(self, tool_name: str, tool_input: dict) -> str:
        """Executes a tool and returns the result"""
        try:
            if tool_name == "check_table_availability":
                slots = await self.backend.get_table_slots(
                    date=tool_input["date"],
                    time=tool_input["time"],
                    guests=tool_input["guests"],
                    preferences=tool_input.get("preferences", []),
                )
                if not slots:
                    alternatives = await self.backend.get_alternative_slots(
                        date=tool_input["date"],
                        guests=tool_input["guests"],
                        time_range=("18:00", "22:00"),
                    )
                    return json.dumps({
                        "available": False,
                        "alternatives": alternatives[:3],
                    }, ensure_ascii=False)
                return json.dumps({"available": True, "slots": slots[:5]}, ensure_ascii=False)
            elif tool_name == "check_room_availability":
                rooms = await self.backend.get_available_rooms(
                    check_in=tool_input["check_in"],
                    check_out=tool_input["check_out"],
                    guests=tool_input["guests"],
                    room_type=tool_input.get("room_type"),
                )
                return json.dumps({"rooms": rooms[:4]}, ensure_ascii=False)
            elif tool_name == "create_booking":
                booking = await self.backend.create_booking(**tool_input)
                return json.dumps({
                    "success": True,
                    "booking_id": booking["id"],
                    "confirmation_code": booking["code"],
                    "details": booking["summary"],
                }, ensure_ascii=False)
            elif tool_name == "send_confirmation":
                await self.notifier.send(
                    booking_id=tool_input["booking_id"],
                    channel=tool_input["channel"],
                )
                return '{"sent": true}'
            elif tool_name == "cancel_booking":
                result = await self.backend.cancel(**tool_input)
                return json.dumps(result, ensure_ascii=False)
        except Exception as e:
            return json.dumps({"error": str(e)})
        return '{"error": "unknown tool"}'

    async def process_message(self, session_id: str, message: str) -> str:
        """Agentic dialogue for booking"""
        session = self.sessions.get(session_id, {"history": [], "context": {}})
        system = f"""You are a booking agent. Today: {datetime.now().strftime('%A, %d %B %Y, %H:%M')}.

Help book a table or room. Gather necessary data in dialogue:
- For a table: date, time, number of guests, preferences (optional), name and phone
- For a room: check-in/out dates, number of guests, room type (optional), name and phone

Don't ask all questions at once. Find out one or two details at a time.
After guest confirmation — create the booking and send confirmation."""

        session["history"].append({"role": "user", "content": message})
        messages = session["history"].copy()

        while True:
            response = client.messages.create(
                model="claude-sonnet-4-5",
                max_tokens=512,
                system=system,
                tools=self.BOOKING_TOOLS,
                messages=messages,
            )

            if response.stop_reason == "end_turn":
                reply = response.content[0].text
                session["history"].append({"role": "assistant", "content": reply})
                self.sessions[session_id] = session
                return reply

            tool_results = []
            for block in response.content:
                if block.type == "tool_use":
                    result = await self._execute_tool(block.name, block.input)
                    tool_results.append({
                        "type": "tool_result",
                        "tool_use_id": block.id,
                        "content": result,
                    })

            messages.append({"role": "assistant", "content": response.content})
            messages.append({"role": "user", "content": tool_results})

How Does the Agentic Loop Speed Up Booking?

A button-based chatbot requires 7 taps to book a table. The AI agent processes the request 3 times faster. Average booking time is 90 seconds versus 5 minutes by phone. Date errors drop by 83%, and the no-show rate falls from 18% to 9% thanks to automatic reminders. The table below compares booking methods.

Parameter Phone Button-based chatbot AI agent
Average booking time 3–5 min 2 min 90 sec
Booking errors ~15% ~8% ~2%
No-show 18% 15% 9%
Operational costs High Medium Low

The AI agent is 3x better than the button-based chatbot in booking time, and 5x better than phone in error reduction.

What Problems Does the AI Agent Solve?

The main pain point is unstructured guest requests. A button-based chatbot requires many steps. Operators can't handle peak loads. The AI agent solves both: it parses natural language and scales to thousands of requests per minute. Additionally, the no-show rate decreases due to automatic reminders. Our clients typically see cost savings of up to $3,500 per month per location.

Integration with Booking Systems

Example backend for a restaurant via iiko API:

import aiohttp


class IikoBookingBackend:
    def __init__(self, api_url: str, api_key: str):
        self.api_url = api_url
        self.headers = {"Authorization": f"Bearer {api_key}"}

    async def get_table_slots(self, date: str, time: str, guests: int, preferences: list) -> list:
        async with aiohttp.ClientSession() as session:
            async with session.post(
                f"{self.api_url}/api/0/reserve/available_tables",
                headers=self.headers,
                json={
                    "restaurantId": self.restaurant_id,
                    "datetime": f"{date}T{time}:00",
                    "numberOfPersons": guests,
                }
            ) as resp:
                data = await resp.json()
        tables = data.get("reserveTables", [])
        if "window" in preferences:
            tables = [t for t in tables if t.get("tags", {}).get("window")]
        if "terrace" in preferences:
            tables = [t for t in tables if "terrace" in t.get("name", "").lower()]
        return [
            {
                "slot_id": t["id"],
                "table_name": t["name"],
                "capacity": t["capacity"],
                "tags": t.get("tags", {}),
            }
            for t in tables
        ]

    async def create_booking(self, booking_type: str, slot_id: str,
                              guest_name: str, guest_phone: str,
                              guest_email: str = None, special_requests: str = None) -> dict:
        async with aiohttp.ClientSession() as session:
            async with session.post(
                f"{self.api_url}/api/0/reserve/add_reserve",
                headers=self.headers,
                json={
                    "tableId": slot_id,
                    "guestName": guest_name,
                    "phone": guest_phone,
                    "email": guest_email,
                    "comment": special_requests,
                    "source": "ai_bot",
                }
            ) as resp:
                result = await resp.json()
        return {
            "id": result["reserveId"],
            "code": result.get("reserveCode", result["reserveId"][:6].upper()),
            "summary": f"Table {result.get('tableName', slot_id)}, {guest_name}",
        }

Practical Case: Restaurant Chain, 4 Locations

Numbers before implementation: 35–40% of bookings via phone. 25–30 minutes of hostess work during peak. Queue of calls.

After implementing our agent:

  • WhatsApp bot via 360dialog + Telegram bot
  • Integration with iiko for all 4 locations
  • SMS confirmations via SMS.ru

Results from our practice:

  • 68% of bookings automated
  • Booking time: from 3–5 min (phone) to 90 sec (bot)
  • Booking errors (wrong name, date): reduced by 83%
  • Reminders 2 hours before → no-show dropped from 18% to 9%
  • Operational cost savings: up to 40% reduction in staff expenses
  • Average savings per location: $3,500/month
  • Cost of implementation for one location: from $5,000

Problem: guests write unstructured messages. Solution: prompt with entity extraction before tool calls.

Communication Channels and Throughput

Channel Message processing time Peak throughput
WhatsApp Business API 1–2 sec 500 messages/min
Telegram Bot 0.5–1 sec 1000 messages/min
SMS gateway 3–5 sec 100 messages/min
Website widget 1–2 sec 300 messages/min

Что входит в работу

  1. Analysis of current booking processes (call audit, selection of integration points)
  2. AI agent design: LLM selection, tool-use configuration, prompt engineering
  3. Integration with POS/CRM (iiko, r-keeper, 1C) — we guarantee compatibility via REST API
  4. Channel setup: WhatsApp Business API, Telegram Bot, website widget
  5. Notification system development (reminders, confirmations, cancellations)
  6. Testing on real bookings, A/B test
  7. Launch and monitoring for 2 weeks after start
  8. Documentation and API access for your developers
  9. Training session for your support team (2 hours online)
  10. 30 days of post-launch support included

How to Implement the AI Agent: Step-by-Step Plan

  1. Audit — analyze current bookings, identify pain points
  2. Design — define architecture, choose LLM and tools
  3. Integration — connect restaurant/hotel API and communication channels
  4. Training — configure prompts on historical data (few-shot)
  5. A/B test — run the agent parallel with operators, compare metrics
  6. Launch — transfer 100% traffic to the agent with monitoring

Timeline

  • Booking agent (dialogue + logic): 1 week
  • Integration with iiko / r-keeper / 1C: 1–2 weeks
  • WhatsApp / Telegram channels: 3–5 days
  • SMS/email confirmations + reminders: 3–5 days
  • Full system for a chain of venues: 4–6 weeks

How Do We Guarantee Quality?

Every booking undergoes backend validation: availability check, duplicate booking prevention, SMS confirmation. Our experience with restaurant chains (more than 10 projects) minimizes risks. Want a similar result? Get a consultation. Order an audit of your current booking processes and find out how the AI agent can reduce your costs.