Chairside · AI booking agent · Vienna, Austria

The booking bot that lets the model read — and never lets it decide.

A customer types one sentence. The bot turns it into a confirmed Google Calendar appointment: it asks for a name, works out the date in code, shows the full date and year, and writes nothing until the customer says “yes”. An LLM reads the message; deterministic rules make every decision.

18
Codex audit rounds
162
Close-out mutants, all killed
240
Logged decisions
550
Commits

Live since 1 November 2026 — anyone can book on the real engine.Real n8n, real Postgres, real Claude calls, real events on the demo’s own Google Calendar and real owner alerts. Only the salon, its prices and its customers are fictional.

Status

What this actually is.

A config-driven booking and lead-capture chatbot for a salon, built as a resellable template: one isolated deployment per client, where a new client means a new config file and new credentials — not new code. Its architecture was approved on 29 June 2026; the public demo went live on 1 November 2026.

It is a demo / learning build: no paying client and no real customers. The salon — “Demo Barber Co.”, its services, prices and hours — is mock config. The engine behind the chat is the real one.

I directed it end to end — every phase plan, every ruling, every live test. The code was written by AI coding agents under that direction: Claude Code implemented, Codex audited independently, and a separate AI workspace drafted briefs and reviews and ran some of the live tests at my request. “How this was built” below says exactly who did what.

Stated limits, not hidden ones: the WhatsApp lane is built but closed and not tested end to end on the current store; the booking race is bounded, not locked; a widget customer is identified by a browser session, not a verified identity; dates are English-only within a 30-day horizon; a second client has only been rendered offline.

Overview

What makes it different.

Most chatbot demos let the model talk. This one treats the model as a translator and puts every decision that touches a calendar behind code.

The model only translates

The LLM returns one JSON object: one of eight allow-listed intents plus slots. It never writes the customer-facing reply, never chooses an action and holds no write permission. Prices come from config — so the bot cannot quote a wrong price.

Dates are resolved in code

“4 November”, “Wednesday 4 November”, “4.11”, “this Wednesday” — the engine works out the day in the shop’s timezone. The model’s own date has no authority. A weekday that doesn’t match is named back, never guessed.

Nothing is written without “yes”

The confirm shows service, full date with year, time and name. A “yes” only counts for the confirm it answers: ask a question in between and the confirm is shown again — nothing is booked on a stale yes.

Double booking, bounded and visible

Google Calendar is the source of truth. The bot writes the event, re-reads the slot, and on a lost race withdraws its own event; if that re-read fails, the owner is alerted. A message delivered twice is claimed once and answered once.

Every failure is visible

Every external call has an error branch with its own flag and a Telegram alert to the owner. If the spend meter cannot be read, the bot fails closed: it hands off instead of calling the model.

A template, not a one-off

Business hours, services, prices, message templates and limits live in one config. A second client is rendered from config offline, and tests hold that render to the committed workflow — a demonstrated render, not yet a second deployment.

The system, end to end

One message in. Watch all three sides move.

The customer sees a chat. Behind it, the engine decides, the calendar changes and the owner’s phone buzzes. Tap a message to send it. Every turn shows what the model returned, what the code then decided, and what got written.

Interactive recreationRebuilt from the Main workflow (node names are its own) and the demo config (every reply is a config template or a sentence the code builds from config). The model’s JSON uses the schema’s shape; its confidence values are illustrative. Nothing on this page calls a model. Clock: Wednesday 4 November 2026, shop time.
The customerchat widget
DB
Demo Barber Co.
online — instant replies
The enginen8n · this turn
The calendarsource of truth
Google Calendardemo calendar
THU5
Opening hours 10:00–19:00. Grey = already busy.
The owner’s phoneTelegram
✈Salon bot alertsfirst lines
No alerts. A booking that goes through is not news.
Things to try: a wrong weekday · a busy time · “no” at the confirm · a question before “yes” · ask for a person, then release it below.
The other side

The owner sees one screen.

This board is connected to the conversation above. Hand a chat to a person up there and it lands here; release it here and the bot answers again up there — the release itself is announced on the owner’s Telegram. A booking made above shows up under “Coming up”. The real dashboard sits behind Cloudflare Access, listens on 127.0.0.1 only and reads the database through a SELECT-only role.

Interactive recreationRebuilt from web/dashboard (HandoffQueue, ReleaseButton, AppointmentsPanel, LeadsPanel, mask.ts). Rows are synthetic; labels, wording and masking are the product’s own. The real capture is in Proof below.
DEMO DATA

Owner dashboard

4 of 4 database reads · one read per panel · no auto-refresh

Waiting for you

Appointments

Today

No bookings today.

