Skip to content

TheraCheck

Re-orders an insurer's therapist directory so the offices most likely to answer and take new patients come first.

Result
Live, ranking 300 Cigna listings in six cities
My role
API, Gemini verifier, voice agents, CI
Team
3 people

Highlights

  • Built the Gemini verifier that turns a therapist's own web pages into three facts and a one-line reason.
  • Built two ElevenLabs voice agents: one asks an office two questions, the other reads the ranked list to a patient.
  • Locked real phone calls behind an allow-list, a landline check, a do-not-call list and server-started calls only.
TheraCheck's home page: the headline Find a therapist who will actually pick up, a search for Cigna in Fresno, the line 14 of 50 Cigna listings in Fresno look reachable, and three listings marked Likely available with names blurred

The problem

Insurer directories list therapists who moved, retired, left the plan or closed their practice to new patients. A 2023 study of California regulator data found about 1 in 3 mental health listings wrong in 2018. If you are looking for care, you call down the list in printed order and reach dead numbers.

TheraCheck takes an insurer and a California city and re-orders that insurer's list. Listings with evidence that the therapist answers and takes new patients go to the top, each with a one-line reason and links to the pages behind it.

What I built

Three of us built it at SanD Hacks Fall 2026 on 14 and 15 November: Waleed Alghaithi, Tracy Ma and me. My part, from my merged pull requests:

  • The API routes the pages and the voice agents read and write through.
  • The verifier: Gemini reads a listing's evidence pages and returns whether the therapist still practises there, lists the insurer and takes new patients, plus a reason of at most 140 characters. I later added fit, fee and licence facts and the self-pay label.
  • The confirm-call agent, which asks an office whether it takes the plan and takes new patients and saves both answers, and the real phone call through Twilio.
  • The patient helper agent, a voice way into the same ranked list for people who would rather talk than use the screen.
  • The CI pipeline, and the fixes from the team's security audit on 15 November.

I also wrote the issue briefs for the site shell, the city and ZIP search and the booking features, and planned that UI with Tracy, who built the search, results and listing pages and the accessibility pass. Waleed built the Bright Data collectors for the Cigna directory and each therapist's own pages, the licence matching against California DCA files and the re-check worker.

How it works

Four parts talk only through a Neon Postgres database: the collector, the verifier, the web app and the voice agents. Pages never call Bright Data or Gemini while you wait. The verifier asks Gemini for structured JSON with yes, no or unknown for each fact, and a reply outside that schema throws, so the listing keeps its old verdict. A listing with no evidence makes no Gemini call at all.

A score starts at 50 and moves with each fact: still practising adds 20 or takes 30, and listing the insurer and taking new patients each add 15 or take 25. The app labels 70 and above Likely available, 40 to 69 Unclear and below 40 Likely dead end. A call result overrides the score.

A phone call costs money and rings a real person, so the call route checks four things before it dials. It calls only numbers on a demo allow-list, never reads the listing's own phone, and allows one call a minute across the app. It refuses any listing whose number is not a landline. The agent says it is an AI voice and that the call is transcribed, and an office that asks not to be called goes on a do-not-call list that nothing removes from. After the audit, the result webhook accepts an answer only for a call the server started in the last five minutes.

Results

TheraCheck is live with 50 Cigna listings in each of San Diego, Los Angeles, San Francisco, San Jose, Sacramento and Fresno. In Sacramento 18 of 50 read Likely available; in San Diego, 4.

Limits and next steps

Web pages suggest and only the office can confirm. At submission 45 of the 50 San Diego listings read Unclear, because many therapists publish nothing about insurance or openings. Nobody has checked the ranking against real offices yet, which is the test that would show it beats printed order.

  • Every call in the demo goes to a teammate's phone, and the page labels those results as demo calls.
  • One insurer, one state: Cigna in California.
  • Two requests in the same instant can both pass the one-call-a-minute check, a gap marked in the code.

Stack

  • Next.js 16 (App Router), React 19 and TypeScript on Vercel
  • Neon Postgres
  • Bright Data Browser API, Web Unlocker and SERP API
  • Gemini API with structured output
  • ElevenLabs Agents and Twilio
  • Vitest and Playwright, with GitHub Actions running static, unit, integration and e2e stages

Published