The challenge
Project context
This personal project was my way of testing how AI can teach through conversation, at scale. I used instructional design principles to build a Socratic mentor that’s available any time. I built it on my own, but the same capabilities apply directly to corporate learning: using AI to give personalized guidance, keep interactions short so they don’t overload people, and make it safe to learn.
Learning objective: Prove that AI can teach with the Socratic method, guiding someone to discover the answer through questions, rather than just handing them information. If that worked, it would show conversational AI can teach genuinely complex, nuanced subjects.
Core problem
Traditional philosophy education fails to connect ancient wisdom with modern challenges. Students read dense texts but struggle to apply Stoic concepts to real-life situations like workplace stress or relationships.
The opportunity
Let learners have real conversations with Marcus Aurelius. Not read about Stoicism, but discuss their specific problems and get personalized guidance in real-time.
Key design challenges
- Teach through Socratic questioning (not prescribing answers)
- Maintain philosophical authenticity
- Manage cognitive load during real-time conversation
- Create meaningful presence (avoid gimmicky interactions)
The process
Research & analysis
Research showed a clear gap: studying philosophy the traditional way gives you knowledge, but it doesn’t change how you live.
Learner needs identified:
- Philosophy students found the texts interesting but couldn’t apply the ideas to their own lives
- People dealing with real problems wanted practical wisdom right away, not academic theory
- Existing AI chatbots felt impersonal and left no room to stop and reflect
Core insight:
- The Socratic method teaches through back-and-forth, not lecture. The best philosophy teachers ask questions that lead you to work it out yourself. That became the foundation of my design.
Design approach
I applied four key learning principles to shape the experience:
1. Socratic pedagogy
The AI guides self-discovery through questions, not answers. Example: If a user says “My boss is impossible,” Marcus asks: “Is it your boss’s actions that harm you, or your judgment about them?”
2. Cognitive load management
I capped responses at 1-3 sentences. Testing showed shorter responses led to deeper reflection. Users needed room to think, not a philosophy lecture.
3. Embodied presence
A photorealistic avatar whose lips move in sync with the speech makes it feel like you’re actually with Marcus. That backs up embodied cognition research, which finds we learn better from a “person” than from text on a screen.
4. Emotional safety
A calm, non-judgmental persona (no exclamation marks, no judgment) makes it safe to talk about hard topics like death, failure, and loss.
Development & iteration
Three critical design decisions shaped the implementation:
Voice-first interface
I chose voice over text chat, because speaking out loud makes the philosophical dialogue feel real. I used OpenAI’s Realtime API to get rid of the 2-4 second delays you usually get when processing speech.
Four opening strategies
Varied greetings prevent scripted feel across sessions:
- Direct: “What weighs on your mind?”
- Reflective: “What brings you to philosophy today?”
- Challenge-oriented: “Is there a situation testing your peace of mind?”
- Growth-focused: “What aspect of yourself are you working to strengthen?”
Explicit boundaries
Marcus refuses to give medical, legal, or financial advice. That does two things at once:
- Ethical: it keeps him from causing harm with advice he’s not equipped to give
- Pedagogical: it teaches that philosophy is about how to think, not what to decide
Testing & refinement
Problem identified: Early versions were too agreeable. They just validated whatever the user said instead of questioning their reasoning.
Solution implemented:
- I rebuilt the system prompt with examples of how to push back well
- Marcus now challenges faulty reasoning while staying supportive
Example exchange:
- User: “I just need to work harder and everything will be fine.”
- Marcus: “Can you control the outcome through effort alone? What if you work with excellence yet circumstances remain unchanged?”
Quality assurance: Automated testing validates 12 criteria per response:
- Brevity (1-3 sentences)
- Stoic concepts present
- Socratic questions asked
- Appropriate tone
- Boundary respect
The solution
What users experience
Visit the site, log in, and within 8 seconds you’re face to face with a photorealistic Marcus Aurelius. Talk to him normally, and he gives you short, probing Stoic guidance that keeps you focused on what you can actually control.
Example conversation
User: “I’m so stressed about work. My boss keeps changing priorities and I can’t keep up.”
Marcus: “Is it your boss’s actions that harm you, or your judgment about them? What specifically feels beyond your control?”
User: “I guess I can’t control what he asks for, but I feel like I’m failing.”
Marcus: “There is your answer. You control your effort and excellence, not his requests. Can you find peace in doing your best with changing circumstances?”
Technical architecture enables
- Sub-second response using OpenAI Realtime API (feels like talking to a person)
- Synchronized lip movements via HeyGen (creates presence and engagement)
- WebRTC streaming for reliable voice/video delivery
- Cost controls through rate limiting (~$2 per session)
System architecture
graph LR
%% Define Nodes
subgraph Client["👤 Client Endpoint"]
Browser(["📱 User Browser
(Web UI + Daily SDK)"])
end
subgraph Services["☁️ External Services"]
Daily{{"🌐 Daily.co
(WebRTC Hub)"}}
OpenAI[["🧠 OpenAI
(Realtime API)"]]
HeyGen[["🎬 HeyGen
(Avatar API)"]]
end
subgraph Platform["🚀 App Platform (Fly.io)"]
FastAPI["⚙️ FastAPI
(Server)"]
Bot[("🤖 Bot
(Pipecat)")]
end
%% Control Flow (HTTP)
Browser -->|"1. Auth & Start"| FastAPI
FastAPI -->|"2. Spawn Bot"| Bot
%% Real-time Media Flow (WebRTC)
Browser <-->|"Audio/Video
Stream"| Daily
Bot <-->|"Audio/Video
Stream"| Daily
%% AI Processing Loop
Bot -->|"3. User Audio"| OpenAI
OpenAI -->|"4. AI Response"| Bot
Bot -->|"5. Sync Request"| HeyGen
HeyGen -->|"6. Video Frames"| Bot
%% Dark theme styling with amber/gold accents
classDef client fill:#2d1b0e,stroke:#f59e0b,stroke-width:3px,color:#f9fafb,font-weight:bold;
classDef platform fill:#1a2234,stroke:#fbbf24,stroke-width:3px,color:#f9fafb,font-weight:bold;
classDef services fill:#0f1419,stroke:#d97706,stroke-width:2px,color:#d1d5db;
classDef transport fill:#1e1b4b,stroke:#a78bfa,stroke-width:4px,color:#f9fafb,font-weight:bold;
class Browser client;
class FastAPI,Bot platform;
class OpenAI,HeyGen,Daily services;
%% Link Styling for better visibility
linkStyle 0,1 stroke:#fbbf24,stroke-width:3px;
linkStyle 2,3 stroke:#a78bfa,stroke-width:4px;
linkStyle 4,5,6,7 stroke:#f59e0b,stroke-width:2px,stroke-dasharray:5 5; Results & impact
Key metrics
- Uptime: 99%+ on live production application
- Engagement: 4-6 minute average session length (indicates genuine dialogue, not quick queries)
- Performance: <1 second response latency (comparable to human conversation)
- Cost efficiency: $1.50-3.00 per session through architectural optimization
Technical achievements
- Mobile-optimized responsive design works on iPhone, Android, desktop
- Automated quality assurance validates philosophical authenticity across updates
Learning design impact
- Made ancient philosophy accessible through conversation instead of dense texts
- Demonstrated AI can teach using Socratic method, not just deliver information
- Created emotionally safe space for exploring difficult life questions
User feedback pattern
Users report the experience feels “surprisingly real” and “actually helpful.” Brief responses (1-3 sentences) help users think rather than passively receive wisdom.
Key takeaways
-
Presence drives engagement. A photorealistic avatar makes it feel like you’re with Marcus, and that lifts engagement well above text or voice alone. It backs up embodied cognition research.
-
Guiding the conversation is teaching. Making Marcus ask Socratic questions instead of giving direct answers keeps people thinking actively rather than listening passively. The system prompt is really a teaching strategy.
-
Less content means deeper learning. Keeping responses to 1-3 sentences leaves room to reflect. Short wisdom works better than long explanations. People remember and use the shorter responses.
-
Design for cost from the start. I built rate limiting and monitoring on day one, which stopped costs running away. Real-time AI is expensive (~$2-3 per session), so I treated cost as a design constraint, and that led to better decisions.
-
Prompt engineering is instructional design. Writing the system prompt meant defining what you want people to learn (apply Stoic principles), how to teach it (Socratic method), how to judge a good response, and where the boundaries are. Designing an AI persona is, at its core, a teaching task.
Future enhancements
Five potential improvements could expand the project’s impact:
- Add conversation memory - Track philosophical progress over time and reference previous discussions
- Implement user research - Interview users to understand struggles with applying Stoicism
- Build conversation analytics - Identify which Socratic questions lead to most meaningful insights
- Expand philosophical voices - Add other Stoic philosophers (Epictetus, Seneca) or traditions (Buddhist, Taoist)
- Improve accessibility - Real-time transcription for hearing-impaired users and multi-language support