Coming up
    Mirrored from Google Calendar. If a sync ever failed, the calendar is right and this list is not — this board cannot tell you which.

    Leads

    • Anna M. S.+43…67 · newwhatsapp
    • Leo B.— · newwidget

    Masking happens on the server before anything reaches the browser: “Anna Maria Schmidt” → “Anna M. S.”, “+43 660 0000067” → “+43…67”, a widget session id → its first six characters.

    A template, not a one-off

    Same engine, two shops.

    The repository carries two client configs. Send both shops the same five messages. The logic is the same; everything that differs — name, services, prices, hours, wording — comes from config, which a renderer writes into ten marked slots of the workflow.

    Interactive recreationLeft: client.config.example.json, the live demo. Right: client.config.example-b.json, rendered offline only and never deployed. Replies are what the engine’s code and templates produce from each config.
    DB
    Demo Barber Co.
    Vienna
    Europe/Vienna
    Between the two
    0lines of logic changed
    10marked slots filled by the renderer
    business.nameDemo Barber Co. → Hofgasse Barbers
    timezoneVienna → Berlin
    services3 → 4
    hours.sat10–18 → 09–16
    hours.mon10–19 → closed
    templates9 reworded
    credentialswould need its own
    HB
    Hofgasse Barbers
    Berlin · example config
    Europe/Berlin

    Why this matters: a new client is a config file and new credentials, not new code. The renderer may only touch its ten marked slots (config literals, alert chat ids, the bot-check secret, few-shot examples); a test fails if anything else in the rendered workflow differs from the one the tests and audits checked.

    Decisions

    The calls I made — and what they cost.

    No customers to point to. What there is: a log of 240 dated decisions. Here are the six I’d defend in an interview, each with the road not taken.

    The LLM translates; code decides

    The model may only return intent JSON from an allow-list; routing is IF/Switch, replies are config templates or code-built from config data, the date is computed in code. Rejected: an advisory resolver the model could bypass — an early audit found four HIGH findings with that one root cause — and asking the model for prices.

    CostThe model must copy the customer’s date words verbatim; when it paraphrases, the bot re-asks instead of guessing.

    The calendar is the truth — write, then verify

    Google Calendar holds availability. The bot inserts the event, re-reads the slot, and only a won slot is mirrored to Postgres; on a lost race it withdraws its own event and hands off. Rejected: assuming a lock exists where none does.

    CostA truly simultaneous pair can both withdraw — nobody is booked; if the verify read fails, two events can remain and the owner is alerted. Bounded, not locked.

    Claim the message first

    Every inbound message is claimed with INSERT … ON CONFLICT (message_id) DO NOTHING before any work. A duplicate delivery cannot double-book. Rejected: record-before-respond (slower, still racy) and simply documenting the risk.

    CostAt-most-once: a run that dies after its claim is not retried.

    Move off Airtable mid-project

    The free Airtable quota could not carry even the system’s own idle consumption: it ran out on 6 October 2026 and the bot had no data layer for about twelve days. Migrated to self-hosted Postgres with a nightly backup that is restored and compared before it counts. Rejected: staying on Airtable — waiting for the quota reset or changing plan.

    CostA database to run, back up and restore for every client.

    Stop chasing phrasings — change the structure

    After four audit rounds found new ways a model can drop part of a date, a rule set in advance kicked in: no fourth adjustment — the rule is frozen and the design changes. The defence became structural — the full date and year in the confirm, a 30-day horizon, no write without “yes”. Rejected: full text-side coverage that re-asks harmless messages.

    CostThat phrasing class, a reply lost in transit and two concurrent turns from one sender are recorded bounds.

    Honest about the limits, in public

    The privacy page names a controller and a contact, the legal basis (GDPR Art. 6(1)(f)), every retention period and every processor. The README keeps a table of what is real and what is demo, and a list of what is not built. Rejected: a polished page that implies customers.

    CostIt reads less impressive than a launch post — and survives the first follow-up question.
    Autonomy

    Guardrails, not good faith.

    The demo is public and every message can cost money. Every way it could run away is capped, measured or switchable.

    Bot check

    Cloudflare Turnstile in Managed mode, interaction-only: the box appears only when Cloudflare asks. The engine verifies every widget token; a fake one gets 403.

    Edge rate limit

    30 requests per 10 seconds per IP and data centre on the webhook path. Measured: 40 requests in 2.4 s — requests 31 to 40 were blocked with 429.

    Spend cap, fail-closed

    A monthly LLM budget ($10 in the demo config) is checked before every call. If the meter cannot be read, the bot hands off instead of calling the model.

    Kill switch · turn limit

    A config kill switch and a 12-turn limit per conversation run in the guard block, before any paid call. A tripped guard costs nothing.

    Human handoff lock

    Low confidence twice, a refusal to give a name twice, or a date that can’t be resolved twice → a person takes over. Until the owner releases it, the bot only says “A team member is already helping you here — they'll reply shortly.”

    Retention on a timer

    Message text in conversations is erased after 30 days; callback requests too, behind a safety limit that refuses to delete a suspicious share at once. Bookings and owner alerts are deleted on request. Backups expire after 14 days.

    Second opinion

    Audited by a model that didn’t write it.

    From Phase 7 on, every audit target went to Codex in a sandbox, with the prompt and the raw answer committed. Findings were fixed, or ruled as a bound in writing — never silently dropped.

    RoundDateScopeFindingsOutcome
    Phase 7 · round 125 OctNine critical-review targets12 HIGH · 15 MED · 4 LOWFixed across two rechecks, then shipped live
    Phase 828 OctRendering a new client from config4 MED · 2 LOWFive fixed, one ruled a bound
    Public demo29 OctSpend brake and retention2 MEDFixed with tests and mutants
    Name capture · 3 rounds1 NovThe name across turns, the sanitiser, the privacy wording2 MED · 2 LOWAll fixed
    Date phrasing · R1–R31–2 NovThe calendar-date resolver8 HIGH · 8 MEDFixed; stop threshold declared
    Date phrasing · R4–R62 NovSame class, then the structural defence6 HIGHStopped by the rule; structure + recorded bounds
    “no” at the confirm · 2 passes3 NovThe decline path1 MED · 3 LOWFixed; last LOW recorded under the two-pass cap
    Close-out · 2 passes3 NovConfirm freshness, alerts, dashboard1 HIGH · 2 MED · 3 LOWThe HIGH ruled a bound and pinned by a test

    Eighteen recorded rounds, 41 verbatim answer files under docs/codex/. Counts are each row’s own passes; the two Phase 7 rechecks are folded into the outcome.

    Under the hood

    Architecture.

    Self-hosted where the data lives, managed where it doesn’t need to be.

    Channels
    Embeddable widget
    one script tag · Shadow DOM
    Demo site
    Next.js on Vercel · only its custom domain is public
    WhatsApp adapter
    built · inbound closed for spend safety
    Edge
    Cloudflare Turnstile
    Managed · interaction-only
    Rate limit
    30 / 10 s per IP and data centre
    Tunnel + Access
    the engine is reached through the tunnel · owner paths behind Access
    Engine
    n8n · Main workflow
    198 nodes (173 functional, 25 notes)
    n8n · Purge
    nightly retention with a safety limit
    Data
    PostgreSQL
    self-hosted · conversations, appointments, leads, claims
    Nightly backup
    restored and compared before it counts · 14 days
    Services
    Claude Haiku 4.5
    structured output · temperature 0
    Google Calendar
    source of truth for availability
    Telegram
    owner alerts
    Owner
    Dashboard
    Next.js · 127.0.0.1 · SELECT-only role · behind Access
    Proof, not mockups

    Straight from the live demo.

    No recreations in this section. Every frame below is a capture of the running system — only cropped and resized. Click to enlarge.

    Owner dashboard — synthetic data seeded for this capture, removed afterwards: the DEMO DATA ribbon and the Waiting for you queue with one masked widget conversation and its Release to the bot link
    The owner dashboard — top of the page

    The real board, captured on 127.0.0.1 with one synthetic conversation in the queue. The sender is masked to its first six characters; “notification NOT confirmed” because no alert was ever sent for a seeded row.

    Live demo chat: '12 November is a Thursday — did you mean Thursday 12 November, or a Wednesday?', then the name question
    A weekday that doesn’t match

    The customer wrote “Wednesday 12 November”. The engine names the conflict and asks — then asks for the name.

    Live demo chat: confirm with the full date and year, the customer answers no, the bot says nothing is booked
    The year in the confirm, and a real “no”

    “Haircut, Thursday 12 Nov 2026 11:00 for Kim Moss — shall I book it?” A “no” books nothing and asks what to change.

    Chats: the public demo, 5 November 2026 · synthetic name · shop time (Europe/Vienna). Dashboard: the real board, seeded with synthetic rows for the capture and cleaned afterwards.

    How this was built

    One person, three AI tools, one rule: verify.

    Building with AI agents is the skill this project demonstrates — so the roles are written down, and nothing counted as done until something other than its author had checked it.

    Direction

    Me

    Goals, scope and every ruling; approved each phase plan; ran live tests myself and ordered the rest; created every credential by hand.

    Architecture & review

    Cowork

    A separate AI workspace that drafted the architecture and each round’s brief, verified results against the committed code, and — at my request — ran two live test scripts and changed some Cloudflare and Vercel settings.

    Implementation

    Claude Code

    Wrote the workflows, frontends, guards, tests and docs; ran a security auditor before every push.

    Independent audit

    Codex

    A second model that did not write the code, run in a sandbox; from Phase 7 on its prompts and raw answers are committed.

    Stack

    Built with.

    n8n (self-hosted)Claude Haiku 4.5PostgreSQL Google Calendar APINext.jsVercel Cloudflare TurnstileCloudflare Tunnel & AccessTelegram JSON SchemaClaude CodeCodex
    30
    Golden-set cases
    12
    Jailbreak cases
    37
    Unit test files in check-all
    16
    Critical-review targets, all closed