# Scene Intent Nodes Read and change the scene's intention state: the overall scene intent, the active scene phase and the scene types that define how different phases play. _10 nodes._ | Node | Registry path | | --- | --- | | [Get Scene Intent](#get-scene-intent) | `scene/intention/GetSceneIntent` | | [Get Scene Type](#get-scene-type) | `scene/intention/GetSceneType` | | [Get Scene Types](#get-scene-types) | `scene/intention/GetSceneTypes` | | [Is Scene Phase Active](#is-scene-phase-active) | `scene/intention/IsScenePhaseActive` | | [Make Scene Type](#make-scene-type) | `scene/intention/MakeSceneType` | | [Remove Scene Type](#remove-scene-type) | `scene/intention/RemoveSceneType` | | [Set Scene Intent](#set-scene-intent) | `scene/intention/SetSceneIntent` | | [Set Scene Phase](#set-scene-phase) | `scene/intention/SetScenePhase` | | [Unpack Scene Phase](#unpack-scene-phase) | `scene/intention/UnpackScenePhase` | | [Unpack Scene Type](#unpack-scene-type) | `scene/intention/UnpackSceneType` | ## Get Scene Intent `scene/intention/GetSceneIntent` Returns the intent state. The phase, scene_type and start outputs are only set when a scene phase is currently active. - intent (str) - the overall intent - phase (scene_intent/scene_phase) - the current phase - scene_type (scene_intent/scene_type) - the current scene type - start (int) - the message id where this intent started - direction_always_on (bool) - whether scene direction is always on - direction_run_immediately (bool) - whether scene direction runs immediately - direction_instructions (str) - the current direction instructions **Outputs** | Output | Type | Description | | --- | --- | --- | | `intent` | `str` | | | `phase` | `scene_intent/scene_phase` | | | `scene_type` | `scene_intent/scene_type` | | | `start` | `int` | | | `direction_always_on` | `bool` | | | `direction_run_immediately` | `bool` | | | `direction_instructions` | `str` | | ## Get Scene Type `scene/intention/GetSceneType` Get a scene type object. Raises an error if the scene type is not found. - scene_type_id (str) - scene type ID - scene_type (scene_intent/scene_type) - the scene type object **Inputs** | Input | Type | Description | | --- | --- | --- | | `scene_type_id` | `str` | | **Outputs** | Output | Type | Description | | --- | --- | --- | | `scene_type` | `scene_intent/scene_type` | | ## Get Scene Types `scene/intention/GetSceneTypes` Get a list of available scene types. **Outputs** | Output | Type | Description | | --- | --- | --- | | `scene_types` | `list` | | | `scene_type_ids` | `list` | | ## Is Scene Phase Active `scene/intention/IsScenePhaseActive` Checks if a specified scene phase type is currently active. Routes to yes output if the current scene phase type matches the specified scene type id, otherwise routes to no output. - scene_type_id (str) - the scene type id to check for (optional, can be set as property) - scene_type_id (str) - the scene type id to check for **Inputs** | Input | Type | Description | | --- | --- | --- | | `scene_type_id` | `str` | (optional) | **Outputs** | Output | Type | Description | | --- | --- | --- | | `yes` | `any` | if the current scene phase type matches the specified scene type id | | `no` | `any` | if the current scene phase type does not match | **Properties** | Property | Type | Default | Description | | --- | --- | --- | --- | | `scene_type_id` | `str` | `""` | Scene type ID to check for | ## Make Scene Type `scene/intention/MakeSceneType` Create a new scene type object. If auto_append is enabled (the default), the new scene type is also added to the scene's available scene types and the intent state is emitted to the UI. - scene_type_id (str) - scene type ID - name (str) - scene type name - description (text) - scene type description - instructions (text) - scene type instructions - auto_append (bool) - automatically add the scene type to the scene's scene types - scene_type (scene_intent/scene_type) - the new scene type object **Inputs** | Input | Type | Description | | --- | --- | --- | | `scene_type_id` | `str` | (optional) | | `name` | `str` | (optional) | | `description` | `text` | (optional) | | `instructions` | `text` | (optional) | **Outputs** | Output | Type | Description | | --- | --- | --- | | `scene_type` | `scene_intent/scene_type` | | **Properties** | Property | Type | Default | Description | | --- | --- | --- | --- | | `scene_type_id` | `str` | `unset` | Scene type ID | | `name` | `str` | `""` | Scene type name | | `description` | `text` | `""` | Scene type description | | `instructions` | `text` | `""` | Scene type instructions | | `auto_append` | `bool` | `True` | Automatically append this scene type to scene_types dict | ## Remove Scene Type `scene/intention/RemoveSceneType` Remove a scene type object. Unknown scene type IDs are silently ignored. Emits the updated intent state to the UI. - state - graph state - scene_type_id (str) - scene type ID - state - the scene's intent state object **Inputs** | Input | Type | Description | | --- | --- | --- | | `state` | `any` | | | `scene_type_id` | `str` | | **Outputs** | Output | Type | Description | | --- | --- | --- | | `state` | `any` | | ## Set Scene Intent `scene/intention/SetSceneIntent` Updates the overall intent and emits the updated intent state to the UI. - state - graph state - intent (str) - the overall intent - state - the scene's intent state object - intent (str) - the overall intent **Inputs** | Input | Type | Description | | --- | --- | --- | | `state` | `any` | | | `intent` | `str` | (optional) | **Outputs** | Output | Type | Description | | --- | --- | --- | | `state` | `any` | | | `intent` | `str` | | **Properties** | Property | Type | Default | Description | | --- | --- | --- | --- | | `intent` | `str` | `""` | Overall story / experience intent | ## Set Scene Phase `scene/intention/SetScenePhase` Set a new scene phase. - state - graph state - scene_type (str) - the type of scene (scene type id) - intent (str) - the phase intent - state - the scene's intent state object - phase (scene_intent/scene_phase) - the new phase - scene_type (scene_intent/scene_type) - the scene type of the new phase (object) - intent (str) - the phase intent, passed through **Inputs** | Input | Type | Description | | --- | --- | --- | | `state` | `any` | | | `scene_type` | `str` | (optional) | | `intent` | `str` | (optional) | **Outputs** | Output | Type | Description | | --- | --- | --- | | `state` | `any` | | | `phase` | `scene_intent/scene_phase` | | | `scene_type` | `scene_intent/scene_type` | | | `intent` | `str` | | **Properties** | Property | Type | Default | Description | | --- | --- | --- | --- | | `scene_type` | `str` | `"roleplay"` | Type of scene | | `intent` | `str` | `""` | Phase intent | ## Unpack Scene Phase `scene/intention/UnpackScenePhase` Unpack a scene phase into its intent and scene type fields. - phase (scene_intent/scene_phase) - the phase to unpack - intent (str) - the phase intent - scene_type (str) - the scene type id of the phase - scene_type_instructions (str) - the scene type instructions - scene_type_description (str) - the scene type description - scene_type_name (str) - the scene type name - scene_type_id (str) - the scene type id **Inputs** | Input | Type | Description | | --- | --- | --- | | `phase` | `scene_intent/scene_phase` | | **Outputs** | Output | Type | Description | | --- | --- | --- | | `intent` | `str` | | | `scene_type` | `str` | | | `scene_type_instructions` | `str` | | | `scene_type_description` | `str` | | | `scene_type_name` | `str` | | | `scene_type_id` | `str` | | ## Unpack Scene Type `scene/intention/UnpackSceneType` Unpack a scene type object. - scene_type (scene_intent/scene_type) - the scene type object - scene_type_id (str) - scene type ID - name (str) - scene type name - description (text) - scene type description - instructions (text) - scene type instructions **Inputs** | Input | Type | Description | | --- | --- | --- | | `scene_type` | `scene_intent/scene_type` | | **Outputs** | Output | Type | Description | | --- | --- | --- | | `scene_type_id` | `str` | | | `name` | `str` | | | `description` | `str` | | | `instructions` | `str` | |