AI Trainer Events
Events emitted by the AI Trainer Chat view. On Swift/Kotlin/Flutter they arrive through the generic custom_type / CustomType case with the parsed JSON as a dictionary/map.
| Event | Data Fields | Description |
| trainer_schedule_next_workout | scheduledFor: string, sessionType: string | User picked a date/time for their next session. scheduledFor is YYYY-MM-DDTHH:MM device-local time; sessionType is "workout" or "assessment" (treat missing as "workout") |
| open_subscription_flow | source: string, date: string | A non-subscribed user tried to generate a workout — present your subscription flow and post subscription_result back ("purchased" or "dismissed") |
| trainer_assessment_started | date: string | User began the in-app fitness assessment |
| trainer_assessment_completed | date: string, results: object, fitnessLevel: string | Assessment finished — per-exercise reps and level (results.squats / results.pushups) plus an overall fitnessLevel ("beginner" / "intermediate" / "advanced") |
| trainer_assessment_skipped | date: string, reason: string | User chose to set their fitness level manually (reason: "set_manually") |
| trainer_profile_updated | source: string, profile: object | The user's fitness profile changed — carries the full current profile; source is "onboarding", "assessment", or "chat". Persist it on your side |
| workout_exit_request | - | The user exited a workout that was launched from the trainer |
Full payload examples and the subscription handshake: AI Trainer Chat guide and the subscription gating guide.