{
  "title": "Instruct Character Changes",
  "id": "eb0e7fd4-30cf-4a1d-a3c4-5b4f19373707",
  "properties": {},
  "x": 0,
  "y": 0,
  "width": 200,
  "height": 100,
  "collapsed": false,
  "inherited": false,
  "registry": "agents/director/chat/instructCharacterChanges",
  "nodes": {
    "29753ef2-37de-41d1-9e35-ecc5c3625c7a": {
      "title": "Input Socket",
      "id": "29753ef2-37de-41d1-9e35-ecc5c3625c7a",
      "properties": {
        "input_type": "any",
        "input_name": "state",
        "input_optional": false,
        "input_group": "",
        "num": 0
      },
      "x": 24,
      "y": 76,
      "width": 210,
      "height": 154,
      "collapsed": false,
      "inherited": false,
      "registry": "core/Input",
      "base_type": "core/Node"
    },
    "7ebd2b41-8402-467b-bbba-6251d92187c0": {
      "title": "OUT state",
      "id": "7ebd2b41-8402-467b-bbba-6251d92187c0",
      "properties": {
        "output_type": "any",
        "output_name": "state",
        "num": 0
      },
      "x": 474,
      "y": 76,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "core/Output",
      "base_type": "core/Node"
    },
    "12028a6c-5ff0-4109-856c-5a361c39a05c": {
      "title": "SET local.instructions",
      "id": "12028a6c-5ff0-4109-856c-5a361c39a05c",
      "properties": {
        "name": "instructions",
        "scope": "local"
      },
      "x": 474,
      "y": 296,
      "width": 210,
      "height": 122,
      "collapsed": false,
      "inherited": false,
      "registry": "state/SetState",
      "base_type": "core/Node"
    },
    "1a95dd11-970b-47d1-9e4f-e2f859c996de": {
      "title": "Stage -10",
      "id": "1a95dd11-970b-47d1-9e4f-e2f859c996de",
      "properties": {
        "stage": -10
      },
      "x": 804,
      "y": 306,
      "width": 210,
      "height": 118,
      "collapsed": false,
      "inherited": false,
      "registry": "core/Stage",
      "base_type": "core/Node"
    },
    "e773e61a-58a6-41b9-a2fb-7deae05c3ed2": {
      "title": "true",
      "id": "e773e61a-58a6-41b9-a2fb-7deae05c3ed2",
      "properties": {
        "value": true
      },
      "x": 569,
      "y": 691,
      "width": 210,
      "height": 58,
      "collapsed": true,
      "inherited": false,
      "registry": "core/MakeBool",
      "base_type": "core/Node"
    },
    "23b4ac43-1796-4abc-8741-e8517f91c1d2": {
      "title": "summarizer",
      "id": "23b4ac43-1796-4abc-8741-e8517f91c1d2",
      "properties": {
        "agent_name": "summarizer"
      },
      "x": 539,
      "y": 762,
      "width": 210,
      "height": 58,
      "collapsed": true,
      "inherited": false,
      "registry": "agents/GetAgent",
      "base_type": "core/Node"
    },
    "dc77494a-e545-4883-8c05-69988c430b37": {
      "title": "Validate Character",
      "id": "dc77494a-e545-4883-8c05-69988c430b37",
      "properties": {
        "error_message": "",
        "character_status": "all"
      },
      "x": -1640,
      "y": 611,
      "width": 210,
      "height": 102,
      "collapsed": false,
      "inherited": false,
      "registry": "validation/ValidateCharacter",
      "base_type": "core/Node"
    },
    "850f0f46-16eb-4721-9a98-55835e72508c": {
      "title": "FN update_character",
      "id": "850f0f46-16eb-4721-9a98-55835e72508c",
      "properties": {
        "name": "update_character"
      },
      "x": 386,
      "y": 1832,
      "width": 210,
      "height": 78,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/GetFunction",
      "base_type": "core/Node"
    },
    "db4896cf-152b-4cc5-9761-61e500cf98ee": {
      "title": "AI Function Callback",
      "id": "db4896cf-152b-4cc5-9761-61e500cf98ee",
      "properties": {
        "name": "my_function",
        "allow_multiple_calls": true
      },
      "x": 636,
      "y": 1832,
      "width": 210,
      "height": 102,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Callback",
      "base_type": "core/Node"
    },
    "ad6acd60-dc07-4414-aacf-ae28145946e6": {
      "title": "AI Function Calling",
      "id": "ad6acd60-dc07-4414-aacf-ae28145946e6",
      "properties": {
        "template": null,
        "max_calls": 4,
        "retries": 0,
        "response_length": 1024
      },
      "x": 1488,
      "y": 1712,
      "width": 210,
      "height": 250,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Focal",
      "base_type": "core/Node"
    },
    "abd063a2-4df0-4b32-8f97-57c6046d6b04": {
      "title": "Character Names Context",
      "id": "abd063a2-4df0-4b32-8f97-57c6046d6b04",
      "properties": {},
      "x": 239,
      "y": 1110,
      "width": 304,
      "height": 66,
      "collapsed": false,
      "inherited": false,
      "registry": "agents/director/chat/characterNamesContext",
      "base_type": "core/Graph"
    },
    "cba07b38-5f04-4189-a605-c98730b4b31c": {
      "title": "true",
      "id": "cba07b38-5f04-4189-a605-c98730b4b31c",
      "properties": {
        "value": true
      },
      "x": 99,
      "y": 1100,
      "width": 210,
      "height": 58,
      "collapsed": true,
      "inherited": false,
      "registry": "core/MakeBool",
      "base_type": "core/Node"
    },
    "4bdac5a0-5895-412b-a7f3-90813df7580c": {
      "title": "Director Action Summary",
      "id": "4bdac5a0-5895-412b-a7f3-90813df7580c",
      "properties": {},
      "x": 1558,
      "y": 333,
      "width": 193,
      "height": 26,
      "collapsed": false,
      "inherited": false,
      "registry": "agents/director/chat/directorActionSummary",
      "base_type": "core/Graph"
    },
    "d9612662-641a-4f2c-ae07-51a53540ea4e": {
      "title": "GET local.instructions",
      "id": "d9612662-641a-4f2c-ae07-51a53540ea4e",
      "properties": {
        "name": "instructions",
        "scope": "local"
      },
      "x": 1108,
      "y": 93,
      "width": 210,
      "height": 122,
      "collapsed": false,
      "inherited": false,
      "registry": "state/GetState",
      "base_type": "core/Node"
    },
    "55b1da29-7348-4be7-ac78-6013064b6119": {
      "title": "GET local.focal_calls",
      "id": "55b1da29-7348-4be7-ac78-6013064b6119",
      "properties": {
        "name": "focal_calls",
        "scope": "local"
      },
      "x": 1108,
      "y": 313,
      "width": 210,
      "height": 122,
      "collapsed": false,
      "inherited": false,
      "registry": "state/GetState",
      "base_type": "core/Node"
    },
    "eccb2aab-0e0d-4af6-a812-e06d1c8a6865": {
      "title": "Input Socket",
      "id": "eccb2aab-0e0d-4af6-a812-e06d1c8a6865",
      "properties": {
        "input_type": "str",
        "input_name": "instructions",
        "input_optional": false,
        "input_group": "",
        "num": 1
      },
      "x": 24,
      "y": 296,
      "width": 210,
      "height": 154,
      "collapsed": false,
      "inherited": false,
      "registry": "core/Input",
      "base_type": "core/Node"
    },
    "811e3d29-08b7-450c-99a6-bf45593eacb4": {
      "title": "Module Style",
      "id": "811e3d29-08b7-450c-99a6-bf45593eacb4",
      "properties": {
        "node_color": "#392c34",
        "title_color": "#572e44",
        "auto_title": null,
        "icon": "F1719"
      },
      "x": 800,
      "y": 80,
      "width": 210,
      "height": 110,
      "collapsed": false,
      "inherited": false,
      "registry": "util/ModuleStyle",
      "base_type": "core/Node"
    },
    "e70f3387-3d8b-44e9-b480-45589208c0b9": {
      "title": "OUT summary",
      "id": "e70f3387-3d8b-44e9-b480-45589208c0b9",
      "properties": {
        "output_type": "str",
        "output_name": "summary",
        "num": 2
      },
      "x": 1948,
      "y": 323,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "core/Output",
      "base_type": "core/Node"
    },
    "73be0329-8d46-48c6-863a-56b6289707ac": {
      "title": "OUT instructions",
      "id": "73be0329-8d46-48c6-863a-56b6289707ac",
      "properties": {
        "output_type": "str",
        "output_name": "instructions",
        "num": 1
      },
      "x": 1968,
      "y": 93,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "core/Output",
      "base_type": "core/Node"
    },
    "a97be099-a120-48c5-8ce0-0031d77df2a4": {
      "title": "Instruct Character Updates",
      "id": "a97be099-a120-48c5-8ce0-0031d77df2a4",
      "properties": {},
      "x": -1276,
      "y": 714,
      "width": 218,
      "height": 86,
      "collapsed": false,
      "inherited": false,
      "registry": "agents/director/chat/instructCharacterUpdates",
      "base_type": "core/Graph"
    },
    "33950b41-6247-486e-b893-d28054d6ce4d": {
      "title": "true",
      "id": "33950b41-6247-486e-b893-d28054d6ce4d",
      "properties": {
        "value": true
      },
      "x": -1506,
      "y": 554,
      "width": 210,
      "height": 58,
      "collapsed": true,
      "inherited": false,
      "registry": "core/MakeBool",
      "base_type": "core/Node"
    },
    "c2440fb6-020b-4d97-a3c4-d4bce98fc32d": {
      "title": "true",
      "id": "c2440fb6-020b-4d97-a3c4-d4bce98fc32d",
      "properties": {
        "value": true
      },
      "x": -1508,
      "y": 1030,
      "width": 210,
      "height": 58,
      "collapsed": true,
      "inherited": false,
      "registry": "core/MakeBool",
      "base_type": "core/Node"
    },
    "682e35ab-8368-4150-b18a-1c4db73a80d0": {
      "title": "Instruct Character Creation",
      "id": "682e35ab-8368-4150-b18a-1c4db73a80d0",
      "properties": {},
      "x": -1288,
      "y": 1200,
      "width": 346,
      "height": 126,
      "collapsed": false,
      "inherited": false,
      "registry": "agents/director/chat/instructCharacterCreation",
      "base_type": "core/Graph"
    },
    "d1af8b2e-76dc-4aab-9e63-17c40e0b55e7": {
      "title": "AI Function Callback",
      "id": "d1af8b2e-76dc-4aab-9e63-17c40e0b55e7",
      "properties": {
        "name": "my_function",
        "allow_multiple_calls": true
      },
      "x": 636,
      "y": 2064,
      "width": 210,
      "height": 102,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Callback",
      "base_type": "core/Node"
    },
    "1c3e2a8c-f7fe-4b00-bc5d-1a28a18d864f": {
      "title": "FN create_character",
      "id": "1c3e2a8c-f7fe-4b00-bc5d-1a28a18d864f",
      "properties": {
        "name": "create_character"
      },
      "x": 385,
      "y": 2061,
      "width": 210,
      "height": 78,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/GetFunction",
      "base_type": "core/Node"
    },
    "5617e453-7dec-4bfe-9f03-d0ddd28f681b": {
      "title": "true",
      "id": "5617e453-7dec-4bfe-9f03-d0ddd28f681b",
      "properties": {
        "value": true
      },
      "x": -1954,
      "y": 1614,
      "width": 210,
      "height": 58,
      "collapsed": true,
      "inherited": false,
      "registry": "core/MakeBool",
      "base_type": "core/Node"
    },
    "28214c86-0d3c-4845-98aa-fa75ceea6750": {
      "title": "Validate Character",
      "id": "28214c86-0d3c-4845-98aa-fa75ceea6750",
      "properties": {
        "error_message": "",
        "character_status": "all"
      },
      "x": -2105,
      "y": 1687,
      "width": 210,
      "height": 102,
      "collapsed": false,
      "inherited": false,
      "registry": "validation/ValidateCharacter",
      "base_type": "core/Node"
    },
    "ae2ec8b2-44b3-4592-a9c4-5853bdb8f555": {
      "title": "status",
      "id": "ae2ec8b2-44b3-4592-a9c4-5853bdb8f555",
      "properties": {
        "name": "status",
        "typ": "str",
        "instructions": "The new status of the character, must be one of:\n\n- `active` - character can participate in the scene\n- `inactive` - character can no longer participate in the scene"
      },
      "x": -2374,
      "y": 1874,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "23296bbf-81e3-4a8b-8d76-db0f42884256": {
      "title": "narrate_instructions",
      "id": "23296bbf-81e3-4a8b-8d76-db0f42884256",
      "properties": {
        "name": "narrate_instructions",
        "typ": "str",
        "instructions": "If `status` = \"active\" and the character has not entered the scene yet, provide instructions to the writer on how the character's entry should be narrated.\n\nIf `status` = \"inactive\" and the character has not left the scene yet,\nprovide instructions to the writer on how the character's exit should be narrated."
      },
      "x": -2384,
      "y": 2064,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "bc58667c-9461-400f-8bfe-55582097e808": {
      "title": "Toggle Character",
      "id": "bc58667c-9461-400f-8bfe-55582097e808",
      "properties": {},
      "x": -1754,
      "y": 1814,
      "width": 346,
      "height": 86,
      "collapsed": false,
      "inherited": false,
      "registry": "agents/director/chat/toggleCharacter",
      "base_type": "core/Graph"
    },
    "b8d81dff-caad-4314-91cb-078fc3d625e8": {
      "title": "Is Active Character",
      "id": "b8d81dff-caad-4314-91cb-078fc3d625e8",
      "properties": {},
      "x": -1364,
      "y": 1926,
      "width": 160,
      "height": 26,
      "collapsed": false,
      "inherited": false,
      "registry": "scene/IsActiveCharacter",
      "base_type": "core/Node"
    },
    "308c3d15-6ff9-4d28-8fec-457219eaed6e": {
      "title": "Advanced Format",
      "id": "308c3d15-6ff9-4d28-8fec-457219eaed6e",
      "properties": {
        "template": "`{character.name}` allowed to actively participate in scene: {active}."
      },
      "x": -1164,
      "y": 1806,
      "width": 210,
      "height": 153,
      "collapsed": false,
      "inherited": false,
      "registry": "data/string/AdvancedFormat",
      "dynamic_inputs": [
        {
          "name": "item0",
          "type": "*"
        },
        {
          "name": "item1",
          "type": "*"
        }
      ],
      "base_type": "core/DynamicSocketNodeBase"
    },
    "3f0692ae-6ddd-4a0e-b9eb-4c01eda2b0aa": {
      "title": "FN toggle_character",
      "id": "3f0692ae-6ddd-4a0e-b9eb-4c01eda2b0aa",
      "properties": {
        "name": "toggle_character"
      },
      "x": 385,
      "y": 2251,
      "width": 210,
      "height": 78,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/GetFunction",
      "base_type": "core/Node"
    },
    "66f8da87-b8f1-4d52-b911-35afa35ed467": {
      "title": "AI Function Callback",
      "id": "66f8da87-b8f1-4d52-b911-35afa35ed467",
      "properties": {
        "name": "my_function",
        "allow_multiple_calls": true
      },
      "x": 640,
      "y": 2249,
      "width": 210,
      "height": 102,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Callback",
      "base_type": "core/Node"
    },
    "5257040f-0fd3-482c-a734-5e76ea60d5af": {
      "title": "DEF update_character",
      "id": "5257040f-0fd3-482c-a734-5e76ea60d5af",
      "properties": {
        "name": "update_character"
      },
      "x": -245,
      "y": 753,
      "width": 210,
      "height": 78,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/DefineFunction",
      "base_type": "core/Node"
    },
    "5f8589e7-4fac-4b56-92a8-095720b4fb93": {
      "title": "Return",
      "id": "5f8589e7-4fac-4b56-92a8-095720b4fb93",
      "properties": {},
      "x": -851,
      "y": 751,
      "width": 140,
      "height": 26,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/Return",
      "base_type": "core/Node"
    },
    "48643438-e846-4c73-81d2-ee9eef2d10fe": {
      "title": "DEF create_character",
      "id": "48643438-e846-4c73-81d2-ee9eef2d10fe",
      "properties": {
        "name": "create_character"
      },
      "x": -270,
      "y": 1250,
      "width": 210,
      "height": 78,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/DefineFunction",
      "base_type": "core/Node"
    },
    "413e490a-6823-4c87-9440-88dec9571e47": {
      "title": "Return",
      "id": "413e490a-6823-4c87-9440-88dec9571e47",
      "properties": {},
      "x": -838,
      "y": 1250,
      "width": 140,
      "height": 26,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/Return",
      "base_type": "core/Node"
    },
    "bc11dd77-7010-4522-9400-0e1144390106": {
      "title": "AI Function Callback Metadata",
      "id": "bc11dd77-7010-4522-9400-0e1144390106",
      "properties": {
        "instructions": "Create a new persistent character.",
        "examples": [
          {
            "instructions": "Create Dr. Elena Vasquez, a 34-year-old forensic psychologist with expertise in criminal profiling. She has shoulder-length dark hair, wire-rimmed glasses, and speaks with a slight accent. She's analytical but impatient with incompetence.",
            "narrate_instructions": "Dr. Vasquez enters the precinct carrying a leather briefcase, her heels clicking purposefully on the tile floor as she scans the busy room with sharp, observant eyes.",
            "active": true
          },
          {
            "instructions": "Create Thornwick the Wise, an ancient dragon who has been sleeping in the Crystal Caverns for centuries. He has emerald scales, golden eyes, and vast knowledge of forgotten magic. He's cautious but curious about the modern world.",
            "narrate_instructions": "",
            "active": false
          }
        ]
      },
      "x": -600,
      "y": 1260,
      "width": 244,
      "height": 82,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Metadata",
      "base_type": "core/Node"
    },
    "91a6cca6-4aff-4520-81d2-aa7de1a0951a": {
      "title": "DEF toggle_character",
      "id": "91a6cca6-4aff-4520-81d2-aa7de1a0951a",
      "properties": {
        "name": "toggle_character"
      },
      "x": -361,
      "y": 1880,
      "width": 210,
      "height": 78,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/DefineFunction",
      "base_type": "core/Node"
    },
    "0983fa24-979e-4fe2-9000-0ebac67fd29d": {
      "title": "Return",
      "id": "0983fa24-979e-4fe2-9000-0ebac67fd29d",
      "properties": {},
      "x": -911,
      "y": 1880,
      "width": 140,
      "height": 26,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/Return",
      "base_type": "core/Node"
    },
    "83244f81-0c8d-4004-a192-5e0a18bf27df": {
      "title": "AI Function Callback Metadata",
      "id": "83244f81-0c8d-4004-a192-5e0a18bf27df",
      "properties": {
        "instructions": "Activate or deactivate a character. Deactivated characters may no longer participate in the current scene, until reactivated.",
        "examples": [
          {
            "character": "Captain Morrison",
            "narrate_instructions": "Captain Morrison storms into the room, coffee mug in hand, looking like he hasn't slept in days. His heavy footsteps announce his presence before he even speaks.",
            "status": "active"
          },
          {
            "character": "Marcus",
            "narrate_instructions": "Marcus quietly excuses himself from the group, claiming he needs some fresh air. He slips out the back door, leaving the others to continue their discussion without him.",
            "status": "inactive"
          }
        ]
      },
      "x": -661,
      "y": 1860,
      "width": 244,
      "height": 82,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Metadata",
      "base_type": "core/Node"
    },
    "105c1497-5710-4b45-b336-be80a5bb5304": {
      "title": "Validate Character",
      "id": "105c1497-5710-4b45-b336-be80a5bb5304",
      "properties": {
        "error_message": "",
        "character_status": "all"
      },
      "x": -1640,
      "y": 2345,
      "width": 210,
      "height": 102,
      "collapsed": false,
      "inherited": false,
      "registry": "validation/ValidateCharacter",
      "base_type": "core/Node"
    },
    "7364ab25-1101-46ab-ab2e-3c49b87914ff": {
      "title": "true",
      "id": "7364ab25-1101-46ab-ab2e-3c49b87914ff",
      "properties": {
        "value": true
      },
      "x": -1506,
      "y": 2288,
      "width": 210,
      "height": 58,
      "collapsed": true,
      "inherited": false,
      "registry": "core/MakeBool",
      "base_type": "core/Node"
    },
    "969602f9-8711-435f-afcd-2aa578136d28": {
      "title": "character",
      "id": "969602f9-8711-435f-afcd-2aa578136d28",
      "properties": {
        "name": "character",
        "typ": "str",
        "instructions": "The exact character name as the system knows it."
      },
      "x": -1905,
      "y": 2354,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "f8492b30-aaed-42da-9704-89ed39b389c8": {
      "title": "Instruct Character Config Updates",
      "id": "f8492b30-aaed-42da-9704-89ed39b389c8",
      "properties": {},
      "x": -1245,
      "y": 2454,
      "width": 277,
      "height": 86,
      "collapsed": false,
      "inherited": false,
      "registry": "agents/director/chat/instructCharacterConfigUpdates",
      "base_type": "core/Graph"
    },
    "ee7418df-668f-4227-89ae-83846ee406d6": {
      "title": "Return",
      "id": "ee7418df-668f-4227-89ae-83846ee406d6",
      "properties": {},
      "x": -885,
      "y": 2494,
      "width": 140,
      "height": 26,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/Return",
      "base_type": "core/Node"
    },
    "87012c47-edde-4bd5-b4f0-04b803b1e4a6": {
      "title": "instructions",
      "id": "87012c47-edde-4bd5-b4f0-04b803b1e4a6",
      "properties": {
        "name": "instructions",
        "typ": "str",
        "instructions": "Provide concise and actionable instructions to another agent to update a specific character's configuration."
      },
      "x": -1905,
      "y": 2544,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "171ac8cb-790a-4ec1-ba33-7484c8078b1f": {
      "title": "AI Function Callback Metadata",
      "id": "171ac8cb-790a-4ec1-ba33-7484c8078b1f",
      "properties": {
        "instructions": "Make changes to an existing character's story configuration by managing the character's example dialogue and acting instructions.",
        "examples": [
          {
            "character": "Anna",
            "instructions": "Update Anna's acting instructions to speak less formally."
          },
          {
            "character": "Peter",
            "instructions": "Add a dialogue example showcasing Peter's anger."
          }
        ]
      },
      "x": -635,
      "y": 2494,
      "width": 244,
      "height": 82,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Metadata",
      "base_type": "core/Node"
    },
    "30c468f4-558e-42bc-b8a7-30741b9b4b75": {
      "title": "DEF character_setup",
      "id": "30c468f4-558e-42bc-b8a7-30741b9b4b75",
      "properties": {
        "name": "character_setup"
      },
      "x": -300,
      "y": 2490,
      "width": 210,
      "height": 78,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/DefineFunction",
      "base_type": "core/Node"
    },
    "3cc9ccbf-b656-4e7f-a6b9-f7790d8f13e6": {
      "title": "FN character_setup",
      "id": "3cc9ccbf-b656-4e7f-a6b9-f7790d8f13e6",
      "properties": {
        "name": "character_setup"
      },
      "x": 385,
      "y": 2461,
      "width": 210,
      "height": 78,
      "collapsed": false,
      "inherited": false,
      "registry": "core/functions/GetFunction",
      "base_type": "core/Node"
    },
    "00a75d47-fa40-4c10-9aca-61a12e0a39fe": {
      "title": "AI Function Callback",
      "id": "00a75d47-fa40-4c10-9aca-61a12e0a39fe",
      "properties": {
        "name": "my_function",
        "allow_multiple_calls": true
      },
      "x": 645,
      "y": 2461,
      "width": 210,
      "height": 102,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Callback",
      "base_type": "core/Node"
    },
    "80578925-154d-4d1a-855b-f3f62ae91834": {
      "title": "List Collector",
      "id": "80578925-154d-4d1a-855b-f3f62ae91834",
      "properties": {},
      "x": 579,
      "y": 1110,
      "width": 140,
      "height": 101,
      "collapsed": false,
      "inherited": false,
      "registry": "data/ListCollector",
      "dynamic_inputs": [
        {
          "name": "item0",
          "type": "*"
        },
        {
          "name": "item1",
          "type": "*"
        }
      ],
      "base_type": "core/DynamicSocketNodeBase"
    },
    "9498a34a-8273-4989-8a85-033725196323": {
      "title": "Build Prompt",
      "id": "9498a34a-8273-4989-8a85-033725196323",
      "properties": {
        "template_file": "base",
        "scope": "common",
        "instructions": "",
        "reserved_tokens": 312,
        "limit_max_tokens": 0,
        "include_scene_intent": true,
        "include_extra_context": false,
        "include_memory_context": true,
        "include_scene_context": false,
        "include_character_context": false,
        "include_gamestate_context": false,
        "memory_prompt": "",
        "prefill_prompt": "",
        "return_prefill_prompt": false,
        "dedupe_enabled": true,
        "response_length": 0,
        "technical": true
      },
      "x": 989,
      "y": 720,
      "width": 304,
      "height": 542,
      "collapsed": false,
      "inherited": false,
      "registry": "prompt/BuildPrompt",
      "base_type": "core/Node"
    },
    "31e600e5-7d44-4013-b969-1cb8cb5f8b93": {
      "title": "SET local.focal_calls",
      "id": "31e600e5-7d44-4013-b969-1cb8cb5f8b93",
      "properties": {
        "name": "focal_calls",
        "scope": "local"
      },
      "x": 1784,
      "y": 1789,
      "width": 210,
      "height": 122,
      "collapsed": false,
      "inherited": false,
      "registry": "state/SetState",
      "base_type": "core/Node"
    },
    "97927759-a089-40b2-b6fc-702ffea1847d": {
      "title": "Callbacks",
      "id": "97927759-a089-40b2-b6fc-702ffea1847d",
      "properties": {},
      "x": 969,
      "y": 2060,
      "width": 140,
      "height": 141,
      "collapsed": false,
      "inherited": false,
      "registry": "data/ListCollector",
      "dynamic_inputs": [
        {
          "name": "item0",
          "type": "*"
        },
        {
          "name": "item1",
          "type": "*"
        },
        {
          "name": "item2",
          "type": "*"
        },
        {
          "name": "item3",
          "type": "*"
        }
      ],
      "base_type": "core/DynamicSocketNodeBase"
    },
    "65dc18c0-500e-4798-9dbd-c40d253f08e5": {
      "title": "Stage 1",
      "id": "65dc18c0-500e-4798-9dbd-c40d253f08e5",
      "properties": {
        "stage": 1
      },
      "x": 2069,
      "y": 1820,
      "width": 210,
      "height": 118,
      "collapsed": false,
      "inherited": false,
      "registry": "core/Stage",
      "base_type": "core/Node"
    },
    "af8f7ca6-680c-42c9-a4c5-d8c2d3cb4c19": {
      "title": "instructions",
      "id": "af8f7ca6-680c-42c9-a4c5-d8c2d3cb4c19",
      "properties": {
        "name": "instructions",
        "typ": "str",
        "instructions": "Provide concise and actionable instructions to another agent to update a specific character."
      },
      "x": -1910,
      "y": 812,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "bffb6725-9e8b-4d91-b36c-29d923cbd40b": {
      "title": "character",
      "id": "bffb6725-9e8b-4d91-b36c-29d923cbd40b",
      "properties": {
        "name": "character",
        "typ": "str",
        "instructions": "The exact character name as the system knows it."
      },
      "x": -1910,
      "y": 622,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "223c8b27-3ae3-47b5-b8fa-8749639f5622": {
      "title": "instructions",
      "id": "223c8b27-3ae3-47b5-b8fa-8749639f5622",
      "properties": {
        "name": "instructions",
        "typ": "str",
        "instructions": "Provide concise and actionable instructions to another agent to create a new persistent character in the story."
      },
      "x": -1930,
      "y": 1052,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "a1baad66-05c6-4fc4-a5ec-8a1cfa3c637b": {
      "title": "active",
      "id": "a1baad66-05c6-4fc4-a5ec-8a1cfa3c637b",
      "properties": {
        "name": "active",
        "typ": "bool",
        "instructions": "Set to true if this character needs to become an ACTIVE participant in the scene immediately."
      },
      "x": -1930,
      "y": 1230,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "58567c8d-c565-4130-98cc-d771d30c186d": {
      "title": "narrate_instructions",
      "id": "58567c8d-c565-4130-98cc-d771d30c186d",
      "properties": {
        "name": "narrate_instructions",
        "typ": "str",
        "instructions": "If `activate` is true and the character has not entered the scene yet, provide instructions to the writer on how the character's entry should be narrated."
      },
      "x": -1930,
      "y": 1400,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "24df37be-25ed-4cc4-809d-0a4cfc3e9964": {
      "title": "character",
      "id": "24df37be-25ed-4cc4-809d-0a4cfc3e9964",
      "properties": {
        "name": "character",
        "typ": "str",
        "instructions": "The exact character name as the system knows it."
      },
      "x": -2370,
      "y": 1680,
      "width": 210,
      "height": 106,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Argument",
      "base_type": "core/Node"
    },
    "e8ba7f4f-f101-4d62-821d-c0074400bd7f": {
      "title": "GET local.instructions",
      "id": "e8ba7f4f-f101-4d62-821d-c0074400bd7f",
      "properties": {
        "name": "instructions",
        "scope": "local"
      },
      "x": 29,
      "y": 572,
      "width": 210,
      "height": 122,
      "collapsed": false,
      "inherited": false,
      "registry": "state/GetState",
      "base_type": "core/Node"
    },
    "b3a0ec8c-044d-4afd-9960-356624b75275": {
      "title": "Scan Context IDs",
      "id": "b3a0ec8c-044d-4afd-9960-356624b75275",
      "properties": {
        "header": "Relevant Context",
        "display_mode": "normal"
      },
      "x": 239,
      "y": 1240,
      "width": 210,
      "height": 142,
      "collapsed": false,
      "inherited": false,
      "registry": "context_id/ScanContextIDs",
      "base_type": "core/Node"
    },
    "e6dc7410-1ff6-42e5-9103-3f2ec062073b": {
      "title": "AI Function Callback Metadata",
      "id": "e6dc7410-1ff6-42e5-9103-3f2ec062073b",
      "properties": {
        "instructions": "Make changes to an existing character's description, attributes and background details.",
        "examples": [
          {
            "character": "Detective Rivera",
            "instructions": "Add a new attribute called 'combat_training' to Detective Rivera describing her military background and hand-to-hand combat skills from her time in the Marines."
          },
          {
            "character": "Lyra Moonwhisper",
            "instructions": "Update `character.description:Lyra Moonwhisper.description` to show the physical effects of using too much magic - her silver hair now has streaks of white and her hands have a slight tremor from magical exhaustion."
          }
        ]
      },
      "x": -555,
      "y": 751,
      "width": 244,
      "height": 82,
      "collapsed": false,
      "inherited": false,
      "registry": "focal/Metadata",
      "base_type": "core/Node"
    },
    "ecaa252a-e8cf-40da-9c4f-7994c4c1795c": {
      "title": "Jinja2 Format",
      "id": "ecaa252a-e8cf-40da-9c4f-7994c4c1795c",
      "properties": {
        "template": "Your only task is to route these instructions to the appropriate handler(s). \n\nYou MUST NOT embelish the instructions with new information.\n\n{% if context_id_items %}\n{% set target=context_id_items[0] %}\nYou have been given a specific context ID to update: `{{ target.context_id }}`.\nIMPORTANT: You MUST pass along this context ID in your function call(s).\n{% endif %}\n\nAnalyze the instructions and route to the appropriate function(s). appropriate function(s) to accomplish your task.\n\nTASK:\n```\n{{ instructions }}\n```"
      },
      "x": 410,
      "y": 860,
      "width": 210,
      "height": 153,
      "collapsed": false,
      "inherited": false,
      "registry": "prompt/Jinja2Format",
      "dynamic_inputs": [
        {
          "name": "item0",
          "type": "*"
        },
        {
          "name": "item1",
          "type": "*"
        }
      ],
      "base_type": "core/DynamicSocketNodeBase"
    }
  },
  "edges": {
    "29753ef2-37de-41d1-9e35-ecc5c3625c7a.value": [
      "7ebd2b41-8402-467b-bbba-6251d92187c0.value"
    ],
    "12028a6c-5ff0-4109-856c-5a361c39a05c.value": [
      "1a95dd11-970b-47d1-9e4f-e2f859c996de.state"
    ],
    "e773e61a-58a6-41b9-a2fb-7deae05c3ed2.value": [
      "9498a34a-8273-4989-8a85-033725196323.state"
    ],
    "23b4ac43-1796-4abc-8741-e8517f91c1d2.agent": [
      "9498a34a-8273-4989-8a85-033725196323.agent"
    ],
    "dc77494a-e545-4883-8c05-69988c430b37.character": [
      "a97be099-a120-48c5-8ce0-0031d77df2a4.character"
    ],
    "850f0f46-16eb-4721-9a98-55835e72508c.fn": [
      "db4896cf-152b-4cc5-9761-61e500cf98ee.fn"
    ],
    "850f0f46-16eb-4721-9a98-55835e72508c.name": [
      "db4896cf-152b-4cc5-9761-61e500cf98ee.name"
    ],
    "db4896cf-152b-4cc5-9761-61e500cf98ee.callback": [
      "97927759-a089-40b2-b6fc-702ffea1847d.item0"
    ],
    "ad6acd60-dc07-4414-aacf-ae28145946e6.calls": [
      "31e600e5-7d44-4013-b969-1cb8cb5f8b93.value"
    ],
    "abd063a2-4df0-4b32-8f97-57c6046d6b04.dynamic_instruction": [
      "80578925-154d-4d1a-855b-f3f62ae91834.item0"
    ],
    "cba07b38-5f04-4189-a605-c98730b4b31c.value": [
      "abd063a2-4df0-4b32-8f97-57c6046d6b04.state"
    ],
    "4bdac5a0-5895-412b-a7f3-90813df7580c.summary": [
      "e70f3387-3d8b-44e9-b480-45589208c0b9.value"
    ],
    "d9612662-641a-4f2c-ae07-51a53540ea4e.value": [
      "73be0329-8d46-48c6-863a-56b6289707ac.value"
    ],
    "55b1da29-7348-4be7-ac78-6013064b6119.value": [
      "4bdac5a0-5895-412b-a7f3-90813df7580c.calls"
    ],
    "eccb2aab-0e0d-4af6-a812-e06d1c8a6865.value": [
      "12028a6c-5ff0-4109-856c-5a361c39a05c.value"
    ],
    "a97be099-a120-48c5-8ce0-0031d77df2a4.summary": [
      "5f8589e7-4fac-4b56-92a8-095720b4fb93.value"
    ],
    "33950b41-6247-486e-b893-d28054d6ce4d.value": [
      "a97be099-a120-48c5-8ce0-0031d77df2a4.state"
    ],
    "c2440fb6-020b-4d97-a3c4-d4bce98fc32d.value": [
      "682e35ab-8368-4150-b18a-1c4db73a80d0.state"
    ],
    "682e35ab-8368-4150-b18a-1c4db73a80d0.summary": [
      "413e490a-6823-4c87-9440-88dec9571e47.value"
    ],
    "d1af8b2e-76dc-4aab-9e63-17c40e0b55e7.callback": [
      "97927759-a089-40b2-b6fc-702ffea1847d.item1"
    ],
    "1c3e2a8c-f7fe-4b00-bc5d-1a28a18d864f.fn": [
      "d1af8b2e-76dc-4aab-9e63-17c40e0b55e7.fn"
    ],
    "1c3e2a8c-f7fe-4b00-bc5d-1a28a18d864f.name": [
      "d1af8b2e-76dc-4aab-9e63-17c40e0b55e7.name"
    ],
    "5617e453-7dec-4bfe-9f03-d0ddd28f681b.value": [
      "bc58667c-9461-400f-8bfe-55582097e808.state"
    ],
    "28214c86-0d3c-4845-98aa-fa75ceea6750.character": [
      "bc58667c-9461-400f-8bfe-55582097e808.character"
    ],
    "ae2ec8b2-44b3-4592-a9c4-5853bdb8f555.value": [
      "bc58667c-9461-400f-8bfe-55582097e808.status"
    ],
    "23296bbf-81e3-4a8b-8d76-db0f42884256.value": [
      "bc58667c-9461-400f-8bfe-55582097e808.narrate_instructions"
    ],
    "bc58667c-9461-400f-8bfe-55582097e808.character": [
      "b8d81dff-caad-4314-91cb-078fc3d625e8.character",
      "308c3d15-6ff9-4d28-8fec-457219eaed6e.item0"
    ],
    "b8d81dff-caad-4314-91cb-078fc3d625e8.active": [
      "308c3d15-6ff9-4d28-8fec-457219eaed6e.item1"
    ],
    "308c3d15-6ff9-4d28-8fec-457219eaed6e.result": [
      "0983fa24-979e-4fe2-9000-0ebac67fd29d.value"
    ],
    "3f0692ae-6ddd-4a0e-b9eb-4c01eda2b0aa.fn": [
      "66f8da87-b8f1-4d52-b911-35afa35ed467.fn"
    ],
    "3f0692ae-6ddd-4a0e-b9eb-4c01eda2b0aa.name": [
      "66f8da87-b8f1-4d52-b911-35afa35ed467.name"
    ],
    "66f8da87-b8f1-4d52-b911-35afa35ed467.callback": [
      "97927759-a089-40b2-b6fc-702ffea1847d.item2"
    ],
    "5f8589e7-4fac-4b56-92a8-095720b4fb93.value": [
      "e6dc7410-1ff6-42e5-9103-3f2ec062073b.state"
    ],
    "413e490a-6823-4c87-9440-88dec9571e47.value": [
      "bc11dd77-7010-4522-9400-0e1144390106.state"
    ],
    "bc11dd77-7010-4522-9400-0e1144390106.state": [
      "48643438-e846-4c73-81d2-ee9eef2d10fe.nodes"
    ],
    "0983fa24-979e-4fe2-9000-0ebac67fd29d.value": [
      "83244f81-0c8d-4004-a192-5e0a18bf27df.state"
    ],
    "83244f81-0c8d-4004-a192-5e0a18bf27df.state": [
      "91a6cca6-4aff-4520-81d2-aa7de1a0951a.nodes"
    ],
    "105c1497-5710-4b45-b336-be80a5bb5304.character": [
      "f8492b30-aaed-42da-9704-89ed39b389c8.character"
    ],
    "7364ab25-1101-46ab-ab2e-3c49b87914ff.value": [
      "f8492b30-aaed-42da-9704-89ed39b389c8.state"
    ],
    "969602f9-8711-435f-afcd-2aa578136d28.value": [
      "105c1497-5710-4b45-b336-be80a5bb5304.value"
    ],
    "f8492b30-aaed-42da-9704-89ed39b389c8.summary": [
      "ee7418df-668f-4227-89ae-83846ee406d6.value"
    ],
    "ee7418df-668f-4227-89ae-83846ee406d6.value": [
      "171ac8cb-790a-4ec1-ba33-7484c8078b1f.state"
    ],
    "87012c47-edde-4bd5-b4f0-04b803b1e4a6.value": [
      "f8492b30-aaed-42da-9704-89ed39b389c8.instructions"
    ],
    "171ac8cb-790a-4ec1-ba33-7484c8078b1f.state": [
      "30c468f4-558e-42bc-b8a7-30741b9b4b75.nodes"
    ],
    "3cc9ccbf-b656-4e7f-a6b9-f7790d8f13e6.fn": [
      "00a75d47-fa40-4c10-9aca-61a12e0a39fe.fn"
    ],
    "3cc9ccbf-b656-4e7f-a6b9-f7790d8f13e6.name": [
      "00a75d47-fa40-4c10-9aca-61a12e0a39fe.name"
    ],
    "00a75d47-fa40-4c10-9aca-61a12e0a39fe.callback": [
      "97927759-a089-40b2-b6fc-702ffea1847d.item3"
    ],
    "80578925-154d-4d1a-855b-f3f62ae91834.list": [
      "9498a34a-8273-4989-8a85-033725196323.dynamic_context"
    ],
    "9498a34a-8273-4989-8a85-033725196323.state": [
      "ad6acd60-dc07-4414-aacf-ae28145946e6.state"
    ],
    "9498a34a-8273-4989-8a85-033725196323.agent": [
      "ad6acd60-dc07-4414-aacf-ae28145946e6.agent"
    ],
    "9498a34a-8273-4989-8a85-033725196323.prompt": [
      "ad6acd60-dc07-4414-aacf-ae28145946e6.prompt"
    ],
    "31e600e5-7d44-4013-b969-1cb8cb5f8b93.value": [
      "65dc18c0-500e-4798-9dbd-c40d253f08e5.state"
    ],
    "97927759-a089-40b2-b6fc-702ffea1847d.list": [
      "ad6acd60-dc07-4414-aacf-ae28145946e6.callbacks"
    ],
    "af8f7ca6-680c-42c9-a4c5-d8c2d3cb4c19.value": [
      "a97be099-a120-48c5-8ce0-0031d77df2a4.instructions"
    ],
    "bffb6725-9e8b-4d91-b36c-29d923cbd40b.value": [
      "dc77494a-e545-4883-8c05-69988c430b37.value"
    ],
    "223c8b27-3ae3-47b5-b8fa-8749639f5622.value": [
      "682e35ab-8368-4150-b18a-1c4db73a80d0.instructions"
    ],
    "a1baad66-05c6-4fc4-a5ec-8a1cfa3c637b.value": [
      "682e35ab-8368-4150-b18a-1c4db73a80d0.active"
    ],
    "58567c8d-c565-4130-98cc-d771d30c186d.value": [
      "682e35ab-8368-4150-b18a-1c4db73a80d0.narrate_instructions"
    ],
    "24df37be-25ed-4cc4-809d-0a4cfc3e9964.value": [
      "28214c86-0d3c-4845-98aa-fa75ceea6750.value"
    ],
    "e8ba7f4f-f101-4d62-821d-c0074400bd7f.value": [
      "ecaa252a-e8cf-40da-9c4f-7994c4c1795c.item0",
      "b3a0ec8c-044d-4afd-9960-356624b75275.text"
    ],
    "b3a0ec8c-044d-4afd-9960-356624b75275.dynamic_instruction": [
      "80578925-154d-4d1a-855b-f3f62ae91834.item1"
    ],
    "b3a0ec8c-044d-4afd-9960-356624b75275.context_id_items": [
      "ecaa252a-e8cf-40da-9c4f-7994c4c1795c.item1"
    ],
    "e6dc7410-1ff6-42e5-9103-3f2ec062073b.state": [
      "5257040f-0fd3-482c-a734-5e76ea60d5af.nodes"
    ],
    "ecaa252a-e8cf-40da-9c4f-7994c4c1795c.result": [
      "9498a34a-8273-4989-8a85-033725196323.instructions"
    ]
  },
  "groups": [
    {
      "title": "Group",
      "x": -1,
      "y": 1,
      "width": 1040,
      "height": 474,
      "color": "#b58b2a",
      "font_size": 24,
      "inherited": false
    },
    {
      "title": "Group",
      "x": -2,
      "y": 478,
      "width": 2290,
      "height": 2482,
      "color": "#3f789e",
      "font_size": 24,
      "inherited": false
    },
    {
      "title": "FN - update_character",
      "x": -1935,
      "y": 474,
      "width": 1925,
      "height": 468,
      "color": "#b06634",
      "font_size": 24,
      "inherited": false
    },
    {
      "title": "Group",
      "x": 1043,
      "y": 2,
      "width": 1200,
      "height": 473,
      "color": "#8A8",
      "font_size": 24,
      "inherited": false
    },
    {
      "title": "FN - create_character",
      "x": -1952,
      "y": 950,
      "width": 1941,
      "height": 581,
      "color": "#b06634",
      "font_size": 24,
      "inherited": false
    },
    {
      "title": "FN - toggle_character",
      "x": -2409,
      "y": 1534,
      "width": 2399,
      "height": 671,
      "color": "#b06634",
      "font_size": 24,
      "inherited": false
    },
    {
      "title": "Function - character_setup",
      "x": -1935,
      "y": 2213,
      "width": 1925,
      "height": 463,
      "color": "#b06634",
      "font_size": 24,
      "inherited": false
    }
  ],
  "comments": [],
  "extends": null,
  "base_type": "core/Graph",
  "inputs": [],
  "outputs": [],
  "module_properties": {},
  "style": {
    "title_color": "#572e44",
    "node_color": "#392c34",
    "icon": "F1719",
    "auto_title": null,
    "counterpart": null
  }
}