
“Can you book me next Tuesday afternoon?” sounds simple. It is actually a chain of decisions: identify the service, resolve a relative date, check availability, collect contact details, create the booking, and issue a confirmation.
The model should lead the conversation. It should not invent availability.
Give the assistant small, explicit tools
SyntaxLab's receptionist demo exposes distinct operations for checking availability, booking, rescheduling, and cancellation. The prompt instructs the assistant to check the diary before offering a time and to collect the required fields before booking.
This is a better design than giving a model unrestricted database access. Each tool has a narrow purpose, typed parameters, and an application-owned implementation. Tool calling is a multi-step loop: the model requests a function, the application executes it, then the result returns to the model. OpenAI function calling
Make time explicit
Booking systems should resolve “next Tuesday” to an actual date, use the business timezone consistently, account for opening hours and service duration, and explain the interpretation back to the customer. The demo supplies Dubai-local context and a short scheduling horizon to the assistant.
Time is a frequent source of silent failure. Production work also needs a defined policy for daylight-saving changes, service buffers, staff calendars, and concurrent reservation attempts.
Confirm only after the system succeeds
The assistant should say a booking is confirmed only after the booking tool returns a successful record. It should include a reference, date, time, service, and a next step such as an email or calendar event. If the tool fails, it should state what it can and cannot do, rather than generating a confident confirmation.
Keep the conversation auditable
Save the customer-visible turns and the meaningful tool outcomes: offered slots, booking reference, reschedule target, cancellation, and confirmation status. This supports customer support, debugging, and evaluation of the agent’s behaviour.
Project evidence
syntaxlab-backend/src/booking-agent.ts implements a persisted demo conversation and a tool-calling loop over availability, booking, rescheduling, and cancellation. syntaxlab/src/routes/demos.booking.tsx presents the calendar and chat. The project demonstrates the pattern with sample businesses and appointments; it does not evidence a live customer-calendar integration.