⚓ Anchor: An AI Accountability Companion

Inspiration

Breaking unhealthy habits is rarely just about willpower, it is a long-term behavioral journey. Most habit trackers simply count streaks, relapses, or daily check-ins, treating every interaction the same way. We wanted to build something different: an AI companion that remembers meaningful progress, understands personal context, and grows alongside the user.

Anchor was inspired by the idea that accountability should feel human, encouraging, and personalized rather than judgmental. By giving the AI persistent memory, it can provide support that reflects who the user is instead of treating every conversation like the first one.


What it does

Anchor is a privacy-first AI accountability companion powered by Alibaba Cloud Qwen.

It helps users build healthier habits by:

  • Remembering goals, motivations, achievements, and personal preferences across conversations.
  • Distinguishing between wellness check-ins, urges, resisted urges, and relapses instead of treating them as the same event.
  • Tracking behavioral progress with meaningful analytics.
  • Adapting its conversation style based on the user's preferred coaching style.
  • Providing personalized encouragement using persistent memory instead of generic responses.

Rather than simply recording data, Anchor continuously learns from interactions to deliver more relevant and supportive guidance over time.


How we built it

Anchor combines a modern React frontend with a secure backend powered by Supabase and Alibaba Cloud Qwen.

The application uses:

  • React + TypeScript for the frontend
  • Tailwind CSS for the interface
  • Supabase Authentication
  • PostgreSQL with Row-Level Security (RLS)
  • Supabase Edge Functions for backend intelligence
  • Alibaba Cloud Qwen through the DashScope Workspace OpenAI-compatible API
  • Vercel for deployment

The application's intelligence follows a continuous loop:

  1. Users record wellness check-ins or urge events.
  2. The data is securely stored in PostgreSQL.
  3. Edge Functions retrieve the user's behavioral history and important memories.
  4. Alibaba Cloud Qwen analyzes the current situation together with relevant long-term memories.
  5. The AI updates recovery insights, risk level, and personalized recommendations that are reflected throughout the application.

To support long-term personalization, Anchor implements a MemoryAgent architecture that stores meaningful experiences, retrieves only the most relevant memories, reinforces confirmed memories, and gradually decays outdated ones to keep the AI's context efficient.


Challenges we ran into

One of our biggest challenges was designing memory that felt genuinely useful rather than simply storing every conversation.

We implemented a retrieval system that prioritizes memories based on importance, confidence, and recency so the AI only recalls information that is relevant to the current conversation.

Another challenge was designing a psychologically accurate logging system. During development, we realized that users who were simply checking in without experiencing an urge were being counted the same as users actively struggling. We redesigned the logging flow to separate wellness check-ins from actual urges, resisted urges, and relapses, resulting in more meaningful recovery metrics.

We also improved application security with an inactivity-based PIN lock while ensuring it behaved naturally during active sessions.

Finally, integrating Alibaba Cloud's Qwen Workspace APIs and optimizing AI response quality while maintaining structured memory updates required several iterations.


Accomplishments that we're proud of

  • Building a true MemoryAgent with persistent cross-session memory.
  • Successfully integrating Alibaba Cloud Qwen as the application's reasoning engine.
  • Designing a behavioral tracking system that better reflects real recovery journeys.
  • Creating an AI companion that adapts its personality and responses to each user.
  • Implementing secure authentication, Row-Level Security, and privacy-focused features.
  • Delivering a polished, mobile-first experience with real-time insights.

What we learned

Building Anchor taught us that effective AI companions require much more than powerful language models.

Persistent memory, thoughtful retrieval, behavioral understanding, and privacy all contribute to creating meaningful user experiences.

We also learned that psychological design is just as important as technical implementation. Small design decisions, such as distinguishing wellness check-ins from urges, can dramatically improve how users perceive their own progress.

Finally, working with Alibaba Cloud's Qwen models demonstrated how capable modern AI systems can become when paired with structured memory and well-designed application logic.


What's next for Anchor: An AI Accountability Companion

Our vision is to evolve Anchor into a comprehensive long-term behavioral companion.

Future plans include:

  • Native Android and iOS applications.
  • Intelligent push notifications powered by user behavior.
  • Voice conversations with the AI companion.
  • Smarter long-term memory retrieval and reasoning.
  • Personalized recovery plans that evolve over time.
  • Wearable device integration.
  • Multi-language support.
  • Secure collaboration features for therapists, mentors, and accountability partners while maintaining user privacy.

We believe the future of AI is not just answering questions, it is remembering people in ways that genuinely help them grow.

Built With

Share this project:

Updates