-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkflow.json
More file actions
101 lines (101 loc) · 2.72 KB
/
Copy pathworkflow.json
File metadata and controls
101 lines (101 loc) · 2.72 KB
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
{
"name": "multi-source-research",
"description": "Fetch data from three sources in parallel, let an agent pick the best one, then log the selection.",
"category": "research",
"features": ["parallel", "http", "reasoning", "workflow.log"],
"input_schema": {
"type": "object",
"required": ["source_a_url", "source_b_url", "source_c_url"],
"properties": {
"source_a_url": {
"type": "string",
"description": "URL for source A"
},
"source_b_url": {
"type": "string",
"description": "URL for source B"
},
"source_c_url": {
"type": "string",
"description": "URL for source C"
}
}
},
"definition": {
"timeout": "5m",
"on_timeout": "fail",
"steps": [
{
"id": "fetch-a",
"type": "action",
"action": "http.get",
"params": {
"url": "${{inputs.source_a_url}}"
},
"timeout": "30s",
"retry": {
"max": 2,
"backoff": "linear",
"delay": "1s"
}
},
{
"id": "fetch-b",
"type": "action",
"action": "http.get",
"params": {
"url": "${{inputs.source_b_url}}"
},
"timeout": "30s",
"retry": {
"max": 2,
"backoff": "linear",
"delay": "1s"
}
},
{
"id": "fetch-c",
"type": "action",
"action": "http.get",
"params": {
"url": "${{inputs.source_c_url}}"
},
"timeout": "30s",
"retry": {
"max": 2,
"backoff": "linear",
"delay": "1s"
}
},
{
"id": "pick-best",
"type": "reasoning",
"depends_on": ["fetch-a", "fetch-b", "fetch-c"],
"config": {
"prompt_context": "Three data sources have been fetched. Review the responses and select which source has the most relevant, accurate, and complete data for the research task.",
"options": [
{ "id": "source_a", "description": "Source A has the best data" },
{ "id": "source_b", "description": "Source B has the best data" },
{ "id": "source_c", "description": "Source C has the best data" }
],
"data_inject": {
"source_a_data": "steps['fetch-a']",
"source_b_data": "steps['fetch-b']",
"source_c_data": "steps['fetch-c']"
},
"timeout": "1h",
"fallback": "source_a"
}
},
{
"id": "log-selection",
"type": "action",
"action": "workflow.log",
"depends_on": ["pick-best"],
"params": {
"message": "Best source selected by agent review"
}
}
]
}
}