@agentled/cli 0.1.6 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +136 -0
- package/dist/builtin-tools-catalog.d.ts +37 -0
- package/dist/builtin-tools-catalog.js +96 -0
- package/dist/builtin-tools-catalog.js.map +1 -0
- package/dist/commands/auth.js +30 -0
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/examples.d.ts +15 -0
- package/dist/commands/examples.js +100 -0
- package/dist/commands/examples.js.map +1 -0
- package/dist/commands/scaffold.d.ts +14 -0
- package/dist/commands/scaffold.js +103 -0
- package/dist/commands/scaffold.js.map +1 -0
- package/dist/commands/schema.d.ts +10 -0
- package/dist/commands/schema.js +107 -0
- package/dist/commands/schema.js.map +1 -0
- package/dist/commands/skills.d.ts +9 -0
- package/dist/commands/skills.js +94 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/tools.d.ts +10 -0
- package/dist/commands/tools.js +53 -0
- package/dist/commands/tools.js.map +1 -0
- package/dist/commands/workflows.js +227 -9
- package/dist/commands/workflows.js.map +1 -1
- package/dist/context-schema.d.ts +37 -0
- package/dist/context-schema.js +108 -0
- package/dist/context-schema.js.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/preflight.d.ts +25 -0
- package/dist/utils/preflight.js +293 -0
- package/dist/utils/preflight.js.map +1 -0
- package/dist/utils/skills.d.ts +49 -0
- package/dist/utils/skills.js +214 -0
- package/dist/utils/skills.js.map +1 -0
- package/package.json +4 -1
- package/patterns/v1/00-why-agentic-ops.md +107 -0
- package/patterns/v1/01-trigger-design.md +107 -0
- package/patterns/v1/02-dedup-gates.md +135 -0
- package/patterns/v1/03-credit-efficiency.md +130 -0
- package/patterns/v1/04-loop-patterns.md +147 -0
- package/patterns/v1/05-child-workflow-contracts.md +151 -0
- package/patterns/v1/06-conditional-routing.md +151 -0
- package/patterns/v1/07-error-handling.md +157 -0
- package/patterns/v1/08-composed-email-approval.md +130 -0
- package/patterns/v1/09-reports-and-knowledge-storage.md +166 -0
- package/scaffolds/README.md +62 -0
- package/scaffolds/ai-with-tools.json +49 -0
- package/scaffolds/email-polling-dedup.json +71 -0
- package/scaffolds/extract-threshold-alert.json +131 -0
- package/scaffolds/lead-scoring-kg.json +84 -0
- package/scaffolds/list-match-email.json +131 -0
- package/scaffolds/minimal.json +20 -0
- package/skills/agentled/SKILL.md +573 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "AI Extract + Threshold Check + Conditional Alert + KG Sync",
|
|
3
|
+
"goal": "Extract structured metrics from free-form text, compare to configured thresholds, update an external system, alert on breaches only, and persist to the KG for trending.",
|
|
4
|
+
"description": "Pattern 06 (conditional routing) + pattern 09 (KG history). Generic shape for any 'extract-then-monitor' flow: meeting transcripts → KPIs, support tickets → SLA metrics, incident reports → severity. Configure the target CRM/system, alert channel, and thresholds in input pages.",
|
|
5
|
+
"status": "draft",
|
|
6
|
+
"context": {
|
|
7
|
+
"executionInputConfig": {
|
|
8
|
+
"title": "Process Input",
|
|
9
|
+
"description": "Paste the free-form text to extract metrics from.",
|
|
10
|
+
"runCTALabel": "Process",
|
|
11
|
+
"fields": [
|
|
12
|
+
{ "name": "source_text", "label": "Source text", "type": "textarea", "required": true },
|
|
13
|
+
{ "name": "entity_id", "label": "External entity id (e.g. CRM record id)", "type": "text", "required": true },
|
|
14
|
+
{ "name": "language", "label": "Language", "type": "select", "options": ["en", "fr", "es", "de"], "required": true }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"inputPages": [
|
|
18
|
+
{
|
|
19
|
+
"title": "Alert Settings",
|
|
20
|
+
"pathname": "alert-settings",
|
|
21
|
+
"configuration": {
|
|
22
|
+
"contextKey": "alertSettings",
|
|
23
|
+
"shortDescriptionFields": ["slackChannel"],
|
|
24
|
+
"fields": [
|
|
25
|
+
{ "name": "slackWebhookUrl", "label": "Slack incoming webhook URL", "type": "text", "required": true },
|
|
26
|
+
{ "name": "slackChannel", "label": "Slack channel", "type": "text", "required": true }
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"title": "Thresholds",
|
|
32
|
+
"pathname": "thresholds",
|
|
33
|
+
"configuration": {
|
|
34
|
+
"contextKey": "thresholds",
|
|
35
|
+
"fields": [
|
|
36
|
+
{ "name": "metric_a_min", "label": "Metric A floor", "type": "Numeric" },
|
|
37
|
+
{ "name": "metric_b_max", "label": "Metric B ceiling", "type": "Numeric" },
|
|
38
|
+
{ "name": "metric_c_min", "label": "Metric C minimum", "type": "Numeric" }
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"steps": [
|
|
45
|
+
{
|
|
46
|
+
"id": "start",
|
|
47
|
+
"type": "trigger",
|
|
48
|
+
"name": "Manual Start",
|
|
49
|
+
"pipelineStepStartConditions": { "trigger": { "type": "manual" } },
|
|
50
|
+
"next": { "stepId": "extract-metrics" }
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "extract-metrics",
|
|
54
|
+
"type": "aiAction",
|
|
55
|
+
"name": "Extract Metrics (multilingual)",
|
|
56
|
+
"pipelineStepPrompt": {
|
|
57
|
+
"template": "Extract the three target metrics (metric_a, metric_b, metric_c) from this {{input.language}} text. Return null for any metric you cannot confidently extract. Normalize units consistently.\n\nText:\n{{input.source_text}}",
|
|
58
|
+
"responseStructure": {
|
|
59
|
+
"metric_a": "number | null",
|
|
60
|
+
"metric_b": "number | null",
|
|
61
|
+
"metric_c": "number | null",
|
|
62
|
+
"notes": "string"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"creditCost": 10,
|
|
66
|
+
"next": { "stepId": "check-thresholds" }
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "check-thresholds",
|
|
70
|
+
"type": "code",
|
|
71
|
+
"name": "Compare to Thresholds",
|
|
72
|
+
"codeConfig": {
|
|
73
|
+
"language": "javascript",
|
|
74
|
+
"code": "const k = steps['extract-metrics']; const t = context.thresholds || {}; const breaches = []; if (k.metric_a != null && t.metric_a_min != null && k.metric_a < t.metric_a_min) breaches.push({ metric: 'metric_a', value: k.metric_a, threshold: t.metric_a_min }); if (k.metric_b != null && t.metric_b_max != null && k.metric_b > t.metric_b_max) breaches.push({ metric: 'metric_b', value: k.metric_b, threshold: t.metric_b_max }); if (k.metric_c != null && t.metric_c_min != null && k.metric_c < t.metric_c_min) breaches.push({ metric: 'metric_c', value: k.metric_c, threshold: t.metric_c_min }); return { breaches, breach_count: breaches.length, summary: breaches.map(b => `${b.metric}=${b.value} (limit ${b.threshold})`).join(', ') };"
|
|
75
|
+
},
|
|
76
|
+
"next": { "stepId": "update-external-system" }
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "update-external-system",
|
|
80
|
+
"type": "appAction",
|
|
81
|
+
"name": "Update External System",
|
|
82
|
+
"app": { "id": "http-request", "actionId": "request", "source": "native" },
|
|
83
|
+
"stepInputData": {
|
|
84
|
+
"url": "https://example.com/api/entities/{{input.entity_id}}",
|
|
85
|
+
"method": "PATCH",
|
|
86
|
+
"body": "{\"metrics\": {{steps.extract-metrics}}}"
|
|
87
|
+
},
|
|
88
|
+
"next": { "stepId": "alert-on-breach" }
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "alert-on-breach",
|
|
92
|
+
"type": "appAction",
|
|
93
|
+
"name": "Slack Alert (breaches only)",
|
|
94
|
+
"app": { "id": "webhook", "actionId": "trigger", "source": "native" },
|
|
95
|
+
"entryConditions": {
|
|
96
|
+
"onCriteriaFail": "skip",
|
|
97
|
+
"conditionText": "Only alert when at least one threshold is breached.",
|
|
98
|
+
"criteria": [
|
|
99
|
+
{ "variable": "{{steps.check-thresholds.breach_count}}", "operator": ">", "value": 0 },
|
|
100
|
+
{ "variable": "{{context.alertSettings.slackWebhookUrl}}", "operator": "isNotNull" }
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"stepInputData": {
|
|
104
|
+
"webhookUrl": "{{context.alertSettings.slackWebhookUrl}}",
|
|
105
|
+
"inputsJson": "{\"text\":\"Threshold breach for {{input.entity_id}}: {{steps.check-thresholds.summary}}\",\"channel\":\"{{context.alertSettings.slackChannel}}\"}"
|
|
106
|
+
},
|
|
107
|
+
"next": { "stepId": "store-history" }
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "store-history",
|
|
111
|
+
"type": "knowledgeSync",
|
|
112
|
+
"name": "Store Metric History",
|
|
113
|
+
"knowledgeSync": {
|
|
114
|
+
"source": { "stepId": "extract-metrics" },
|
|
115
|
+
"listKey": "metric_history",
|
|
116
|
+
"fieldMapping": {
|
|
117
|
+
"metric_a": "metric_a",
|
|
118
|
+
"metric_b": "metric_b",
|
|
119
|
+
"metric_c": "metric_c",
|
|
120
|
+
"notes": "notes"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"next": { "stepId": "done" }
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "done",
|
|
127
|
+
"type": "milestone",
|
|
128
|
+
"name": "Done"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Lead Scoring + KG Storage",
|
|
3
|
+
"goal": "Score a batch of leads against ICP criteria and persist results to the Knowledge Graph.",
|
|
4
|
+
"description": "Pattern 09 (KG-storage). Replace the scoring prompt, ICP criteria, and list keys for your workspace.",
|
|
5
|
+
"status": "draft",
|
|
6
|
+
"context": {
|
|
7
|
+
"executionInputConfig": {
|
|
8
|
+
"title": "Score Leads",
|
|
9
|
+
"description": "Source list of leads to score.",
|
|
10
|
+
"runCTALabel": "Run",
|
|
11
|
+
"fields": [
|
|
12
|
+
{ "name": "source_list_key", "label": "Source list key", "type": "text", "required": true },
|
|
13
|
+
{ "name": "target_list_key", "label": "Target list (scored results)", "type": "text", "required": true }
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"steps": [
|
|
18
|
+
{
|
|
19
|
+
"id": "start",
|
|
20
|
+
"type": "trigger",
|
|
21
|
+
"name": "Manual Start",
|
|
22
|
+
"pipelineStepStartConditions": { "trigger": { "type": "manual" } },
|
|
23
|
+
"next": { "stepId": "read-leads" }
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "read-leads",
|
|
27
|
+
"type": "appAction",
|
|
28
|
+
"name": "Read Leads",
|
|
29
|
+
"app": { "id": "kg", "actionId": "read-list", "source": "native" },
|
|
30
|
+
"stepInputData": {
|
|
31
|
+
"listKey": "{{input.source_list_key}}",
|
|
32
|
+
"limit": "500"
|
|
33
|
+
},
|
|
34
|
+
"next": { "stepId": "score" }
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "score",
|
|
38
|
+
"type": "aiAction",
|
|
39
|
+
"name": "Score Lead",
|
|
40
|
+
"loopConfig": {
|
|
41
|
+
"source": "executionContent",
|
|
42
|
+
"config": { "stepId": "read-leads", "field": "listEntries" },
|
|
43
|
+
"ItemAlias": "lead"
|
|
44
|
+
},
|
|
45
|
+
"pipelineStepPrompt": {
|
|
46
|
+
"template": "Score this lead against the ICP. Return a structured result.\n\nLead: {{lead}}\n\nReturn: fit_score (0-100), decision (one of: qualify, nurture, reject), reason (short).",
|
|
47
|
+
"responseStructure": {
|
|
48
|
+
"fit_score": "number (0-100)",
|
|
49
|
+
"decision": "string (qualify | nurture | reject)",
|
|
50
|
+
"reason": "string"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"creditCost": 8,
|
|
54
|
+
"next": { "stepId": "sync-scores" }
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "sync-scores",
|
|
58
|
+
"type": "knowledgeSync",
|
|
59
|
+
"name": "Save Scores to KG",
|
|
60
|
+
"entryConditions": {
|
|
61
|
+
"onCriteriaFail": "wait",
|
|
62
|
+
"conditionText": "Wait for all scoring calls to complete.",
|
|
63
|
+
"criteria": [
|
|
64
|
+
{ "type": "loop_completion", "stepId": "score", "operator": "==", "value": true }
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"knowledgeSync": {
|
|
68
|
+
"source": { "stepId": "score", "resultsPath": "items" },
|
|
69
|
+
"listKey": "{{input.target_list_key}}",
|
|
70
|
+
"fieldMapping": {
|
|
71
|
+
"fit_score": "fit_score",
|
|
72
|
+
"decision": "decision",
|
|
73
|
+
"reason": "reason"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"next": { "stepId": "done" }
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "done",
|
|
80
|
+
"type": "milestone",
|
|
81
|
+
"name": "Done"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "List Match + Outreach Email",
|
|
3
|
+
"goal": "Score a request against a KG list of candidates, pick the top match, send a personalized outreach email on approval, and store the outcome.",
|
|
4
|
+
"description": "Pattern 08 (composed email with approval) + pattern 09 (KG outcome storage). Works for any domain where you match one input against a KG list (mentors, suppliers, partners, investors, properties). Requires an outreachProfile input page and a connected email account (Gmail or Outlook).",
|
|
5
|
+
"status": "draft",
|
|
6
|
+
"context": {
|
|
7
|
+
"executionInputConfig": {
|
|
8
|
+
"title": "Match + Email",
|
|
9
|
+
"description": "Request to match against a KG list.",
|
|
10
|
+
"runCTALabel": "Find match",
|
|
11
|
+
"fields": [
|
|
12
|
+
{ "name": "requester_name", "label": "Requester name", "type": "text", "required": true },
|
|
13
|
+
{ "name": "requester_email", "label": "Requester email", "type": "text", "required": true },
|
|
14
|
+
{ "name": "request", "label": "Request / need", "type": "textarea", "required": true },
|
|
15
|
+
{ "name": "candidate_list_key", "label": "KG list key (candidate pool)", "type": "text", "required": true }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"inputPages": [
|
|
19
|
+
{
|
|
20
|
+
"title": "Outreach Profile",
|
|
21
|
+
"pathname": "outreach-profile",
|
|
22
|
+
"configuration": {
|
|
23
|
+
"contextKey": "outreachProfile",
|
|
24
|
+
"shortDescriptionFields": ["name", "fromEmail"],
|
|
25
|
+
"fields": [
|
|
26
|
+
{ "name": "name", "label": "Sender name", "type": "text", "required": true },
|
|
27
|
+
{ "name": "fromEmailLabel", "label": "From name", "type": "text", "required": true },
|
|
28
|
+
{ "name": "fromEmail", "label": "From email", "type": "connected_emails_selector_multiple", "required": true },
|
|
29
|
+
{ "name": "replyToEmail", "label": "Reply-to (optional)", "type": "text" }
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"steps": [
|
|
36
|
+
{
|
|
37
|
+
"id": "start",
|
|
38
|
+
"type": "trigger",
|
|
39
|
+
"name": "Manual Start",
|
|
40
|
+
"pipelineStepStartConditions": { "trigger": { "type": "manual" } },
|
|
41
|
+
"next": { "stepId": "read-candidates" }
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "read-candidates",
|
|
45
|
+
"type": "appAction",
|
|
46
|
+
"name": "Read Candidate Pool",
|
|
47
|
+
"app": { "id": "kg", "actionId": "read-list", "source": "native" },
|
|
48
|
+
"stepInputData": {
|
|
49
|
+
"listKey": "{{input.candidate_list_key}}",
|
|
50
|
+
"limit": "500"
|
|
51
|
+
},
|
|
52
|
+
"next": { "stepId": "rank-top-3" }
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "rank-top-3",
|
|
56
|
+
"type": "aiAction",
|
|
57
|
+
"name": "Rank Top 3 Candidates",
|
|
58
|
+
"pipelineStepPrompt": {
|
|
59
|
+
"template": "Score each candidate's fit for this request on expertise, relevance, and past outcomes. Return the top 3 with the best as top_match.\n\nRequest: {{input.request}}\n\nCandidate pool: {{steps.read-candidates.listEntries}}",
|
|
60
|
+
"responseStructure": {
|
|
61
|
+
"matches": "array of { candidate_id, candidate_name, candidate_email, fit_score (0-100), reasoning }",
|
|
62
|
+
"top_match": "object matching the best candidate"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"creditCost": 12,
|
|
66
|
+
"next": { "stepId": "send-outreach-email" }
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "send-outreach-email",
|
|
70
|
+
"type": "aiAction",
|
|
71
|
+
"name": "Send Outreach Email",
|
|
72
|
+
"pipelineStepPrompt": {
|
|
73
|
+
"type": "email",
|
|
74
|
+
"template": "Draft a personalized outreach email to {{steps.rank-top-3.top_match.candidate_name}}, introducing {{input.requester_name}} and their request: {{input.request}}.\n\nKeep it warm, concise, and professional.",
|
|
75
|
+
"responseStructure": {
|
|
76
|
+
"email": {
|
|
77
|
+
"from": "{{context.outreachProfile.fromEmail}}",
|
|
78
|
+
"to": "{{steps.rank-top-3.top_match.candidate_email}}",
|
|
79
|
+
"subject": "",
|
|
80
|
+
"body": "",
|
|
81
|
+
"bodyType": "html"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"renderer": {
|
|
86
|
+
"type": "Email",
|
|
87
|
+
"config": { "fromContextKey": "outreachProfile" }
|
|
88
|
+
},
|
|
89
|
+
"integrations": [
|
|
90
|
+
{
|
|
91
|
+
"type": "oneOf",
|
|
92
|
+
"label": "Email",
|
|
93
|
+
"connectorType": "email",
|
|
94
|
+
"options": [
|
|
95
|
+
{ "name": "Gmail", "url": "https://gmail.com", "isUserAccountConnectionRequired": true },
|
|
96
|
+
{ "name": "Outlook", "url": "https://outlook.com", "isUserAccountConnectionRequired": true }
|
|
97
|
+
],
|
|
98
|
+
"selectionHint": "preferConnected"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"onApproval": {
|
|
102
|
+
"executedText": "Email sent by {{name}} at {{date}}",
|
|
103
|
+
"failedText": "Email failed to send.",
|
|
104
|
+
"action": "schedule-email"
|
|
105
|
+
},
|
|
106
|
+
"creditCost": 5,
|
|
107
|
+
"next": { "stepId": "store-outcome", "conditions": { "approvalRequired": true } }
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "store-outcome",
|
|
111
|
+
"type": "knowledgeSync",
|
|
112
|
+
"name": "Store Match Outcome",
|
|
113
|
+
"knowledgeSync": {
|
|
114
|
+
"source": { "stepId": "rank-top-3", "resultsPath": "matches" },
|
|
115
|
+
"listKey": "match_outcomes",
|
|
116
|
+
"fieldMapping": {
|
|
117
|
+
"candidate_id": "candidate_id",
|
|
118
|
+
"candidate_name": "candidate_name",
|
|
119
|
+
"fit_score": "fit_score",
|
|
120
|
+
"reasoning": "reasoning"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"next": { "stepId": "done" }
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "done",
|
|
127
|
+
"type": "milestone",
|
|
128
|
+
"name": "Done"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Minimal Workflow",
|
|
3
|
+
"goal": "Starting skeleton — replace steps with your pipeline.",
|
|
4
|
+
"description": "Smallest valid pipeline: trigger -> milestone.",
|
|
5
|
+
"status": "draft",
|
|
6
|
+
"steps": [
|
|
7
|
+
{
|
|
8
|
+
"id": "start",
|
|
9
|
+
"type": "trigger",
|
|
10
|
+
"name": "Manual Start",
|
|
11
|
+
"pipelineStepStartConditions": { "trigger": { "type": "manual" } },
|
|
12
|
+
"next": { "stepId": "done" }
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "done",
|
|
16
|
+
"type": "milestone",
|
|
17
|
+
"name": "Done"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|