MindFello is an AI-driven mental health assistant that provides empathetic conversations, suggests licensed therapists, and enables real-time appointment booking with optional email and push notifications.
It is designed as a state-driven conversational system (FSM) powered by LLM agents, with a user-friendly Gradio web interface.
- Emotion-aware responses using a dedicated Emotional Support Agent
- Follow-up clarification questions to better understand user needs
- Safe, non-diagnostic, non-medical guidance
-
Suggests therapists based on:
- Location
- Language
- Availability
-
Ranks therapists by open slots
-
Explains why each therapist is a good fit
- Slot holding with countdown timer (optimistic locking)
- Prevents double-booking across users
- Confirms appointments instantly
- Push notifications via Pushover
- Email confirmations via SendGrid (optional)
- Built with Gradio
- Live countdown timer for slot holds
- Session-aware state management
User
└── Gradio UI
└── FSM Controller
├── EmotionalSupportAgent
├── FollowUpAgent
├── TherapistSuggesterAgent
├── BookingAgent
├── EmailNotificationAgent
└── NotificationAgent (Pushover)
- FSM (Finite State Machine) controls conversation flow
- Agent-based design for clean responsibility separation
- Optimistic locking for booking safety
- Session memory maintained per user
| Category | Technology |
|---|---|
| UI | Gradio |
| LLM Runtime | Gemini (OpenAI-compatible API) |
| Agent Orchestration | agents SDK |
| Backend Language | Python 3.12 |
| Notifications | SendGrid, Pushover |
| State Management | In-memory FSM |
| Persistence | JSON (doctors & slots) |
git clone https://github.com/your-org/mindfello.git
cd mindfellopython -m venv .venv
source .venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root:
# LLM (Gemini via OpenAI-compatible API)
GOOGLE_API_KEY_2=your_gemini_api_key
GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/
# SendGrid Email
SENDGRID_API_KEY=your_sendgrid_api_key
SENDGRID_FROM_EMAIL=verified_sender@example.com
# Pushover Notifications (optional)
PUSHOVER_TOKEN=your_pushover_app_token
PUSHOVER_USER_KEY=your_pushover_user_keypython app.pyOr if using Jupyter:
demo.launch()The Gradio UI will open in your browser.
- Sent only if user provides an email
- Uses verified sender address
- Plain-text confirmation email
Example email content:
Subject: Your MindFello Booking Confirmation
Hi [Name],
Your booking has been confirmed
Therapist: Dr. Ayesha Rahman
Time: 15 Dec 2025 | 10:00 – 11:00
- Instant push notification on successful booking
- Optional — system continues to work without it
Stored in:
doctors.json
Structure:
{
"id": "doc1",
"name": "Dr. Ayesha Rahman",
"specialty": "clinical_psychologist",
"location": "Dhaka",
"languages": ["English", "Bangla"],
"slots": [
{
"slot_id": "s1",
"start": "2025-12-15T10:00:00",
"end": "2025-12-15T11:00:00",
"booked": false
}
]
}- ❌ No medical diagnosis
- ❌ No medication advice
- ✅ Empathy-first responses
- ✅ Encourages professional help when appropriate
- Database-backed persistence (PostgreSQL / Firebase)
- User authentication
- Rescheduling & cancellation
- Admin dashboard for therapists
- Analytics & monitoring
- Multi-language UI support
Tamzid Khan Software Engineer | AI & Agentic Systems Enthusiast
MIT License — free to use, modify, and distribute.