{
  "type": "excalidraw",
  "version": 2,
  "source": "https://excalidraw-jetbrains-plugin",
  "elements": [
    {
      "id": "o-XcsND2xqoq6wVL2aN3r",
      "type": "rectangle",
      "x": 247.30078125,
      "y": 346.765625,
      "width": 135.16796875,
      "height": 62.81249999999997,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 1133739739,
      "version": 169,
      "versionNonce": 1658999195,
      "isDeleted": false,
      "boundElementIds": [
        "F5DGd84G8-bAE-9peLiga",
        "FWUir36Lac7ZdhvsEDGm7",
        "SQTORXvV59x6g2Jf7ZemD",
        "gQLsN0qgbKFx_W1hN7hgm"
      ]
    },
    {
      "id": "e7u4bjsWdpMCAeU6YoHYZ",
      "type": "text",
      "x": 248.404296875,
      "y": 365.9453125,
      "width": 133,
      "height": 25,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 483360059,
      "version": 35,
      "versionNonce": 1824914555,
      "isDeleted": false,
      "boundElementIds": [
        "nvrULdx47dkG4-KW1YZ_7",
        "gPsE2305ty3YVZ16CzDwz"
      ],
      "text": "domain_agent",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "center",
      "verticalAlign": "middle",
      "baseline": 18
    },
    {
      "id": "sndRrIpUtXStLG-S063V6",
      "type": "rectangle",
      "x": 107.296875,
      "y": 488.34765625,
      "width": 132.81640625,
      "height": 86.8515625,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 1693602523,
      "version": 74,
      "versionNonce": 1622575893,
      "isDeleted": false,
      "boundElementIds": [
        "nvrULdx47dkG4-KW1YZ_7",
        "F5DGd84G8-bAE-9peLiga"
      ]
    },
    {
      "id": "q8zSYno_qf__-hYN4golO",
      "type": "text",
      "x": 148.822265625,
      "y": 519.26953125,
      "width": 50,
      "height": 25,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 400908635,
      "version": 7,
      "versionNonce": 1894067867,
      "isDeleted": false,
      "boundElementIds": null,
      "text": "tools",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "center",
      "verticalAlign": "middle",
      "baseline": 18
    },
    {
      "id": "nvrULdx47dkG4-KW1YZ_7",
      "type": "arrow",
      "x": 299.0114075067107,
      "y": 404.069241649285,
      "width": 124.2910329949755,
      "height": 76.899508350715,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "round",
      "seed": 1050172379,
      "version": 203,
      "versionNonce": 2103473013,
      "isDeleted": false,
      "boundElementIds": null,
      "points": [
        [
          0,
          0
        ],
        [
          -124.2910329949755,
          76.899508350715
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": {
        "elementId": "sndRrIpUtXStLG-S063V6",
        "focus": -0.5937144406257783,
        "gap": 7.37890625
      },
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "5GT4LVepNI3RHlNTcikNG",
      "type": "text",
      "x": 69.0078125,
      "y": 426,
      "width": 165,
      "height": 25,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 829020117,
      "version": 114,
      "versionNonce": 1150912859,
      "isDeleted": false,
      "boundElementIds": null,
      "text": "should_call_tool",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "left",
      "verticalAlign": "top",
      "baseline": 18
    },
    {
      "id": "F5DGd84G8-bAE-9peLiga",
      "type": "arrow",
      "x": 252.30552135358863,
      "y": 515.2143555951077,
      "width": 45.138715360093954,
      "height": 94.2335212212638,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "round",
      "seed": 1910543573,
      "version": 395,
      "versionNonce": 648945339,
      "isDeleted": false,
      "boundElementIds": null,
      "points": [
        [
          0,
          0
        ],
        [
          45.138715360093954,
          -94.2335212212638
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": {
        "elementId": "sndRrIpUtXStLG-S063V6",
        "gap": 12.192240103588599,
        "focus": 0.8090172404496854
      },
      "endBinding": {
        "elementId": "o-XcsND2xqoq6wVL2aN3r",
        "gap": 10.426146873843875,
        "focus": -0.034170909574071553
      },
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "54651f1MEz5r8wjC6IxLR",
      "type": "rectangle",
      "x": 264.09548611111114,
      "y": 602.23828125,
      "width": 143.5,
      "height": 76.2578125,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 1683006555,
      "version": 508,
      "versionNonce": 94719131,
      "isDeleted": false,
      "boundElementIds": [
        "FWUir36Lac7ZdhvsEDGm7",
        "SQTORXvV59x6g2Jf7ZemD",
        "1JK502AfXIJTnCSAnH6Ro",
        "ORq8b0Mc3avhMthz4PewN",
        "4Z4QHvSfK5U5v9qtUjRgG"
      ]
    },
    {
      "id": "jW1-j27fJfFtJwbMKrTeu",
      "type": "text",
      "x": 264.96397569444446,
      "y": 627.2065972222223,
      "width": 149,
      "height": 25,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 1110252949,
      "version": 338,
      "versionNonce": 1287450075,
      "isDeleted": false,
      "boundElementIds": [
        "gPsE2305ty3YVZ16CzDwz"
      ],
      "text": "validate_agent",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "left",
      "verticalAlign": "top",
      "baseline": 18
    },
    {
      "id": "SQTORXvV59x6g2Jf7ZemD",
      "type": "arrow",
      "x": 346.58062868015094,
      "y": 596.91796875,
      "width": 1.1941260933126046,
      "height": 183.39453125,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "round",
      "seed": 692508405,
      "version": 633,
      "versionNonce": 1107348533,
      "isDeleted": false,
      "boundElementIds": null,
      "points": [
        [
          0,
          0
        ],
        [
          -1.1941260933126046,
          -183.39453125
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": {
        "elementId": "54651f1MEz5r8wjC6IxLR",
        "focus": 0.15303259464825625,
        "gap": 5.3203125
      },
      "endBinding": {
        "elementId": "o-XcsND2xqoq6wVL2aN3r",
        "focus": -0.4465589915490647,
        "gap": 3.9453125
      },
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "rfs__U_YiaTwwGY0bFE5k",
      "type": "text",
      "x": 417.58463541666663,
      "y": 592.3932291666667,
      "width": 154,
      "height": 25,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 274196859,
      "version": 580,
      "versionNonce": 1403871125,
      "isDeleted": false,
      "boundElementIds": null,
      "text": "should_validate",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "left",
      "verticalAlign": "top",
      "baseline": 18
    },
    {
      "id": "gPsE2305ty3YVZ16CzDwz",
      "type": "arrow",
      "x": 329.1671216536817,
      "y": 406.93750000000006,
      "width": 2.5963128532507085,
      "height": 203.84765624999994,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "round",
      "seed": 1327145787,
      "version": 125,
      "versionNonce": 1571449435,
      "isDeleted": false,
      "boundElementIds": null,
      "points": [
        [
          0,
          0
        ],
        [
          -2.5963128532507085,
          203.84765624999994
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "gAsLqZuTK9bCFxRM1SO71",
      "type": "rectangle",
      "x": 251.68576388888886,
      "y": 785.7465277777778,
      "width": 168.0078125,
      "height": 79.24609375,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 94521115,
      "version": 133,
      "versionNonce": 1378287931,
      "isDeleted": false,
      "boundElementIds": [
        "1JK502AfXIJTnCSAnH6Ro"
      ]
    },
    {
      "id": "E7BZiaaZqFagyeM_Z_Up6",
      "type": "text",
      "x": 311.83637152777777,
      "y": 812.9607204861111,
      "width": 34,
      "height": 25,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 1856675643,
      "version": 46,
      "versionNonce": 209554875,
      "isDeleted": false,
      "boundElementIds": null,
      "text": "End",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "center",
      "verticalAlign": "middle",
      "baseline": 18
    },
    {
      "id": "1JK502AfXIJTnCSAnH6Ro",
      "type": "arrow",
      "x": 335.8340817166449,
      "y": 687.23828125,
      "width": 13.7761790588483,
      "height": 84.53168402777783,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "round",
      "seed": 777444245,
      "version": 525,
      "versionNonce": 194485909,
      "isDeleted": false,
      "boundElementIds": null,
      "points": [
        [
          0,
          0
        ],
        [
          13.7761790588483,
          84.53168402777783
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": {
        "elementId": "54651f1MEz5r8wjC6IxLR",
        "focus": 0.0981225345329254,
        "gap": 8.7421875
      },
      "endBinding": {
        "elementId": "gAsLqZuTK9bCFxRM1SO71",
        "focus": 0.2504468931723692,
        "gap": 13.9765625
      },
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "gQLsN0qgbKFx_W1hN7hgm",
      "type": "arrow",
      "x": 312.65234375,
      "y": 286.48046875,
      "width": 0,
      "height": 45.98828125,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "round",
      "seed": 195365019,
      "version": 80,
      "versionNonce": 1690581045,
      "isDeleted": false,
      "boundElementIds": null,
      "points": [
        [
          0,
          0
        ],
        [
          0,
          45.98828125
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": {
        "elementId": "o-XcsND2xqoq6wVL2aN3r",
        "focus": -0.03303181805045805,
        "gap": 14.296875
      },
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "QJl0TULCF9vcweoOh4ymi",
      "type": "text",
      "x": 727.11328125,
      "y": 363,
      "width": 415,
      "height": 225,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 687959797,
      "version": 189,
      "versionNonce": 1487320341,
      "isDeleted": false,
      "boundElementIds": null,
      "text": "should_call_tool:\nif tool_call and not any(should_validate):\n    then \"tools\"\nelif should_validate:\n    then \"validate\"\nelse:\n    then \"End\"\n\n",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "left",
      "verticalAlign": "top",
      "baseline": 218
    },
    {
      "id": "PkA1kre_lGi9Wurbpp4Pf",
      "type": "text",
      "x": 745.11328125,
      "y": 617,
      "width": 168,
      "height": 125,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 1719350107,
      "version": 108,
      "versionNonce": 2112201467,
      "isDeleted": false,
      "boundElementIds": null,
      "text": "should_reprompt:\nif msg.is_error:\n    then \"agent\"\nelse:\n    then \"End\"",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "left",
      "verticalAlign": "top",
      "baseline": 118
    },
    {
      "id": "NXvpVUYEEgEvx6SRrCFyw",
      "type": "text",
      "x": 1030.4444444444446,
      "y": 459.4444444444443,
      "width": 375,
      "height": 100,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 1005543483,
      "version": 92,
      "versionNonce": 983846997,
      "isDeleted": false,
      "boundElementIds": null,
      "text": "should_validate:\nif exe_result and any(validate_tool):\n    return True\nreturn False",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "left",
      "verticalAlign": "top",
      "baseline": 93
    },
    {
      "id": "P8aWkdOQS6MYvKYJh4WHt",
      "type": "rectangle",
      "x": 557.8012152777776,
      "y": 605.2890625,
      "width": 139.83072916666663,
      "height": 71.74913194444457,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 858295355,
      "version": 97,
      "versionNonce": 1454672443,
      "isDeleted": false,
      "boundElementIds": null
    },
    {
      "id": "xKE97iJssyvQHcCFwCGHO",
      "type": "text",
      "x": 560.7165798611109,
      "y": 628.6636284722223,
      "width": 134,
      "height": 25,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "sharp",
      "seed": 616488341,
      "version": 16,
      "versionNonce": 117837301,
      "isDeleted": false,
      "boundElementIds": [
        "ORq8b0Mc3avhMthz4PewN",
        "4Z4QHvSfK5U5v9qtUjRgG"
      ],
      "text": "validate_tool",
      "fontSize": 20,
      "fontFamily": 1,
      "textAlign": "center",
      "verticalAlign": "middle",
      "baseline": 18
    },
    {
      "id": "ORq8b0Mc3avhMthz4PewN",
      "type": "arrow",
      "x": 552.3802083333331,
      "y": 657.2899305555557,
      "width": 141.91840277777783,
      "height": 10.846354166666742,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "round",
      "seed": 145033019,
      "version": 179,
      "versionNonce": 1664319573,
      "isDeleted": false,
      "boundElementIds": null,
      "points": [
        [
          0,
          0
        ],
        [
          -141.91840277777783,
          -10.846354166666742
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": {
        "elementId": "xKE97iJssyvQHcCFwCGHO",
        "focus": -1.2419569249559166,
        "gap": 8.336371527777715
      },
      "endBinding": {
        "elementId": "54651f1MEz5r8wjC6IxLR",
        "focus": 0.008568877814143021,
        "gap": 2.866319444444173
      },
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "4Z4QHvSfK5U5v9qtUjRgG",
      "type": "arrow",
      "x": 413.86892361111086,
      "y": 627.2161458333335,
      "width": 146.63628472222229,
      "height": 0.859375,
      "angle": 0,
      "strokeColor": "#000000",
      "backgroundColor": "transparent",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "strokeSharpness": "round",
      "seed": 672476949,
      "version": 73,
      "versionNonce": 2077906747,
      "isDeleted": false,
      "boundElementIds": null,
      "points": [
        [
          0,
          0
        ],
        [
          146.63628472222229,
          -0.859375
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": {
        "elementId": "54651f1MEz5r8wjC6IxLR",
        "focus": -0.32928598653054303,
        "gap": 6.273437499999716
      },
      "endBinding": {
        "elementId": "xKE97iJssyvQHcCFwCGHO",
        "focus": 1.1790240723368073,
        "gap": 2.3068576388888005
      },
      "startArrowhead": null,
      "endArrowhead": "arrow"
    }
  ],
  "appState": {
    "gridSize": null,
    "viewBackgroundColor": "#ffffff"
  }
}