← All posts
November 4, 2026 · 7 min read

Inside HaiO: From a Real-Time Booking Platform to an AI Agent for Event Businesses

How HaiO's real-time platform works, how I added HaiO Agent on top of it in 2026 without letting the AI touch data on its own, and where the product is heading.

HaiO, by PT Hai Bersama Indonesia, is a booking platform for event and beauty services: makeup artists, hair stylists, photographers and wedding organizers (called partners) on one side, customers planning weddings, graduations and events on the other. I have built it since 2019: the Angular admin dashboard, the Flutter mobile app, and the Node.js backend behind both. In October 2026 I added a new layer on top: HaiO Agent.

The platform underneath

  • A WebSocket gateway (Socket.io) carries GPS position updates and chat messages; chat latency sits around 45 ms.
  • PostgreSQL holds reservations, payments and cash flow, where consistency matters most.
  • Firebase (Firestore, Realtime Database and Cloud Messaging) handles live data and push notifications; the mobile app uses Firestore's offline cache so partners keep working on weak connections.
  • Invoices are generated as PDFs and reach the client's inbox in under 2.4 seconds; payments run through Midtrans.

Why an agent, not a chatbot

Partners lose hours every week to admin: checking which orders are waiting, chasing deposits, replying to reviews, recording expenses, blocking dates. A chatbot that only answers questions would not remove any of that. So HaiO Agent is built as a personal manager for partners (and a personal assistant for customers) that can actually do the work, with one strict rule: the AI never changes anything by itself.

How a turn works

  • Check access and quota, load the last 12 messages and the user's remembered facts, then run a model + tool loop of at most 5 rounds.
  • Read tools return exact database values: orders, schedule, payments, balance, cash-flow summary, CRM customers, reviews, calendar, packages, profile. The system prompt forbids guessing numbers, names, dates or prices.
  • propose_* tools (accept or reject an order, request a deposit, send an invoice, record cash, create or update a package, reply to a review, block dates, withdraw funds, send a message, broadcast a promo, and more) never execute. They create a confirmation card; the action runs only after the user approves it, through the same controller the app's own buttons use.
  • Tool output is treated as data, never as instructions, so a customer's message or a review cannot steer the agent.

Keeping model costs predictable

  • Three tiers the user can see: Fast (Gemini), Smart and Smartest (Claude), with a fallback chain if a model fails.
  • Plans (Free, Assistant, Manager) set a daily message quota; smarter tiers cost more quota per message, and a budget guard caps spend. Paid plans are sold in-app through Midtrans Snap (QRIS and virtual accounts).
  • Routine work costs zero tokens: payment reminders, event reminders at D-7, D-1 and the day itself, unconfirmed-order nudges, a morning briefing at the partner's chosen hour, and a Monday weekly report are all generated from data and templates.
  • An autopilot handles billing and follow-ups on the partner's behalf in three modes per partner (auto, tap-to-approve, off); every step is keyed by a unique ref_key so nothing is ever sent twice.

Memory the user controls

When a partner says "I usually ask for a 30% deposit" or "call me Mas Al", the agent stores it with a remember_fact tool, up to 40 facts per user, without an extra AI call. The facts are added to the next prompt, the user can list and delete them, and secrets or sensitive numbers are never stored even if asked.

Where HaiO is going

HaiO Agent is live for all partners. The plan is for HaiO to become the AI agent built specifically for event and beauty service businesses: one that knows the vocabulary of deposits, packages, moodboards and event days, runs the admin, and leaves every decision with the partner.

The takeaway

Give each kind of data the store that suits it, and give the AI the same rule: it may read everything through tools, but it changes nothing without a human saying yes. That is what makes an agent safe enough to put in front of a business.

AI AgentArchitectureReal-timeNode.jsClaudeGemini
See the project in my portfolio →