ML

Project

HEARDDD 2.0

A restaurant operations platform with an autonomous AI agent that analyzes the business overnight and proposes actions to management — used daily by real kitchen and bar staff.

in productionNext.js 16 · React 19 · TypeScript · Prisma + PostgreSQL · Tailwind v4 · Claude API · Twilio · Upstash QStash · Railway · S3
In the LabWatch the agent work a night →An interactive replay of the nightly pipeline — close, triage, investigation, morning proposals.

What it is

HEARDDD is the operations platform for a bar & grill in Bigfork, Montana. The kitchen and bar staff use it every day: recipes with plating photos, schedules and shift swaps, opening and closing checklists, multi-location inventory counts, vendor ordering, a prep log, even a gamified staff incentive system called Duck Bucks. It isn’t a prototype — the restaurant runs on it.

Everything is shaped by how restaurant staff actually behave. Nobody remembers a password before a brunch shift, so login is a passwordless link delivered over WhatsApp, with device tokens that quietly re-authenticate. Notifications go out WhatsApp-first with automatic SMS fallback when delivery fails. Recipes translate into Spanish on demand for the kitchen crew.

And then there’s the part I’m most interested in: an autonomous AI agent that works the night shift. After close, it reads the day’s operational data — counts, orders, prep entries, logs — investigates anything that looks off, and by morning has written up insights and proposed concrete actions, like raising the par level on something that keeps running out. Nothing acts alone: the agent proposes, a manager approves or dismisses, and every step is audited. It has been doing this night after night in production, and its proposals affect actual purchasing.

How it’s built

  • A three-phase nightly pipeline with model tiering

    A cron job (Upstash QStash hitting a secured endpoint) kicks off after close. Phase 1, triage: Sonnet scans recent operational observations and flags what's worth investigating. Phase 2, investigation: Sonnet digs into each flagged thread with agent tools — inventory history, prep search, consumption-rate calculators. Phase 3, synthesis: Opus produces insights with confidence scores that decay over time, plus proposed actions surfaced in a manager approve/dismiss workflow with a full audit trail. A real agentic loop: observe, investigate with tools, propose, human approval.

  • RAG chat with two-model routing

    Haiku builds a manifest of the restaurant's documents — a summary and keywords per doc — and routes each question to the one to three relevant ones. Sonnet answers with that selective context plus live database data, like actual recipes and the user's real shifts, streaming over SSE. The cheap model routes; the strong model answers.

  • AI recipe sync

    Managers drop raw .docx recipes in a folder. Claude parses each into structured data, fuzzy-matches against the database to decide create-versus-update, and streams per-file progress to the admin UI over SSE. A recursive document pipeline handles .docx, PDF, and markdown with mtime caching.

  • Resilient messaging

    WhatsApp-first delivery with automated SMS fallback: delivery-status webhooks feed a pending-message queue, so a failed WhatsApp message retries over SMS without anyone noticing. On-demand AI recipe translation for Spanish-speaking staff is cached and debounced.

  • Cost-aware AI architecture

    Haiku routes, Sonnet works, Opus synthesizes — with selective context and caching throughout, so the whole AI layer is cheap enough to run every single night.

Links

All projects