# Powered by RIG — agency-white-label

A white-label AI front desk that **dental marketing agencies resell to their own book of practices**.
Wholesale $250 per practice per month; the agency sets retail (typically $650) and keeps the spread.

The buyer is the **agency owner**, not the dentist. Everything here is built for that conversation.

---

## What's in this directory

| File | What it is |
|---|---|
| `app/` | The working agency console. Open `app/index.html` in a browser. |
| `landing.html` | Conversion landing page aimed at agency owners. |
| `icon.svg` / `icon-256.png` | Product mark. Hand-authored SVG, 512×512. |
| `GTM.md` | ICP, triggers, 5-email sequence, 3 LinkedIn posts, objections, 10 prospect types. |
| `PRICING.md` | Wholesale, retail bands, margin math, RIG-side unit economics, billing mechanics. |
| `app-shot.png`, `app-shot-2.png` | Real screenshots of the console, used by the landing page. |

## Run it

```bash
open ~/Developer/rig-offerings/agency-white-label/landing.html
open ~/Developer/rig-offerings/agency-white-label/app/index.html
```

No build step, no dependencies, no server. Plain HTML/CSS/JS opened straight off disk.

**Useful URLs:**

```
app/index.html#desk                     jump to the live front desk
app/index.html#margin                   jump to the resale model
app/index.html?say=do%20you%20take%20delta%20dental#desk    open mid-conversation
app/index.html?accent=%2333C48D&agency=Northline%20Growth   preview a prospect's brand
```

That last one is a genuine sales tool: send an agency a link that opens the console already wearing their
name and colour.

---

## What is real

- **The AI is real.** The desk calls `http://100.67.126.117:8000/v1/chat/completions` — vLLM serving
  `Qwen/Qwen3-Coder-30B-A3B-Instruct` on the blackwell node (3× RTX PRO 6000) — directly from the browser.
  vLLM returns `access-control-allow-origin: *`, so this works from `file://` with no proxy and no key.
  Verified in a real Chrome session: sidebar reads *"fleet: blackwell live"* and replies come back in
  double-digit milliseconds.
- **The system prompt is real.** Each reply is constrained by the selected practice's record: hours,
  accepted insurance plans, new-patient offer, PMS, and the escalation rules (clinical questions, anything
  over $1,000, and direct "are you a bot" questions all hand off to a human).
- **Booking detection is real.** The model emits a `[BOOKED: Day Time]` token, the app parses it, writes
  an appointment, increments the practice's booked count, and logs an event. Seen working end to end.
- **The white-label engine is real.** Changing agency name, colour, subdomain, patient-facing desk name,
  or voice re-themes the entire UI live via CSS custom properties, rewrites the patient widget preview,
  regenerates the embed snippet, and persists to `localStorage`.
- **All the math is real.** Portfolio roll-up, per-practice spread, the churn-decayed year-one model, and
  the practice-side ROI are computed from the data, not hard-coded. Every figure printed in `GTM.md` and
  `PRICING.md` was recomputed against the same formula the app uses.
- **Adding a practice is real.** It writes into state, updates the roster, the totals, and the picker.
- **The offline fallback is real.** With no network the desk answers from a deterministic rules engine so
  a demo never dies in a prospect's conference room. The UI says plainly which mode it is in.

## What is stubbed

Be straight about this on sales calls.

- **No PMS write-back.** "Written to Dentrix" is a UI event, not an API call. Open Dental has a usable
  API and is the realistic first integration; Dentrix and Eaglesoft need a middleware bridge on the
  practice's machine. Nothing is connected today.
- **No telephony.** Missed-call text-back is simulated in the browser. Real delivery needs a Twilio (or
  similar) number per practice, forwarding configured at the practice, and 10DLC registration.
- **No backend, no accounts, no auth.** State lives in `localStorage`. Two people opening the app do not
  share data. There is no multi-tenant server, no database, and no billing integration.
- **`embed.js` does not exist.** The Deploy tab generates a correct-looking snippet pointing at
  `https://<agency-domain>/embed.js`. That file has not been built and the DNS target is illustrative.
- **The sample book is invented.** Six practices with plausible names, cities, plans and volumes. No real
  patient data, no PHI, and nothing HIPAA-relevant is touched anywhere in this build.
- **The proof story in `GTM.md` Email 3 is illustrative**, not a real customer case. There is no reference
  customer yet. Do not present it as one.
- **Ollama nodes are unreachable from the browser.** rig-96gb, rig-36gb, rig-28gb and rig-256gb all
  answered fine server-side, but they return `403` on a CORS preflight from a browser origin, so they are
  used for batch generation only. blackwell is the only browser-callable node.

## Nearest real thing to build next

1. Twilio number + missed-call webhook → text-back. This is the single feature that produces the ROI the
   whole pitch rests on, and it needs no PMS access.
2. Open Dental API write-back for one pilot practice.
3. A thin backend so state, transcripts and seat billing survive a browser refresh.

Everything else in the console is presentation over a real model, and can stay as-is through the first
few pilots.

---

## How this was built

The console, landing page and icon were hand-authored. First drafts of the cold sequence, LinkedIn posts,
objections, ICP and prospect list were generated in parallel across four fleet nodes (blackwell vLLM,
rig-96gb, rig-36gb, rig-28gb) and then rewritten. Several model-generated claims were cut for being false
— a fabricated "95% accuracy" figure, "integrates with all major PMS platforms", "no churn risk", and
"100% margin on the first $250". Those cuts are listed at the bottom of `GTM.md` so nobody reintroduces
them from an old draft.
