Inspiration
Mental health support is critical, yet professional help is not always accessible. We wanted to create an AI assistant that provides empathetic conversation while prioritizing user safety, especially during crisis situations.
What it does
Medical-AI-Therapist is an AI-powered therapeutic assistant. It engages users in supportive conversations and detects crisis signals like self-harm or emergencies, routing them to immediate help while integrating with multiple LLMs for flexible, intelligent responses.
How we built it
- Frontend: Streamlit for a simple and interactive UI.
- Backend: LangGraph to create an agent graph with a dedicated Safety Node that intercepts dangerous inputs.
- AI Integration: OpenRouter to connect with LLMs such as Gemini, OpenAI, and Claude.
- Deployment: Docker for containerized, cross-platform usage.
Challenges we ran into
- Ensuring real-time detection of crisis situations without slowing down responses.
- Designing a modular system to safely integrate different LLMs.
- Balancing empathetic conversation with strict safety protocols.
Accomplishments that we're proud of
- Successfully implemented a Safety Node that can intercept harmful messages and provide emergency resources.
- Built a fully functional, deployable app with modular AI integration.
- Maintained a lightweight UI with Streamlit while handling complex backend logic.
What we learned
- How to design AI systems with safety-first architecture.
- Effective integration of multiple LLMs through a unified routing system.
- Practical experience with LangGraph, Streamlit, and containerized deployments.
What's next for Medical-AI-Therapist
- Expand support for more nuanced mental health topics.
- Integrate voice-based interactions for accessibility.
- Add analytics to track and improve AI therapeutic effectiveness while preserving privacy.
Built With
- langchain
- langgraph
- openrouter
- python
- streamlit
Log in or sign up for Devpost to join the conversation.