-
Command center: track XP, emotional history, daily streaks & active quests. Every wellness action becomes measurable progress.
-
5-agent AI therapist: reads your words, sees your face via webcam & responds with real-time CBT techniques. Therapy, reimagined.
-
After every session, the Quest Agent generates a personalized RPG challenge to drive real-world behavioral change & award XP.
-
6-step Guided CBT Diary: identify automatic thoughts, examine evidence, and rebuild balanced thinking — step by step.
-
Cognitive Shift Complete! The AI delivers a clinical insight after each diary session and awards 25 XP for self-reflection.
-
Navy SEAL breathing techniques visualized through a glowing orb that expands & contracts in sync with your nervous system.
-
Pin daily gratitude as animated polaroid cards — a neuroplasticity technique that rewires the brain toward positivity (+10 XP).
-
AI-generated 7-day clinical roadmap based on your mood, challenges & therapy style — with daily CBT tasks and XP quests.
-
AI-generated mental health quizzes on Anxiety & CBT — making psychoeducation interactive, gamified & rewarding with instant XP.
💡 Inspiration: The Global Mental Health Crisis
The mental health crisis is accelerating, yet traditional digital health solutions remain static—glorified journaling apps or rigid, unfeeling decision trees. Therapy is expensive, inaccessible, and often intimidating. We realized that true digital therapy cannot be passive; it must be active, empathetic, and dynamically adaptive.
Our inspiration was to bridge the gap between clinical Cognitive Behavioral Therapy (CBT) and engaging digital experiences. By merging Autonomous Multi-Agent AI Architecture with Biometric Vision Feedback and RPG-style Gamification, we aimed to create an AI companion that doesn't just "talk" to you, but actively sees your emotions, remembers your history, and guides you through a gamified healing journey.
⚙️ What it does: The Core Pillars
TheraQuest is an enterprise-grade, gamified CBT platform. It operates through four core pillars:
- Autonomous AI Therapist: A highly empathetic, context-aware agent that conducts real-time CBT sessions, utilizing cognitive restructuring techniques to challenge negative thought patterns.
- Biometric Vision Analysis: Users can grant webcam access to allow our Vision Agent to analyze micro-expressions and physical affect, providing non-verbal emotional context to the Therapist Agent in real-time.
- Dynamic Quest Engine: Therapy shouldn't end when the chat closes. The AI dynamically generates personalized, XP-driven "Quests" (e.g., “The Shield of Boundaries: Say ‘no’ to one unreasonable request today”) to drive behavioral activation.
- Contextual RAG Memory: The system retains long-term emotional context, recalling past traumas, victories, and cognitive distortions to provide a deeply personalized continuum of care.
🛠️ How we built it: The "Amaterasu" Multi-Agent Pipeline
We engineered a decoupled, modern architecture utilizing a Serverless Frontend and an Event-Driven Backend.
🧠 The Multi-Agent Orchestration (Backend)
At the core of TheraQuest is the Amaterasu Pipeline, a synchronous/asynchronous orchestration of 5 specialized LLM agents. To eliminate latency, we leveraged the Groq LPU Inference Engine (Llama-3.3-70b & Llama-3.2-11b-vision).
- The Therapist Agent: The central node that processes input, manages dialogue state, and applies CBT methodologies.
- The Vision Agent: Processes image frames via Base64 encoding to detect emotional affect and physical context.
- The Nimble Search Agent: Executes live web scraping to ground the AI in the real world (e.g., retrieving local crisis hotline numbers or current events).
- The Supervisor Agent: A zero-trust security layer. It evaluates all outgoing therapeutic advice for safety, hallucination mitigation, and clinical boundaries, blocking harmful outputs instantly.
- The Memory Agent: Interfaces with our Supabase PostgreSQL database to manage short-term session state and long-term historical context.
💻 The Tech Stack & CI/CD
- Frontend (Deployed on Vercel): React 19, Vite, Tailwind CSS, and Framer Motion. We utilized Server-Sent Events (SSE) and WebSockets to stream the cognitive process of the 5 agents directly to the UI, providing a transparent "AI Brain" visualization.
- Backend (Deployed on Render): Python, FastAPI, and Uvicorn. We built an asynchronous REST API capable of handling heavy concurrent multi-agent inference streams.
- Data Layer: Supabase handles secure authentication, persistent state, and schema-driven data modeling for our gamified XP and Quest systems.
🚧 Challenges we ran into
- Multi-Agent Latency & Concurrency: Chaining 5 LLMs sequentially takes too long. We solved this by using Python's
asyncioto run the Vision, Memory, and Search agents concurrently, feeding their outputs simultaneously into the Therapist Agent's context window. - Serverless Timeout Constraints: Initially, Vercel's strict 10-second serverless execution limits killed our long-running AI pipelines. We engineered a robust decoupling strategy, migrating the heavy AI compute to a stateful FastAPI server on Render, keeping the Vercel frontend lightning-fast.
- Prompt Injection & AI Safety: Therapy requires absolute safety. We designed a strict Supervisor Agent that acts as an LLM firewall, successfully dropping the toxicity and hallucination rate to zero during our edge-case testing.
🏆 Accomplishments that we're proud of
- Sub-second Multi-Agent Inference: Achieving near-instantaneous response times despite routing prompts through 5 distinct agents, thanks to our Groq integration.
- Multimodal Clinical Empathy: Successfully blending text, historical data, and real-time computer vision into a cohesive therapeutic response.
- A Flawless UX: Delivering a premium, dark-mode native, and butter-smooth interface that feels like a high-end consumer app rather than a clunky medical tool.
📖 What we learned
We learned the profound difference between a "Chatbot" and an "Agentic System". A single LLM prompt is easily confused and breaks character. However, orchestrating multiple LLMs—where one acts as memory, one as eyes, one as the speaker, and one as the guardrail—creates a system that exhibits emergent, highly stable, and deeply empathetic intelligence.
🚀 What's next for TheraQuest
- Voice-to-Voice Streaming: Implementing real-time WebRTC audio streaming to allow for hands-free, natural spoken therapy sessions.
- Wearable Telemetry: Integrating with Apple HealthKit and Google Fit APIs to stream real-time biometric data (HRV, sleep patterns) directly into the Therapist Agent's context window.
- Multiplayer Healing: Introducing "Guilds"—safe, AI-moderated anonymous group therapy challenges where users can pool their XP to achieve collective wellness goals.
Built With
- asyncio
- beautiful-soup
- cbt
- computer-vision
- fastapi
- framer-motion
- gamification
- generative-ai
- groq
- healthtech
- llama-3
- multi-agent-system
- nimble
- postgresql
- pydantic
- python
- react
- recharts
- render
- server-sent-events
- supabase
- tailwind-css
- typescript
- vercel
- websocket
Log in or sign up for Devpost to join the conversation.