T.S
← All Projects/AI Mental Health & Mood Companion
AI2025·Full Stack Developer

AI Mental Health & Mood Companion

AI companion with crisis-safe, multi-agent architecture

Next.jsFastAPILangGraphOpenAI APIPythonStructured Outputs
AI Mental Health & Mood Companion
01 —Overview

A full-stack AI mental health and mood companion built with LangGraph, FastAPI, and Next.js. Every message runs through a real-time four-node workflow — risk classification, crisis response, companion conversation, and mood inference — designed around the principle that safety belongs in the architecture, not just the prompts.

02 —The Challenge

Build a conversational AI for a sensitive domain that stays empathetic and useful in normal conversation, but never misses a genuine crisis signal and never improvises during one — while keeping mood analysis fast and independent of user self-reporting.

03 —The Solution

Architected a LangGraph pipeline with four specialized nodes: a Risk Classification Engine using OpenAI Structured Outputs tuned for recall over precision (any parse failure or exception fails safe to high-risk); a template-driven Crisis Response System that bypasses generation entirely to serve verified resources like 988, Samaritans, and Crisis Text Line, with automatic logging; an AI Companion Agent offering brief, non-clinical support and evidence-based coping exercises (breathing, journaling, CBT-inspired reframing); and a decoupled Mood Inference Engine that scores sentiment from -1.0 to +1.0 in the background without overriding the user's own mood reports. An admin dashboard supports human-in-the-loop review of flagged conversations.

04 —Key Results
01Safety mechanisms built into the architecture, not just the prompts
02Recall-focused risk detection with fail-safe defaults to high-risk on any error
03Template-based, hallucination-free crisis interventions with verified hotlines
04Decoupled mood inference keeps response times fast and self-reports authoritative
05Human-in-the-loop admin dashboard for flag review
05 —Screenshots
AI Mental Health & Mood Companion screenshot 1
AI Mental Health & Mood Companion screenshot 2
AI Mental Health & Mood Companion screenshot 3
AI Mental Health & Mood Companion screenshot 4
AI Mental Health & Mood Companion screenshot 5
Project Info
CategoryAI
Year2025
My RoleFull Stack Developer
Tech Stack
Next.jsFastAPILangGraphOpenAI APIPythonStructured Outputs
More Projects

Like what you see?

Let's build something like this together — or something even better.

Hire MeMore Projects