File size: 4,135 Bytes
66cd906
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
  "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"
  }
}