
Key Takeaways
- SoulSync AI provides 24/7 empathetic, personalized patient care, bridging gaps in traditional rehab center models.
- A supervisor agent orchestrates specialized therapy, Wellness Check, and Post-Rehabilitation Agents for a cohesive and adaptive patient experience.
- Built on Azure with Python, GPT-4o-Mini, and LangGraph, ensuring HIPAA compliance, 99.9% uptime, and secure EHR integration.
- The future admin panel will enable therapists to customize agents, manage patients, and track trends, enhancing care personalization.
- Automated check-ins and trend analysis reduce the risk of relapse, while future features, such as predictive analytics, could further transform mental health support.
Mental health recovery, particularly in rehabilitation centers, demands innovative solutions to overcome persistent challenges. SoulSync AI is an AI-driven system designed to enhance patient care by providing continuous, personalized support while alleviating the burden on therapists. Hosted on Microsoft Azure, this innovative system utilizes advanced language technology to listen, analyze, and respond to patient needs in real-time.
Problem Statement
Mental health support in rehab centers faces significant hurdles:
1. Limited Availability of Continuous Care:
Patients often require 24/7 emotional support, but traditional models rely on periodic in-person sessions, leaving gaps that increase relapse risks.
2. Inconsistent Patient Engagement:
Without regular interaction, patients may disengage from their recovery process, exacerbating emotional distress and isolation.
3. Overburdened Therapists:
Professionals struggle to manually track progress, adjust therapy plans, and provide timely interventions for large patient groups.
4. Lack of Personalization and Real-Time Insights:
Generic therapy plans and delayed data analysis hinder the delivery of tailored care and proactive risk detection.
SoulSync AI aims to address these challenges by delivering a scalable, empathetic, and secure solution that ensures ongoing support, dynamic therapy adjustments, and compliance with regulations such as HIPAA.
How are we achieving it?
SoulSync AI employs a multi-agent architecture to create a cohesive, patient-centric experience. A central Supervisor Agent, built using the LangGraph Supervisor framework, orchestrates three specialized agents: Therapy Agent, Wellness-Check Agent, and Post-Rehab Agent. Each agent follows a three-step process:
1. Perception:
Captures patient inputs (e.g., text messages, psychometric responses).
2. Reasoning:
Analyzes data using advanced language models for sentiment, context, and risk assessment.
3. Planning:
Generates tailored responses or actions, such as therapy recommendations or alerts to therapists.
Here’s how it works:
1. Supervisor: Engages patients empathically, utilizing free-text input or a suggestion-based flow (e.g., „Yes/No” options), while capturing emotional cues and conversation history.
2. Therapy Agent: Aggregates real-time feedback and historical data to dynamically refine therapy plans, ensuring adaptability to evolving patient needs.
3. Wellness-Check Agent: Conducts psychometric assessments by asking five random questions based on the user’s emotional track and adapting these questions dynamically, analyzing responses to detect distress and escalating high-risk cases.
4. Post-Rehab-Agent: Monitors long-term recovery with automated check-ins, reducing relapse risks through motivational messages and trend analysis.
These agents operate asynchronously through an event-driven architecture, enabling non-blocking communication. An aggregation service synthesizes its outputs into a unified, context-aware response, ensuring seamless patient interaction. The system integrates securely with Electronic Health Records (EHRs), adheres to HIPAA standards, and optimizes rehab center operations by automating routine tasks.
Technology Stack
SoulSync AI is built on a robust, cloud-native tech stack tailored for scalability, security, and performance:

1. Python:
The core programming language powers agent logic, data processing, and integration with Azure services due to its rich libraries for AI and NLP.
2. Azure OpenAI:
Drives large language models (LLMs) for natural language processing, enabling empathetic conversations, sentiment analysis, and psychometric evaluations. Here, we are using GPT-4o-Mini.
3. Azure Functions:
Facilitates serverless, event-driven workflows, ensuring real-time agent communication and scalability.
4. Azure Cosmos DB:
Provides a secure, globally distributed database for storing patient interactions, therapy plans, and assessment results, encrypted at rest with AES-256 and in transit with TLS 1.3.
5. LangGraph Supervisor Agent Model:
Manages the multi-agent system, routing patient inputs to the appropriate agents and coordinating responses to ensure a cohesive experience.


LangMem for Long-Term Memory: Retains conversation history and patient context using text embeddings, enhancing personalization across interactions.

- Text Embedding: Converts text into vector representations for semantic understanding, improving sentiment analysis and behavioral trend detection.
- Flask: A lightweight Python framework that serves as the backend API, connecting AI logic to the frontend and handling HTTP requests.
This stack utilizes Azure’s infrastructure to achieve 99.9% uptime, ensuring HIPAA compliance and seamless integration with existing healthcare systems. It incorporates user feedback and improves with every piece of feedback given by users through the feedback mechanism and Langmem.
Future Possibilities
SoulSync AI’s roadmap includes a transformative admin panel for therapists. This customizable platform will empower therapists to tailor the system to their specific needs, enhancing its flexibility and impact. Key features include
- Patient Management: A “Patient Overview” displaying total patients, with options to upload progress reports (PDF/ZIP) and track interactions via graphical trends.
- Customizable Wellness Checks: Therapists can edit or delete up to 10 psychometric questions (from which five are contextually selected), aligning assessments with patient conditions.
- Agent Customization: Therapists can:
- Add New Agents: Define custom prompts (e.g., a Stress Management Agent).
- Update Agents: Modify the names or behaviors of existing agents.
- Remove Agents: Eliminate unnecessary agents.
- Enable/Disable Agents: Temporarily adjust workflows (e.g., disabling Post-Rehab Follow-Up for in-center patients) to accommodate changes.
- Interaction Tracking: Visualize patient-AI interactions and mental health trends to provide data-driven insights for informed therapy adjustments.
This admin panel will position SoulSync AI as a therapist-driven tool, fostering personalized care and operational efficiency. Future iterations could integrate predictive analytics, voice interfaces, or wearable device data, further revolutionizing mental health support.