{ "schema_version": "2", "name": "Clef Decision Workflow", "runtime": { "default": "client" }, "references": [ { "id": "ref_state", "label": "State", "role": "reference", "asset_type": "text", "inputs": [{"id": "in", "label": "Text", "type": "text"}], "outputs": [{"id": "out", "label": "Text", "type": "text"}], "width": 300, "x": 60, "y": 60, "data": { "out": "Checkout has been failing for every customer for the last hour." } }, { "id": "ref_questions", "label": "Questions (JSON schema)", "role": "reference", "asset_type": "text", "inputs": [{"id": "in", "label": "Text", "type": "text"}], "outputs": [{"id": "out", "label": "Text", "type": "text"}], "width": 300, "x": 60, "y": 340, "data": { "out": "{\n \"urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Is this support request urgent?\"\n },\n \"team\": {\n \"type\": \"choice\",\n \"instructions\": \"Which team should handle this request?\",\n \"criteria\": {\n \"billing\": \"Payments, invoices, refunds\",\n \"technical\": \"Bugs, errors, outages\",\n \"sales\": \"Pricing, plans, new purchases\"\n }\n },\n \"severity\": {\n \"type\": \"score\",\n \"instructions\": \"How severe is the customer impact?\",\n \"criteria\": [\"No impact\", \"Minor\", \"Major\", \"Critical\"]\n }\n}" } }, { "id": "ref_image", "label": "Image (optional)", "role": "reference", "asset_type": "image", "inputs": [{"id": "in", "label": "Image", "type": "image"}], "outputs": [{"id": "out", "label": "Image", "type": "image"}], "width": 300, "x": 60, "y": 640, "data": {} } ], "operators": [ { "id": "op_decide", "label": "Clef ยท decide", "role": "operator", "kind": "fn", "fn": "decide", "inputs": [ {"id": "in_state", "label": "state", "type": "text", "required": true}, {"id": "in_questions", "label": "questions", "type": "text", "required": true}, {"id": "in_image", "label": "image", "type": "image"} ], "outputs": [ {"id": "out_0", "label": "report", "type": "html", "output_index": 0}, {"id": "out_1", "label": "response", "type": "json", "output_index": 1} ], "width": 260, "x": 480, "y": 300, "data": {} } ], "subjects": [ { "id": "sub_report", "label": "Decision Report", "role": "subject", "asset_type": "html", "inputs": [{"id": "in", "label": "HTML", "type": "html"}], "outputs": [{"id": "out", "label": "HTML", "type": "html"}], "width": 380, "x": 860, "y": 100, "data": {} }, { "id": "sub_json", "label": "SystemOne Response", "role": "subject", "asset_type": "json", "inputs": [{"id": "in", "label": "JSON", "type": "json"}], "outputs": [{"id": "out", "label": "JSON", "type": "json"}], "width": 380, "x": 860, "y": 480, "data": {} } ], "edges": [ { "id": "e1", "from_node_id": "ref_state", "from_port_id": "out", "to_node_id": "op_decide", "to_port_id": "in_state", "type": "text" }, { "id": "e2", "from_node_id": "ref_questions", "from_port_id": "out", "to_node_id": "op_decide", "to_port_id": "in_questions", "type": "text" }, { "id": "e3", "from_node_id": "ref_image", "from_port_id": "out", "to_node_id": "op_decide", "to_port_id": "in_image", "type": "image" }, { "id": "e4", "from_node_id": "op_decide", "from_port_id": "out_0", "to_node_id": "sub_report", "to_port_id": "in", "type": "html" }, { "id": "e5", "from_node_id": "op_decide", "from_port_id": "out_1", "to_node_id": "sub_json", "to_port_id": "in", "type": "json" } ], "view": { "default": "canvas" } }