> For the complete documentation index, see [llms.txt](https://docs.siminsights.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.siminsights.com/insights-and-analytics/what-we-capture/event-reference.md).

# Event reference

Every event recorded during a simulation, grouped by what it describes. Key attributes are the ones specific to that event. See the [Attribute Reference](/insights-and-analytics/what-we-capture/attribute-reference.md) for the fields every event carries.

## Simulation lifecycle

| Event                               | Meaning                             | Key attributes                             |
| ----------------------------------- | ----------------------------------- | ------------------------------------------ |
| `simulation_load`                   | Simulation began loading            |                                            |
| `simulation_load_process_completed` | A step of the load process finished |                                            |
| `simulation_started`                | Learner began the simulation        | `simLoadTime`, `simLoaded`, `errorMessage` |
| `simulation_completed`              | Learner reached the end             | `timeToComplete` (seconds)                 |
| `simulation_exited`                 | Learner left the simulation         | `simCompleted`, `simLoaded`                |
| `loaded_scene`                      | Application scene loaded            | `sceneLoaded`                              |
| `logging_started`                   | Logging began for this session      |                                            |
| `session_started`                   | Learner opened the application      |                                            |
| `session_ended`                     | Learner left the application        |                                            |

A run that has `simulation_exited` without `simulation_completed` was abandoned before the end.

## Object interaction

| Event                      | Meaning                              | Key attributes                                 |
| -------------------------- | ------------------------------------ | ---------------------------------------------- |
| `trigger_event_Grab`       | Object was grabbed                   | `grabName`, `grabEntityType`                   |
| `trigger_event_Ungrab`     | Grabbed object was released          | `ungrabName`                                   |
| `trigger_event_Snap`       | Object was snapped into place        | `snapObject`, `snapHitboxName`                 |
| `trigger_event_Unsnap`     | Object was removed from a snap point | `snapObject`, `snapHitboxName`                 |
| `trigger_event_Use`        | Object was used                      | `useHitboxName`                                |
| `trigger_event_UseRelease` | Object stopped being used            | `useReleaseTargetName`, `useReleaseHitBoxName` |
| `trigger_event_Collide`    | Two objects collided                 | `collided1`, `collided2`                       |
| `trigger_event_Proximity`  | Learner reached a target location    | `locationName`, `radius`                       |
| `grab`                     | Object grabbed, legacy form          | `target`, `controller`                         |
| `ungrab`                   | Object released, legacy form         | `target`                                       |

Interaction events on hardware with haptics also carry `hapticFeedbackEnabled`, `hapticAmplitude`, `hapticDuration` and `hapticFrequency`.

`grab` and `trigger_event_Grab` come from different subsystems and can both fire for the same physical action.

## Attention

| Event                 | Meaning                           | Key attributes    |
| --------------------- | --------------------------------- | ----------------- |
| `focused_on_object`   | Learner looked at a marked object | `focusedObject`   |
| `unfocused_on_object` | Learner looked away from it       | `unfocusedObject` |

## Movement and input

| Event            | Meaning              | Key attributes |
| ---------------- | -------------------- | -------------- |
| `teleport_event` | Learner teleported   | `end_position` |
| `key_press`      | Keyboard key pressed | `keycode`      |
| `button_clicked` | Menu button clicked  | `buttonName`   |

## State machine

Simulation logic runs as state machines. These events describe progression through them.

| Event                                               | Meaning                                   | Key attributes                                                  |
| --------------------------------------------------- | ----------------------------------------- | --------------------------------------------------------------- |
| `state_machine_state_enter`                         | A state was entered                       | `state`, `stateId`, `smName`, `smId`, `attributes`              |
| `state_machine_state_exit`                          | A state was exited                        | `state`, `stateId`, `smName`, `smId`, `attributes`              |
| `state_machine_transition_event`                    | Moved between two states                  | `fromState`, `toState`, `transitionName`, `triggeredConditions` |
| `state_machine_always_running_trigger_transition`   | Global state machine fired on a trigger   | `triggerType`, `triggerName`                                    |
| `state_machine_always_running_condition_transition` | Global state machine fired on a condition | `triggeredConditions`, `containerName`                          |

`attributes` on the enter and exit events is a snapshot of every simulation variable at that moment, which is how you reconstruct the world state at any point in a run.

`triggeredConditions` records the condition that was satisfied, in the form `[AttributeName] [Operator] [Value]`, for example `[ Count ] [ >= ] [ 10 ]`.

## Speech and dialogue

| Event                             | Meaning                             | Key attributes                                                                                                                         |
| --------------------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `user_utterance`                  | Learner spoke or typed              | `utterance`, `utteranceId`, `utteranceConfidence`, `wasUtteranceText`, `nluEngine`, `previousHMState`, `currentHMState`, `nextHMState` |
| `gpt_chit_chat`                   | AI character replied                | `response`, `roundTripTimeInMs`, `character.name`, `character.prompt`, `history`, `utteranceId`                                        |
| `gpt_agent`                       | Scoring agent evaluated the learner | `agentName`, `agentType`, `agentGoal`, `agentSuccess`, `languageModel`, `variables`, `variableValues`                                  |
| `gpt_pdf_qa`                      | Question answered from a document   | `response`, `roundTripTimeInMs`, `pdfIds`                                                                                              |
| `trigger_event_SpeechReceived`    | Speech activated a trigger          | `triggerName`, `triggerType`                                                                                                           |
| `trigger_event_ConversationEvent` | Conversation activated a trigger    | `triggerName`, `triggerType`                                                                                                           |
| `trigger_event_AgentResponded`    | Agent response activated a trigger  | `agentId`                                                                                                                              |
| `trigger_event_RejectedIntent`    | Utterance matched no intent         | `Failed Utterances`                                                                                                                    |
| `user_utterance_wpm`              | Speaking rate for an utterance      | `wpm`, `utterance`                                                                                                                     |
| `user_utterance_total_word_count` | Running word count for the run      | `totalWordCount`, `utterance`                                                                                                          |

`roundTripTimeInMs` is the AI response time as measured on the device, which is the accurate way to report latency.

In Spark, the learner's words appear only on `user_utterance`. In simulations built in the authoring tool, `gpt_chit_chat` also echoes them in an `utterance` field.

## Assessment

| Event                    | Meaning                              | Key attributes                                                |
| ------------------------ | ------------------------------------ | ------------------------------------------------------------- |
| `quiz_multiple_question` | Quiz question answered               | `question`, `questionChoices`, `selectedAnswers`, `isCorrect` |
| `quiz_state_action`      | Quiz answered inside a state machine | `question`, `choices`, `answers`, `isCorrect`                 |

## Skills and mastery

| Event                             | Meaning                         | Key attributes                                                               |
| --------------------------------- | ------------------------------- | ---------------------------------------------------------------------------- |
| `user_attribute_updated`          | An observed skill value changed | `userAttributeName`, `userAttributeValue_n`, `userAttributeValue_previous_n` |
| `user_attribute_updated_response` | A parent skill was recalculated | `userAttributeName`, `userAttributeValue_n`, `userAttributeValue_previous_n` |

The first records what was directly observed. The second records values propagated up the skill ontology from that observation.

## Feedback

| Event                                               | Meaning                               | Key attributes                                                    |
| --------------------------------------------------- | ------------------------------------- | ----------------------------------------------------------------- |
| `feedback_recorded`                                 | Feedback was produced for the learner | `logMessages`, `timers`, `duration`, `finishedTimes`, `startTime` |
| `feedback_item_added`                               | A single feedback item was added      | `timeSinceSimStartedSeconds`                                      |
| `feedback_submitted`                                | Learner submitted feedback            | `comment`, `decision`, `utterance`, `utteranceConfidence`         |
| `feedback_recorded_utterance_scoring`               | An utterance was scored               |                                                                   |
| `feedback_recorded_utterance_scoring_user_feedback` | Learner rated that scoring            |                                                                   |

`logMessages` holds the feedback text shown to the learner, separated by `|`.

## Video

| Event                | Meaning                    | Key attributes |
| -------------------- | -------------------------- | -------------- |
| `video_started`      | Video began                | `url`          |
| `video_paused`       | Video paused               |                |
| `video_ended`        | Video finished             |                |
| `video_step_through` | Learner scrubbed the video | `delta_time`   |

## Group and multiplayer

| Event                     | Meaning                                   | Key attributes                                                                                                                                                                          |
| ------------------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `multiplayer-session-end` | Group session ended, with network quality | `pingInMs`, `pingVarianceInMs`, `disconnectCount`, `reconnectCount`, `resyncEventCount`, `maxPlayers`, `totalMessagesSent`, `totalMessagesReceived`, `totalSessionTimeInMs`, `roomName` |

## Performance

| Event                 | Meaning                         | Key attributes        |
| --------------------- | ------------------------------- | --------------------- |
| `sensor`              | Position and orientation sample | see the sensor stream |
| `tts_service_changed` | Text to speech provider changed | `ttsService`          |

Framerate is not a separate event. `fps_current`, `fps_average`, `fps_highest` and `fps_lowest` ride along on many simulation events.

## Lesson and activity events

Recorded by the lesson player rather than the simulation itself.

| Event                      | Meaning                                  |
| -------------------------- | ---------------------------------------- |
| `lesson_session_started`   | Learner opened a lesson                  |
| `lesson_session_resumed`   | Learner returned to an unfinished lesson |
| `lesson_session_completed` | Learner finished a lesson                |
| `lesson_session_reset`     | Lesson progress was reset                |
| `activity_viewed`          | Learner opened an activity               |
| `activity_completed`       | Learner finished an activity             |
| `activity_scored`          | An activity produced a score             |
| `activity_abandoned`       | Learner left an activity unfinished      |
| `quiz_response_submitted`  | Quiz answer submitted in a lesson        |
| `question_answered`        | Assessment question answered             |
| `card_viewed`              | Flashcard viewed                         |
| `sim_run`                  | A simulation was launched from a lesson  |

## Diagnostics

Recorded to a separate system log rather than the event stream.

| Event                                | Meaning                      |
| ------------------------------------ | ---------------------------- |
| `system_exception`                   | An error occurred            |
| `experience_load_process_started`    | Simulation load began        |
| `experience_load_process_completed`  | Simulation load finished     |
| `experience_scene_loaded`            | Scene finished loading       |
| `simulation_json_loaded`             | Simulation definition loaded |
| `simulation_spawn_vo_started`        | Object spawning began        |
| `simulation_spawn_vo_ended`          | Object spawning finished     |
| `tts_generation`                     | Speech was synthesised       |
| `clicked`                            | Interface element clicked    |
| `pause_menu_toggled`                 | Pause menu opened or closed  |
| `user_login`                         | Learner signed in            |
| `messages_sent`, `messages_received` | Multiplayer message counts   |
| `ping_state`                         | Network latency sample       |
