使用Tavus CVI + Claude启动个性化AI健康教练视频会话(大白人格),获取真实可穿戴健康数据(睡眠、心率变异性、恢复)等...
Spin up a personalized Baymax wellness coach video session from health + calendar data.
bash
git clone https://github.com/AndreChuabio/wellness-coach
cd wellness-coach
pip install -r backend/requirements.txt
cp .env.example .env # fill in API keys
text
ANTHROPIC_API_KEY= # Claude context generation
TAVUS_API_KEY= # Tavus CVI sessions
TAVUS_REPLICA_ID= # Avatar replica (platform.tavus.io → Replicas)
TAVUS_PERSONA_ID= # Baymax persona (platform.tavus.io → Personas)
bash
cd backend
uvicorn main:app --reload
# Swagger UI: http://localhost:8000/docs
bash
cd frontend
python3 -m http.server 3000
# Open: http://localhost:3000
MethodPathWhat it doesGET``/health-dataToday's wearable metricsGET``/calendarToday's calendar eventsPOST``/start-sessionFull pipeline → Tavus CVI URL + recsGET``/debug-envCheck all API keys are loaded
Run both scripts back-to-back — always together so the Tavus link is fresh:
bash
python3 cron/morning_context.py && python3 cron/send_briefing.py
This builds context, pre-warms a Tavus session, and sends a Telegram message with:
Register a 7AM daily cron via OpenClaw to automate the morning briefing.
See references/openclaw-cron.md for the exact setup.
See references/wearables.md for Oura, Fitbit, and Apple Health integration guides.
See references/gcal-setup.md for OAuth setup to get real calendar events.
Recommendations are generated in backend/context_builder.py based on:
SignalTriggerSuggestionHRV < 50msbelow avgBox breathing, recovery daySleep score < 75poor sleepNap window, caffeine cutoffHigh-stakes meetingkeyword match4-7-8 breathing beforehand4+ meetingspacked dayMicro-meditations between meetingsRecovery ≥ 80 + HRV ≥ avggreat dayPush harder, workout, cold exposure
Upload wellness content directly to the Tavus Persona via:
platform.tavus.io → Personas → Your Persona → Knowledge Base → Add Files
Format files as structured scripts:
text
# [Exercise Name]
## When to use
## Script (word-for-word guide)
## Duration
Avatar nods but doesn't speak → Mic permission not granted. Click lock icon in browser → allow microphone → rejoin.
Mock mode despite keys set → .env not loading. Run /debug-env to verify. Ensure .env is in project root, not backend/.
Tavus link expired → Sessions last ~10 min. Always run morning_context.py and send_briefing.py together right before use.
GCal shows mock data → Set GOOGLE_CREDENTIALS_PATH and GOOGLE_TOKEN_PATH in .env. Run python3 setup_gcal.py once to authorize.