-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkflow.json
More file actions
79 lines (79 loc) · 2.4 KB
/
Copy pathworkflow.json
File metadata and controls
79 lines (79 loc) · 2.4 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
{
"name": "task-triage",
"description": "Fetch new tickets, loop through each for agent-driven priority triage via reasoning.",
"category": "operations",
"features": ["http", "loop", "reasoning"],
"input_schema": {
"type": "object",
"required": ["tickets_url", "update_url"],
"properties": {
"tickets_url": {
"type": "string",
"description": "API URL to fetch new tickets (returns JSON array)"
},
"update_url": {
"type": "string",
"description": "API URL to POST ticket updates to (ticket_id appended as path)"
}
}
},
"definition": {
"timeout": "30m",
"on_timeout": "suspend",
"steps": [
{
"id": "fetch-tickets",
"type": "action",
"action": "http.get",
"params": {
"url": "${{inputs.tickets_url}}"
},
"timeout": "30s",
"retry": {
"max": 2,
"backoff": "exponential",
"delay": "1s"
}
},
{
"id": "triage-loop",
"type": "loop",
"depends_on": ["fetch-tickets"],
"config": {
"mode": "for_each",
"over": "steps['fetch-tickets'].body",
"max_iter": 50,
"body": [
{
"id": "prioritize",
"type": "reasoning",
"config": {
"prompt_context": "What priority should this task have and who should handle it? Consider severity, impact, and available team members.",
"options": [
{ "id": "p0-critical", "description": "Critical — requires immediate attention from senior engineer" },
{ "id": "p1-high", "description": "High — should be addressed within hours" },
{ "id": "p2-medium", "description": "Medium — address within the current sprint" },
{ "id": "p3-low", "description": "Low — backlog, address when capacity allows" }
],
"data_inject": {
"ticket": "loop.item"
},
"timeout": "5m",
"fallback": "p2-medium"
}
}
]
}
},
{
"id": "log-complete",
"type": "action",
"action": "workflow.log",
"depends_on": ["triage-loop"],
"params": {
"message": "Triage complete for all fetched tickets."
}
}
]
}
}