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 | The next session was scheduled: the user picked a date/time on the schedule card, or the next workout plan arrived after a post-workout check-in. scheduledFor is YYYY-MM-DDTHH:MM device-local time (or a date only); 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 (source: "generate_workout") or to use the chat input (source: "chat_input"). Present your subscription flow and post subscription_result back ("purchased" or "dismissed"). Not sent when you launched with subscriptionReturnUrl: KinesteX opens that URL instead |
| trainer_assessment_started | date: string | User began the in-app fitness assessment |
| trainer_assessment_completed | date: string, results: object, fitnessLevel: string | Assessment finished, with per-exercise reps and level (results.squats / results.pushups) plus an overall fitnessLevel ("beginner" / "intermediate" / "advanced"). A test that was skipped (for example because of an injury) arrives as { reps: null, level: null } |
| 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 (no date); source is "onboarding", "assessment", "chat", or "host" (an echo of your own update_trainer_profile). Persist it on your side |
| trainer_profile_onboarding | stage: string, data: object, date: string | One applied step of the onboarding wizard. data holds just that step's answer. Fields that also exist in the profile object use the same names; body_parts, training_style, equipment and duration carry fields the profile doesn't have. Stages: profile, fitness_goals, goal_recommendation, body_parts, injuries, injury_detail, training_style, fitness_level, equipment, duration, other_preferences, workout_frequency. Also sent again when the user edits an answer card in the chat before the plan starts generating |
| trainer_profile_clicked | profile: object or null, date: string | User opened the profile while customProfileAction: true. Open your own profile screen. profile has the same shape as in trainer_profile_updated (null when no profile is stored yet or it could not be loaded) |
| trainer_calendar_clicked | date: string | User tapped the calendar button while customCalendarAction: true. Open your own progress or calendar screen |
| trainer_workout_days_updated | days: string[], daysPerWeek: number, preferredTime: string | The user picked (or edited) the weekdays they want to train on. days are lowercase "mon".."sun" in week order; preferredTime is device-local HH:MM. Same answer also arrives as the workout_frequency onboarding stage and in the profile. See the workout days guide |
| workout_exit_request | data: { workout: string, date: string }, location: "statistic" | The user left the results screen of a workout launched from the trainer (after workout_completed); KinesteX goes back to the chat. Kotlin types it as WorkoutExitRequest |
Workouts the trainer launches also send the workout events, all_resources_loaded while they load, and the session save events (saving is on by default for the AI Trainer).
Full payload examples and the subscription handshake: AI Trainer Chat guide and the subscription gating guide.