Anchor
Inspiration
The inspiration for Anchor came from personal experience with the gaps in modern mental healthcare. Between weekly therapy sessions, there is often no structured "debrief" or real-time tracking of progress. It's easy for therapists to lose the thread of how a treatment is evolving, and even harder for users to express and capture their thoughts in the moment. I wanted to build a "therapist buddy" — a thought journal that feels interactive, where I can express thoughts out loud or write them down, ensuring no insight is lost between sessions.
What It Does
Anchor is a native macOS companion that provides CBT-grounded support through:
- Interactive Thought Journaling: Express thoughts via text or voice (Siri) to process emotions in real-time.
- Guided Check-ins: Empathetic conversations with a MedGemma-powered AI that identifies cognitive distortions and helps with therapy debriefs.
- ADHD-Specific Tools: Task chunking and "burnout check-ins" to help navigate executive dysfunction.
- Stateful Monitoring: A "Monitor Agent" that silently tracks emotional metrics like distress and burnout, providing a live health dashboard.
- Crisis Safeguards: Hardcoded detection nodes that bypass the LLM to provide immediate 988 Lifeline support.
- 100% On-Device Privacy: All processing happens locally via llama.cpp and TurboQuant — ensuring your most vulnerable thoughts never leave your machine.
How We Built It
- Frontend: A premium macOS experience built with SwiftUI, featuring custom typography, micro-animations, and a unified card-based design system.
- Backend: A FastAPI server utilizing LangGraph for sophisticated, multi-agent state management.
- Inference Layer: Optimized for Apple Silicon using llama.cpp with TurboQuant for 3.8x–6.4x KV cache compression.
- Agentic Logic: A two-agent system (Main + Monitor) where a silent observer informs the conversational agent's strategy based on real-time signal processing.
Challenges We Ran Into
- Graph Memory Architecture: We initially struggled with persistent memory across turns. The complex LangGraph design didn't work as expected at first, requiring significant refactoring of how the state is preserved and retrieved.
- Controlling Reasoning Models: While models like MedGemma 1.5 and Gemma 4 provide incredible healthcare accuracy, their reasoning-heavy outputs are notoriously difficult to control and parse for a clean UI experience.
- Agent-to-Agent Context: We hit a wall where the Journal Agent would periodically produce "gibberish" because it wasn't receiving the full conversational context from the interacting Main Agent. Ensuring seamless context-passing between specialized agents was a major hurdle.
- Local Performance Balance: Running two 4B-parameter models simultaneously on an M2 Pro required aggressive quantization and memory management to keep the UI fluid.
Accomplishments We're Proud Of
- On-Device MedGemma Deployment: Successfully running a medical-grade model entirely offline with zero latency.
- True Privacy-First Design: Building a mental health tool that actually puts data ownership back in the user's hands.
- Siri Integration (AppIntents): Making therapeutic exercises accessible with a single voice command.
What We Learned
- The Power of Local AI: Learning how to optimize LLMs for consumer hardware (M-series chips) without sacrificing the quality needed for mental health support.
- Stateful Orchestration: Mastering LangGraph to manage complex, branching conversations and silent monitoring.
- Product-Therapy Alignment: Understanding how to translate clinical CBT practices into a digital format that feels human, not clinical.
What's Next for Anchor
- Enhanced Siri Voice Interaction: We are currently finishing deep voice-based shortcuts to allow users to speak their thoughts directly to Anchor via Siri, even when away from their desk.
- Multi-Device Local Sync: Securely syncing local journal entries between macOS and iOS devices over a private local network.
- Gemma 4 Full Optimization: Implementing the latest reasoning breakthroughs as TurboQuant support for Gemma 4 matures.
Log in or sign up for Devpost to join the conversation.