Tryna AI: The Stoic Butler

đź’ˇ Inspiration

In an era of algorithmic noise and notification fatigue, we didn't want another chatbot that just talks. We wanted a digital entity that serves—specifically, one that serves our peace of mind.

Inspired by the concept of the "Inner Citadel" from Marcus Aurelius, Tryna AI is designed to be a Stoic Butler. Unlike standard assistants that optimize for speed or productivity, Tryna optimizes for Rationality and Equanimity. We asked ourselves: What if your phone didn't just notify you of problems, but helped you mentally prepare for them before they happened?

🤖 What it does

Tryna AI acts as a proactive psychological guardian, operating on a daily "Stoic Loop":

  1. Morning Preparation ($Premeditatio Malorum$): The Butler initiates a session asking, "What is the one thing you fear today?" It then uses RAG (Retrieval-Augmented Generation) to pull relevant passages from Epictetus or Seneca, helping you visualize obstacles so they don't surprise you.
  2. The Dichotomy of Control: For every task you log, the Butler analyzes the input to determine $C(x)$, the "Control Factor." It filters your to-do list, distinguishing between what is up to you (your actions) and what is not (the outcomes).
  3. Evening Audit: Using Serverpod's Future Calls, the Butler proactively prompts you to review your actions, not your results, reinforcing the habit of Amor Fati (loving one's fate).

🛠️ How we built it

This project is a testament to the power of a Full-Stack Dart architecture.

  • Backend (Serverpod 3): We leveraged Serverpod to handle the heavy lifting of state and memory.
    • Endpoints: We created custom Endpoint classes to handle the "Stoic Sessions," allowing the backend to maintain context of the user's emotional state over time.
    • PostgreSQL: Used Serverpod's ORM to model complex relationships between UserIntent and StoicReflection.
    • Future Calls: This was critical. We used scheduled tasks to trigger the "Evening Audit" notifications exactly when the user needs them, without keeping the app open.
  • Frontend (Flutter): We built a "Glassmorphic" UI designed to induce calm. The interface uses a deep "Void" dark mode with frosted glass overlays.
  • AI Integration: We connected the backend to the Gemini API, fine-tuning the system prompt to reject "toxic positivity" and strictly adhere to Stoic logic.

📉 Challenges we ran into

  • The "Hallucination" Problem: Early versions of the Butler would give generic self-help advice like "Just be happy!" To fix this, we had to implement a strict RAG pipeline that grounds every response in a vector database of the Enchiridion.
  • State Synchronization: Keeping the "Mental State" synced between the backend and the UI was tricky. Serverpod's generated client library saved us hours here, ensuring that when the backend updated a reflection, the UI reflected it instantly without writing complex parsing logic.

🏅 Accomplishments that we're proud of

  • The "Zero-Latency" Feel: Thanks to Serverpod's efficient serialization, the conversation with the Butler feels instantaneous.
  • The UI/UX: We achieved a visual style that feels like a modern "Operating System for the Mind"—minimalist, beautiful, and distraction-free.
  • Real Utility: It actually works. Using it during the hackathon helped us stay calm while debugging!

đź§  What we learned

  • Serverpod is a Force Multiplier: Being able to write backend code in Dart and have the client code auto-generated meant we could focus 80% of our time on the logic and experience rather than writing boilerplate API calls.
  • Stoicism is Algorithmic: We learned that Stoic philosophy can actually be modeled mathematically. The concept of filtering inputs based on a boolean isWithinControl flag is surprisingly similar to how we filter data streams.

🚀 What's next for Tryna AI

  • Logic Diffusion Model: We plan to integrate a "Logic Diffusion" layer (inspired by our other research) to mathematically verify the soundness of the advice given by the Butler.
  • Biometric Integration: Using wearable data to detect stress spikes, allowing the Butler to intervene in real-time with a "Pause and Reflect" prompt.

Built With

Share this project:

Updates