Democratizing mental health support through AI-powered therapist matching
Every year, millions struggle with mental health challenges but can't access professional support due to cost, availability, or stigma. MindBridge bridges this gap by connecting people who can't afford therapy with volunteer therapistsβguided by Nima AI, our autonomous support assistant powered by NVIDIA Nemotron.
MindBridgeDemo.mp4
Unlike traditional chatbots, Nima AI demonstrates true autonomous agency:
- π€ Intelligent Therapist Matching - Autonomously searches, vets, and recruits volunteer therapists when needed
- π¨ Instant Crisis Detection - Advanced Nemotron-powered reasoning detects risk indicators in real-time
- π¬ Empathetic Intake - Six-stage conversational flow that builds trust without rushing users
- π Adaptive Habit Tracking - Personalized micro-habits with streak tracking between therapy sessions
- π Privacy-First Design - User-controlled privacy tiers (No Records β Full Support)
βββββββββββββββββββββββββββββββββββββββββββββββ
β Coordinator Agent (Nemotron 49B) β
ββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β
ββββββββββΌβββββββββ¬ββββββββββββ¬βββββββββββ
βΌ βΌ βΌ βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββ
βIntake ββCrisis ββResourceββHabit ββQuality β
βAgent ββAgent ββAgent ββAgent ββMonitor β
β(9B) ββ(9B) ββ(49B) ββ(9B) ββ(49B) β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
| Agent | Model | Purpose |
|---|---|---|
| Coordinator | Nemotron 49B | Orchestrates workflow and agent coordination |
| Intake Agent | Nemotron 9B | Conducts empathetic, stage-aware conversations |
| Crisis Agent | Nemotron 9B | ReAct-based risk assessment and intervention |
| Resource Agent | Nemotron 49B | Autonomous therapist search and matching |
| Habit Agent | Nemotron 9B | Adaptive habit recommendations and tracking |
- React 19 + TypeScript - Modern UI with type safety
- Vite - Lightning-fast build tool
- Tailwind CSS - Utility-first styling
- React Router - Client-side routing
- Python 3.13 - Core backend language
- FastAPI - High-performance async API framework
- LangGraph - Multi-agent orchestration framework
- NVIDIA Nemotron (via OpenRouter) - LLM reasoning engine
- Tavily API - Web search for therapist resources
- Pydantic - Data validation and settings management
- JSON - Therapist database (demo)
- Supabase (optional) - Production database
- Redis (optional) - State caching
MindBridge/
βββ agents/ # AI agent implementations
β βββ base_agent.py # Abstract base class
β βββ intake_agent.py # Conversational intake
β βββ crisis_agent.py # Crisis detection (ReAct)
β βββ resource_agent.py # Therapist matching
β βββ habit_agent.py # Habit tracking
β βββ coordinator_agent.py
βββ workflows/ # LangGraph orchestration
β βββ intake_to_crisis_workflow.py
β βββ crisis_to_resource.py
βββ models/ # Data models
β βββ user.py
β βββ therapist.py
β βββ habit.py
β βββ mock_data.py
βββ ui/ # React frontend
β βββ src/
β β βββ App.tsx
β β βββ App.css
β β βββ components/
β βββ package.json
β βββ vite.config.ts
βββ voice_api.py # Voice integration backend
βββ streamlit_demo.py # Demo interface
βββ requirements.txt # Python dependencies
βββ .env.example # Environment template
βββ README.md
- Python 3.10+
- Node.js 18+
- OpenRouter API Key (for NVIDIA Nemotron access)
- Tavily API Key (for web search)
# Clone the repository
git clone https://github.com/yourusername/mindbridge.git
cd mindbridge
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment variables
cp .env.example .env
# Edit .env with your API keys:
# OPENROUTER_API_KEY=your_key_here
# TAVILY_API_KEY=your_key_here# Navigate to UI directory
cd ui
# Install dependencies
npm install
# Start development server
npm run devOption 1: Voice API (Full Experience)
# Terminal 1: Start backend API
python voice_api.py
# Terminal 2: Start frontend
cd ui && npm run dev
# Open http://localhost:5173Option 2: Streamlit Demo
streamlit run streamlit_demo.pyCreate a .env file in the root directory:
# Required
OPENROUTER_API_KEY=your_openrouter_api_key
TAVILY_API_KEY=your_tavily_api_key
# Optional (for production)
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
REDIS_URL=redis://localhost:6379Users control how much AI assistance they receive:
- No Records - Complete anonymity
- Your Private Notes - User-encrypted only (default)
- Assisted Handoff - Platform helps transitions
- Full Support - Complete AI assistance
Uses ReAct (Reason + Act) pattern:
THOUGHT β ACTION β OBSERVATION β DECISION- Detects 5 risk levels: NONE β IMMEDIATE
- Auto-escalates to emergency resources
- Continuous monitoring during sessions
When therapists are scarce, the system:
- Searches internal database
- Web searches via Tavily
- Autonomously reaches out to new volunteers
- Matches based on specialization + availability
- Deterministic recommendations based on user context
- Streak tracking and progress monitoring
- Adaptive difficulty adjustment
- Therapist feedback integration
cd ui
vercel --prod# Procfile
web: uvicorn voice_api:app --host 0.0.0.0 --port $PORTdocker-compose up -dUser describes work/school overload β Intake Agent collects context β Crisis Agent assesses (LOW risk) β Matched with Career Counselor β Habit Agent suggests "End-of-day decompress"
User mentions self-harm β Immediate escalation β Emergency privacy tier β Crisis resources surfaced β Expedited therapist match β Continuous monitoring
This project was built for the NVIDIA Nemotron Hackathon. While primarily a demonstration of agentic AI capabilities, contributions are welcome:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - See LICENSE for details