mann - Mental Health AI Platform

Inspiration

My own frustration with LLMs not having memory and mental health issues sparked the creation of mann. Traditional AI assistants forget conversations immediately, making them inadequate for mental health support where continuity, context, and relationship-building are crucial. As someone who has experienced mental health challenges, I recognized the need for an AI companion that could truly remember, understand patterns, and provide consistent support over time.

What it does

mann is a comprehensive mental health wellness platform that creates "safe spaces for mental wellness" through AI-powered conversations with persistent memory. Key features include:

  • Persistent AI Memory: Advanced memory consolidation system that mimics human memory formation
  • Curated AI Personalities: Curated AI companions with different therapeutic approaches and personalities based on psychology, philosophy and neuroscience
  • Conversation Branching: Edit and explore different conversation paths without losing chat history
  • Accessibility-First Design: Dyslexic-friendly fonts (Atkinson Hyperlegible, OpenDyslexic), high contrast modes, and reduced motion
  • Real-Time Streaming: Seamless AI conversations with including web search capabilities
  • Privacy-Focused: Complete user control over memory retention and data management

How we built it

Architecture & Technology Stack

  • Frontend: Next.js 15 with React 19, TypeScript, and Tailwind CSS
  • Backend: Convex real-time database with Clerk authentication
  • AI Integration: Reasoning models and web search
  • UI Components: Custom / shadcn/ui components with custom mental health theming

Key Technical Innovations

Four-Hook Chat Architecture: useOptimizedChat → useChatState → useChatStreaming → useChatPersistence This modular approach separates concerns: state management, streaming communication, and database persistence.

AI-Powered Memory System:

  • Memory consolidation using reasoning models to extract meaningful insights from conversations
  • Spaced repetition algorithm for memory strength modeling
  • Background processing with decay simulation
  • Three memory types: episodic (events), semantic (facts), procedural (preferences)

Challenges we ran into

  1. Memory Consolidation Complexity: Designing a system that accurately extracts and categorizes meaningful information from conversations while respecting privacy
  2. Real-Time Streaming Architecture: Building a robust streaming system that handles connection failures, timeouts, and maintains state consistency
  3. Message Deduplication: Preventing duplicate messages and thinking content while supporting optimistic updates and conversation branching
  4. Accessibility at Scale: Ensuring every component works with screen readers, keyboard navigation, and various accessibility needs
  5. Memory Privacy Balance: Providing powerful memory features while giving users complete control over their data

Accomplishments that we're proud of

  1. Revolutionary Memory System: First AI mental health platform with human-like memory consolidation and decay modeling
  2. Accessibility Leadership: Comprehensive accessibility features including dyslexic-friendly fonts and therapeutic color palettes
  3. Technical Excellence: Sophisticated four-hook architecture enabling seamless real-time chat with complex state management
  4. Crisis Intervention: Intelligent system that can detect and respond to mental health crises appropriately
  5. User Privacy: Complete user control over memory and data while maintaining powerful AI capabilities
  6. Conversation Branching: Innovative system allowing users to explore different conversation paths without losing context

What we learned

  1. Mental Health UX Design: Traditional tech UX patterns can be overwhelming for users in distress - we learned to prioritize calm, gentle interactions
  2. Memory System Design: Human memory is far more complex than simple storage - implementing realistic decay and consolidation required deep research into neuroscience
  3. AI Safety in Mental Health: The critical importance of crisis detection and appropriate response systems when dealing with vulnerable users
  4. Accessibility is Universal: Accessibility features designed for specific needs (dyslexic fonts, high contrast) actually improve experience for all users
  5. Real-Time Architecture: Building truly responsive real-time systems requires careful consideration of edge cases, timeouts, and error handling
  6. Privacy vs. Functionality: Balancing powerful AI memory features with strict privacy controls requires innovative technical solutions

What's next for mann

Short-term (3-6 months)

  • Therapy Integration: Connect with licensed therapists for seamless care transitions
  • Group Support: Anonymous peer support groups with AI moderation
  • Mobile Apps: Native iOS and Android applications with offline capabilities
  • Advanced Analytics: Personal mental health insights and progress tracking

Medium-term (6-12 months)

  • Personalized Interventions: AI-powered recommendations based on individual patterns and triggers
  • Integration Ecosystem: Connect with wearables, calendar apps, and other health platforms
  • Multilingual Support: Expand to support mental health conversations in multiple languages
  • Professional Dashboard: Tools for therapists to monitor and support their clients (with consent)

Long-term Vision (1+ years)

  • Predictive Mental Health: Early warning systems for mental health episodes based on conversation patterns
  • Community Platform: Safe spaces for mental health communities with AI-assisted moderation
  • Research Partnerships: Collaborate with mental health researchers to advance the field (anonymized data)
  • Global Accessibility: Make mental health support available worldwide, especially in underserved areas

Our ultimate goal: Transform mental health care by making AI-powered support as accessible, reliable, and helpful as calling a trusted friend - but available 24/7 with perfect memory and infinite patience.

Built With

  • anthropic
  • atkinson
  • clerk
  • convex
  • css
  • eslint
  • gsap
  • hyperlegible
  • next-themes
  • next.js
  • opendyslexic
  • pnpm
  • radix
  • react
  • react-hook-form
  • server-side
  • shadcn/ui
  • streaming
  • tailwind
  • turbopack
  • zod
Share this project:

Updates