An AI companion for patients between therapy sessions
A mental-health practice
- Sector
- Mental health
- Service
- AI process automation
Problem
Between sessions, patients are on their own with the exercises and doubts the therapy raises. The practice wanted to offer support in that time without asking psychologists to be reachable around the clock, and without putting sensitive health data at risk.
Approach
We built an app for the phone where patients sign in with an avatar and an access code, with no name, email or phone number. Psychologists read the transcripts, give the AI general and per-patient instructions and documents, and generate reports in which every quote is checked to match the original message word for word. Safety has two independent layers: a separate risk classifier checks each message before the AI answers, and the safety rules always sit last in the prompt. The practice’s guidelines and a seven-module psychoeducation manual, about 15,000 words in total, are loaded in full with prompt caching instead of a vector store. Each practice’s data is isolated with row-level security in Postgres, staff sign in with two-factor authentication, and the language model runs with zero data retention.
Outcome
The app went into a commercial pilot with real patients. Psychologists see how patients are doing between sessions and decide what the AI may and may not say, and the safety behaviour is covered by an evaluation suite of 36 safety test cases.
In numbers
- safety test cases in the evaluation suite
- 36
- independent safety layers before any answer
- 2
- commercial pilot with real patients
- 5 weeks
Stack
- NestJS
- Prisma
- PostgreSQL with row-level security
- React (Vite)
- Claude API
Recognise a similar problem in your business?
Book a free call and tell us about it. We will explain how we would tackle it and how quickly a first version could be in production.