@getfrontline/cli 1.0.4 → 1.0.5

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.
Files changed (104) hide show
  1. package/README.md +168 -2
  2. package/dist/commands/agents/builder.d.ts +10 -0
  3. package/dist/commands/agents/builder.d.ts.map +1 -0
  4. package/dist/commands/agents/builder.js +243 -0
  5. package/dist/commands/agents/builder.js.map +1 -0
  6. package/dist/commands/agents/flows.d.ts.map +1 -1
  7. package/dist/commands/agents/flows.js +253 -25
  8. package/dist/commands/agents/flows.js.map +1 -1
  9. package/dist/commands/agents/intents.d.ts +3 -0
  10. package/dist/commands/agents/intents.d.ts.map +1 -0
  11. package/dist/commands/agents/intents.js +137 -0
  12. package/dist/commands/agents/intents.js.map +1 -0
  13. package/dist/commands/agents/use.d.ts +3 -0
  14. package/dist/commands/agents/use.d.ts.map +1 -0
  15. package/dist/commands/agents/use.js +33 -0
  16. package/dist/commands/agents/use.js.map +1 -0
  17. package/dist/commands/agents/variables.d.ts +3 -0
  18. package/dist/commands/agents/variables.d.ts.map +1 -0
  19. package/dist/commands/agents/variables.js +111 -0
  20. package/dist/commands/agents/variables.js.map +1 -0
  21. package/dist/commands/aiModels/index.d.ts +3 -0
  22. package/dist/commands/aiModels/index.d.ts.map +1 -0
  23. package/dist/commands/aiModels/index.js +60 -0
  24. package/dist/commands/aiModels/index.js.map +1 -0
  25. package/dist/commands/incomingWebhooks/index.d.ts +3 -0
  26. package/dist/commands/incomingWebhooks/index.d.ts.map +1 -0
  27. package/dist/commands/incomingWebhooks/index.js +28 -0
  28. package/dist/commands/incomingWebhooks/index.js.map +1 -0
  29. package/dist/commands/tools/index.d.ts +3 -0
  30. package/dist/commands/tools/index.d.ts.map +1 -0
  31. package/dist/commands/tools/index.js +113 -0
  32. package/dist/commands/tools/index.js.map +1 -0
  33. package/dist/commands/util/uuid.d.ts +3 -0
  34. package/dist/commands/util/uuid.d.ts.map +1 -0
  35. package/dist/commands/util/uuid.js +15 -0
  36. package/dist/commands/util/uuid.js.map +1 -0
  37. package/dist/commands/workflows/analytics.d.ts.map +1 -1
  38. package/dist/commands/workflows/analytics.js +9 -3
  39. package/dist/commands/workflows/analytics.js.map +1 -1
  40. package/dist/commands/workflows/common.d.ts +39 -0
  41. package/dist/commands/workflows/common.d.ts.map +1 -0
  42. package/dist/commands/workflows/common.js +45 -0
  43. package/dist/commands/workflows/common.js.map +1 -0
  44. package/dist/commands/workflows/create.d.ts +3 -0
  45. package/dist/commands/workflows/create.d.ts.map +1 -0
  46. package/dist/commands/workflows/create.js +41 -0
  47. package/dist/commands/workflows/create.js.map +1 -0
  48. package/dist/commands/workflows/delete.d.ts +3 -0
  49. package/dist/commands/workflows/delete.d.ts.map +1 -0
  50. package/dist/commands/workflows/delete.js +20 -0
  51. package/dist/commands/workflows/delete.js.map +1 -0
  52. package/dist/commands/workflows/describe.d.ts +3 -0
  53. package/dist/commands/workflows/describe.d.ts.map +1 -0
  54. package/dist/commands/workflows/describe.js +40 -0
  55. package/dist/commands/workflows/describe.js.map +1 -0
  56. package/dist/commands/workflows/edges.d.ts +3 -0
  57. package/dist/commands/workflows/edges.d.ts.map +1 -0
  58. package/dist/commands/workflows/edges.js +50 -0
  59. package/dist/commands/workflows/edges.js.map +1 -0
  60. package/dist/commands/workflows/graph.d.ts +3 -0
  61. package/dist/commands/workflows/graph.d.ts.map +1 -0
  62. package/dist/commands/workflows/graph.js +47 -0
  63. package/dist/commands/workflows/graph.js.map +1 -0
  64. package/dist/commands/workflows/nodes.d.ts +3 -0
  65. package/dist/commands/workflows/nodes.d.ts.map +1 -0
  66. package/dist/commands/workflows/nodes.js +68 -0
  67. package/dist/commands/workflows/nodes.js.map +1 -0
  68. package/dist/commands/workflows/update.d.ts +3 -0
  69. package/dist/commands/workflows/update.d.ts.map +1 -0
  70. package/dist/commands/workflows/update.js +42 -0
  71. package/dist/commands/workflows/update.js.map +1 -0
  72. package/dist/commands/workflows/use.d.ts +3 -0
  73. package/dist/commands/workflows/use.d.ts.map +1 -0
  74. package/dist/commands/workflows/use.js +34 -0
  75. package/dist/commands/workflows/use.js.map +1 -0
  76. package/dist/commands/workflows/variables.d.ts +3 -0
  77. package/dist/commands/workflows/variables.d.ts.map +1 -0
  78. package/dist/commands/workflows/variables.js +105 -0
  79. package/dist/commands/workflows/variables.js.map +1 -0
  80. package/dist/index.js +50 -1
  81. package/dist/index.js.map +1 -1
  82. package/dist/lib/config.d.ts +9 -0
  83. package/dist/lib/config.d.ts.map +1 -1
  84. package/dist/lib/config.js +54 -0
  85. package/dist/lib/config.js.map +1 -1
  86. package/dist/lib/httpClient.d.ts +2 -1
  87. package/dist/lib/httpClient.d.ts.map +1 -1
  88. package/dist/lib/httpClient.js +5 -2
  89. package/dist/lib/httpClient.js.map +1 -1
  90. package/dist/max.js +7 -1
  91. package/dist/max.js.map +1 -1
  92. package/dist/scripts/postinstall.d.ts.map +1 -1
  93. package/dist/scripts/postinstall.js +8 -0
  94. package/dist/scripts/postinstall.js.map +1 -1
  95. package/dist/skills/agent-builder/SKILL.md +88 -0
  96. package/dist/skills/ai-models/SKILL.md +43 -0
  97. package/dist/skills/flow-builder/SKILL.md +124 -0
  98. package/dist/skills/frontline-agents/SKILL.md +152 -3
  99. package/dist/skills/frontline-workflows/SKILL.md +170 -3
  100. package/dist/skills/incoming-webhooks/SKILL.md +36 -0
  101. package/dist/skills/tools/SKILL.md +65 -0
  102. package/dist/skills/variables/SKILL.md +82 -0
  103. package/dist/skills/workflow-builder/SKILL.md +426 -0
  104. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: frontline-agents
3
- description: List, filter, and inspect Frontline AI agents using the Frontline CLI. Use when the user asks about their agents, wants to see agent status, flows, or analytics.
3
+ description: List, filter, inspect, and manage Frontline AI agents and their flows using the Frontline CLI. Use when the user asks about agents, flow CRUD, flow graph nodes/edges, status, or analytics.
4
4
  ---
5
5
 
6
6
  ## Prerequisites
@@ -10,6 +10,94 @@ description: List, filter, and inspect Frontline AI agents using the Frontline C
10
10
 
11
11
  ## Commands
12
12
 
13
+ ## Agent Builder
14
+
15
+ Create an agent and store it as the active agent:
16
+
17
+ ```bash
18
+ frontline agents create --name "Support Agent"
19
+ frontline agents describe
20
+ frontline agents update --name "Support Agent v2"
21
+ frontline agents deploy --offline false
22
+ ```
23
+
24
+ Use `--no-use` on `create` if you do not want to change the active agent. Use
25
+ `--agent-id <id>` on scoped commands to override the active agent in scripts.
26
+
27
+ Delete uses the public API soft-delete flow:
28
+
29
+ ```bash
30
+ frontline agents delete
31
+ frontline agents delete --agent-id <agentId>
32
+ ```
33
+
34
+ Manage core agent settings with JSON payloads validated by the API:
35
+
36
+ ```bash
37
+ frontline ai-models list --type TEXT --table
38
+ frontline agents agent-setting get
39
+ frontline agents agent-setting update --data '{"instructions":"Answer concisely.","temperature":0.2,"aiModelId":1}'
40
+ frontline agents agent-setting update --data '{"customToolIds":[123,456],"instructions":"Use the selected tools when needed.","temperature":0.2,"aiModelId":1}'
41
+ ```
42
+
43
+ Create API call tools first with `frontline tools create`; then assign them by
44
+ ID through `customToolIds`.
45
+ Use TEXT AI model IDs from `frontline ai-models list --type TEXT` as
46
+ `aiModelId`. The CLI validates referenced IDs in the same
47
+ `agents agent-setting update` command when the Public API exposes the referenced
48
+ resource, including `aiModelId`, `customToolIds`, and `selectedTables[].id`.
49
+ The backend is still the source of truth for every existence and ownership
50
+ check.
51
+
52
+ Manage theme fields. Image upload is not part of this public CLI surface; pass
53
+ existing image URLs or `null`.
54
+
55
+ ```bash
56
+ frontline agents theme get
57
+ frontline agents theme update --data '{"title":"Support","initialMessage":"Hi! How can I help?","placeholder":"Type your message...","avatar":null,"bubbleImage":null,"bubbleColor":"#111827","userMessageColor":"#2563eb","agentMessageColor":"#f3f4f6","bubbleAlignment":"RIGHT","progressIndicator":"DYNAMIC","verticalPositionInPixels":24}'
58
+ ```
59
+
60
+ Manage channel settings:
61
+
62
+ ```bash
63
+ frontline agents settings get
64
+ frontline agents settings get livechat
65
+ frontline agents settings update whatsapp --data '{"splitMessages":true,"splitCharacterLimit":500,"conversationClose":"NEVER","closeAfter":null,"timeUnit":null,"sendCloseMessage":false,"closeMessageType":"STATIC","closeMessage":null,"closeInstruction":null}'
66
+ frontline agents settings list-channels --table
67
+ ```
68
+
69
+ Mutating commands require a USER API key.
70
+
71
+ ## Variables And Intents
72
+
73
+ Agent-scoped variables and intents use the active agent by default. Override with
74
+ `--agent-id <id>` in scripts.
75
+
76
+ ```bash
77
+ frontline agents variables list --table
78
+ frontline agents variables all
79
+ frontline agents variables create --name customer_name --description "Customer name"
80
+ frontline agents variables describe 123
81
+ frontline agents variables update 123 --name customer_name --pattern "^[A-Za-z ]+$"
82
+ frontline agents variables delete 123
83
+ frontline agents variables check-name customer_name
84
+
85
+ frontline agents intents list --table
86
+ frontline agents intents all
87
+ frontline agents intents create --name cancellation --phrases '["cancel order","stop subscription"]'
88
+ frontline agents intents describe 10
89
+ frontline agents intents update 10 --name cancellation --phrases '[{"id":1,"phrase":"cancel order"},{"phrase":"stop order"}]'
90
+ frontline agents intents delete 10
91
+ frontline agents intents generate-phrases --name cancellation --samples '["cancel order"]' --amount 5
92
+ ```
93
+
94
+ Use variables inside flow text fields as `{VARIABLE_NAME}`. The name must match
95
+ the saved variable name exactly. Flow fields with variable replacement include
96
+ API `url`, `headers[].value`, `parameters[].value`, `body`; Say AI `message` and
97
+ `prompt`; Response AI `instructions`; Tools AI `instructions`; Conditional
98
+ Routing AI `conditions[].expression`; and Dynamic Tables `rowId`, `search`, and
99
+ `rowData` values.
100
+
13
101
  ### List all agents
14
102
 
15
103
  ```bash
@@ -39,12 +127,13 @@ frontline agents list --json
39
127
  ### Get flows for a specific agent
40
128
 
41
129
  ```bash
42
- frontline agents flows <agentId> [--status <status>] [--json] [--debug]
130
+ frontline agents flows [agentId] [--agent-id <id>] [--status <status>] [--json] [--debug]
43
131
  ```
44
132
 
45
133
  | Flag | Description |
46
134
  | ------------------- | -------------------------------------- |
47
- | `<agentId>` | **(required)** The agent ID |
135
+ | `<agentId>` | Optional agent ID |
136
+ | `--agent-id <id>` | Override the active agent |
48
137
  | `--status <status>` | Filter by flow status |
49
138
  | `--json` | Output raw JSON |
50
139
  | `--api-key <key>` | Override API key |
@@ -63,6 +152,66 @@ frontline agents flows abc-123 --status active --json
63
152
 
64
153
  **Output columns:** `id`, `name`, `status`, `runCount`, `createdAt`
65
154
 
155
+ ## Flow CRUD And Context
156
+
157
+ Select an agent once:
158
+
159
+ ```bash
160
+ frontline agents use <agentId>
161
+ ```
162
+
163
+ Then manage its flows:
164
+
165
+ ```bash
166
+ frontline agents flows list
167
+ frontline agents flows create --name "Order Routing" --description "Routes order questions"
168
+ frontline agents flows use <flowId>
169
+ frontline agents flows describe --include-nodes
170
+ frontline agents flows update --name "Order Routing v2" --status ACTIVE
171
+ frontline agents flows delete
172
+ ```
173
+
174
+ `create` selects the new flow by default. Use `--agent-id` and `--flow-id` to
175
+ override saved context in scripts.
176
+
177
+ ## Flow Graphs
178
+
179
+ Inspect before changing:
180
+
181
+ ```bash
182
+ frontline agents flows graph --table
183
+ frontline agents flows nodes list
184
+ ```
185
+
186
+ Create a minimal flow:
187
+
188
+ ```bash
189
+ frontline agents flows nodes create --data '{"nodeId":"start_1","type":"START","position":{"positionX":0,"positionY":0}}'
190
+ frontline agents flows nodes create --data '{"nodeId":"say_1","type":"SAY_AI","position":{"positionX":320,"positionY":0},"data":{"type":"SAY_AI","sayWithAi":false,"message":"Hello!"}}'
191
+ frontline agents flows edges add --source start_1 --source-handle default --target say_1 --target-handle default
192
+ ```
193
+
194
+ Update and delete:
195
+
196
+ ```bash
197
+ frontline agents flows nodes update say_1 --data '{"alias":"Greeting"}'
198
+ frontline agents flows nodes delete say_1
199
+ frontline agents flows edges remove --source start_1 --source-handle default --target say_1 --target-handle default
200
+ ```
201
+
202
+ Supported flow node types:
203
+
204
+ `START`, `TRIGGER_INTENT`, `SAY_AI`, `RESPONSE_AI`, `TOOLS_AI`, `API`,
205
+ `CONDITIONAL_ROUTING`, `DYNAMIC_TABLES`.
206
+
207
+ Validation rules:
208
+
209
+ - Use exactly one initial node: `START` or `TRIGGER_INTENT`.
210
+ - `data.type` must match `type` when `data` is present.
211
+ - Edges must reference existing source and target nodes.
212
+ - No self-edges and no cycles.
213
+ - `CONDITIONAL_ROUTING` and `TOOLS_AI` can use multiple outgoing handles; other nodes use one outgoing edge.
214
+
66
215
  ### Get analytics for a specific agent
67
216
 
68
217
  ```bash
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: frontline-workflows
3
- description: List, filter, and inspect Frontline workflows using the Frontline CLI. Use when the user asks about their workflows, wants to see workflow status, run counts, or analytics.
3
+ description: Create, edit, connect, inspect, and delete Frontline automation workflows using the Frontline CLI. Use when the user asks to build workflows, add nodes or edges, manage workflow context, inspect status, or view analytics.
4
4
  ---
5
5
 
6
6
  ## Prerequisites
@@ -36,15 +36,182 @@ frontline workflows list --status active --json
36
36
 
37
37
  **Output columns:** `id`, `name`, `status`, `triggerType`, `runsCount`, `lastRunDate`
38
38
 
39
+ ### Create and select a workflow
40
+
41
+ ```bash
42
+ frontline workflows create --name "Daily CRM Sync" [--description "..."]
43
+ frontline workflows use <workflowId>
44
+ frontline workflows describe [--include-nodes]
45
+ frontline workflows graph [--table]
46
+ ```
47
+
48
+ `create` saves the created workflow ID as the active workflow for the current
49
+ profile. `use` changes the active workflow. All graph commands accept
50
+ `--workflow-id <id>` to override the active workflow, which is preferred for
51
+ scripts and CI.
52
+
53
+ ### Update or delete a workflow
54
+
55
+ ```bash
56
+ frontline workflows update --status ACTIVE # name is optional; fetched automatically if omitted
57
+ frontline workflows update --name "Daily CRM Sync" --status ACTIVE
58
+ frontline workflows delete
59
+ ```
60
+
61
+ Use a USER API key for mutations. GENERAL keys can still read account-level
62
+ workflow data where the API allows it.
63
+
64
+ ### Manage variables
65
+
66
+ Workflow variable commands use the active workflow by default. Override with
67
+ `--workflow-id <id>` in scripts and CI.
68
+
69
+ ```bash
70
+ frontline workflows variables list --table
71
+ frontline workflows variables all
72
+ frontline workflows variables create --name order_id --description "Order ID"
73
+ frontline workflows variables describe 123
74
+ frontline workflows variables update 123 --name order_id --pattern "^[0-9]+$"
75
+ frontline workflows variables delete 123
76
+ frontline workflows variables check-name order_id
77
+ ```
78
+
79
+ Use variables inside text fields as `{VARIABLE_NAME}`. Automation workflows also
80
+ make each node output available by node ID, so a node with `nodeId` `api_1` can be
81
+ referenced later as `{api_1}`.
82
+
83
+ ## Building Workflow Graphs
84
+
85
+ Always inspect the graph before changing it:
86
+
87
+ ```bash
88
+ frontline workflows graph --table
89
+ frontline workflows nodes list --table
90
+ ```
91
+
92
+ ### nodeId Format
93
+
94
+ All node IDs **must** follow the pattern `node_<uuid>`. Names like `trigger_1` or `api_1` will fail with a validation error.
95
+
96
+ ```
97
+ node_a1b2c3d4-e5f6-7890-abcd-ef1234567890
98
+ ```
99
+
100
+ ### Create nodes
101
+
102
+ Trigger node (CONTACT_CREATED):
103
+
104
+ ```bash
105
+ frontline workflows nodes create --data '{"nodeId":"node_11111111-1111-1111-1111-111111111111","type":"TRIGGER","position":{"positionX":0,"positionY":0},"data":{"type":"TRIGGER","triggerType":"CONTACT_CREATED"}}'
106
+ ```
107
+
108
+ Incoming webhook trigger — first create the webhook resource:
109
+
110
+ ```bash
111
+ frontline incoming-webhooks create --name "My Webhook"
112
+ # Save the returned id
113
+ frontline workflows nodes create --data '{"nodeId":"node_11111111-1111-1111-1111-111111111111","type":"TRIGGER","position":{"positionX":0,"positionY":0},"data":{"type":"TRIGGER","triggerType":"INCOMING_WEBHOOK","triggerByWebhookIds":["<incoming-webhook-id>"]}}'
114
+ ```
115
+
116
+ When this fires, the POST body is available as `{webhook_payload}` in all downstream nodes.
117
+
118
+ API action node:
119
+
120
+ ```bash
121
+ frontline workflows nodes create --data '{"nodeId":"node_22222222-2222-2222-2222-222222222222","type":"API","position":{"positionX":320,"positionY":0},"data":{"type":"API","url":"https://example.com","method":"GET","headers":[]}}'
122
+ ```
123
+
124
+ Supported automation node types:
125
+
126
+ `TRIGGER`, `SCHEDULED_TRIGGER`, `WEBHOOK`, `TOOLS_AI`, `API`,
127
+ `CONDITIONAL_ROUTING`, `AI_CAPTURE`, `DATA_TRANSFORMER`, `DYNAMIC_TABLES`,
128
+ `SEND_MESSAGE`, `TRANSCRIPTION`.
129
+
130
+ ### DYNAMIC_TABLES node
131
+
132
+ Used to create, update, delete, or search records in an object. Always get the object schema first:
133
+
134
+ ```bash
135
+ frontline object get <object-name>
136
+ # id → tableId, record_types[0].id → recordTypeId, fields[].name → rowData keys
137
+ ```
138
+
139
+ `rowData` maps **field names** (e.g. `"First Name"`, `"Email"`) — not UUIDs — to static values or `{VARIABLE_NAME}` references. `inputModeByField` sets `"INPUT"` (static) or `"VARIABLE"` (interpolated) per field name. All variables used must exist and be populated by a prior node.
140
+
141
+ **Variables are plain text substitutions** — `{my_var}` is replaced with the exact string stored in that variable. There is no dot-access: `{webhook_payload.firstName}` is not valid.
142
+
143
+ ```bash
144
+ frontline workflows nodes create --data '{"nodeId":"node_22222222-2222-2222-2222-222222222222","type":"DYNAMIC_TABLES","position":{"positionX":640,"positionY":0},"data":{"type":"DYNAMIC_TABLES","tableId":2,"recordTypeId":2,"actionType":"CREATE","rowData":{"First Name":"{first_name}","Email":"{email}"},"inputModeByField":{"First Name":"VARIABLE","Email":"VARIABLE"}}}'
145
+ ```
146
+
147
+ `actionType` values: `CREATE`, `UPDATE`, `DELETE`, `SEARCH`, `SEARCH_BY_ID`.
148
+
149
+ ### Connect nodes
150
+
151
+ ```bash
152
+ frontline workflows edges add \
153
+ --source node_11111111-1111-1111-1111-111111111111 \
154
+ --source-handle default \
155
+ --target node_22222222-2222-2222-2222-222222222222 \
156
+ --target-handle default
157
+ ```
158
+
159
+ The API enforces one outgoing edge per node, no self-edges, source/target
160
+ existence, and no cycles.
161
+
162
+ ### Edit and delete nodes
163
+
164
+ ```bash
165
+ frontline workflows nodes update node_22222222-2222-2222-2222-222222222222 --data '{"alias":"Fetch external data"}'
166
+ frontline workflows nodes delete node_22222222-2222-2222-2222-222222222222
167
+ ```
168
+
169
+ Deleting a node also removes incoming and outgoing edges.
170
+
171
+ ### Remove an edge
172
+
173
+ ```bash
174
+ frontline workflows edges remove \
175
+ --source node_11111111-1111-1111-1111-111111111111 \
176
+ --source-handle default \
177
+ --target node_22222222-2222-2222-2222-222222222222 \
178
+ --target-handle default
179
+ ```
180
+
181
+ ## Validation Checklist
182
+
183
+ - Use exactly one initial trigger node (`TRIGGER` or `SCHEDULED_TRIGGER`).
184
+ - All node IDs must follow `node_<uuid>` format.
185
+ - Use only supported automation node types.
186
+ - Ensure `data.type` matches the node `type`.
187
+ - Connect only existing source and target nodes.
188
+ - Keep a single outgoing edge per node.
189
+ - Avoid self-edges and cycles.
190
+ - Inspect `frontline workflows graph` after each structural change.
191
+
192
+ ## Variable Interpolation
193
+
194
+ Interpolable workflow fields include API `url`, `headers[].value`,
195
+ `parameters[].value`, `body`; Send Message / Say AI `message` and `prompt`;
196
+ Response AI `instructions`; Tools AI `instructions` and `prompt`; AI Capture
197
+ `prompt` and `instructions`; Data Transformer `prompt`; Conditional Routing AI
198
+ `conditions[].expression`; Dynamic Tables `rowId`, `search`, `rowData` values;
199
+ Transcription `audioUrl`; and WhatsApp template variables in
200
+ `templateVariables.header`, `templateVariables.body`, and
201
+ `templateVariables.buttons`.
202
+
203
+ Each node's output is also available as `{nodeId}` in downstream nodes.
204
+
39
205
  ### Get analytics for a specific workflow
40
206
 
41
207
  ```bash
42
- frontline workflows analytics <workflowId> [--start-date <YYYY-MM-DD>] [--end-date <YYYY-MM-DD>] [--json] [--debug]
208
+ frontline workflows analytics [workflowId] [--workflow-id <id>] [--start-date <YYYY-MM-DD>] [--end-date <YYYY-MM-DD>] [--json] [--debug]
43
209
  ```
44
210
 
45
211
  | Flag | Description |
46
212
  | --------------------- | -------------------------------------- |
47
- | `<workflowId>` | **(required)** The workflow ID |
213
+ | `<workflowId>` | Optional workflow ID |
214
+ | `--workflow-id <id>` | Override the active workflow |
48
215
  | `--start-date <date>` | Start date in `YYYY-MM-DD` format |
49
216
  | `--end-date <date>` | End date in `YYYY-MM-DD` format |
50
217
  | `--json` | Output raw JSON |
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: incoming-webhooks
3
+ description: Create Frontline incoming webhooks from the CLI and use the returned URL/token in automation workflows.
4
+ allowed-tools: Bash(frontline:*)
5
+ ---
6
+
7
+ # Incoming Webhooks
8
+
9
+ Create a webhook:
10
+
11
+ ```bash
12
+ frontline incoming-webhooks create --name "CRM payload" --description "Receives contacts"
13
+ ```
14
+
15
+ Create an unauthenticated webhook:
16
+
17
+ ```bash
18
+ frontline incoming-webhooks create --name "Open endpoint" --no-authentication
19
+ ```
20
+
21
+ The create response includes:
22
+
23
+ - `id`: use this in workflow trigger payloads as `triggerByWebhookIds`.
24
+ - `url`: endpoint that receives the webhook request.
25
+ - `accessToken`: bearer token returned only on creation when authentication is enabled.
26
+
27
+ To trigger an automation from this webhook, create a workflow `TRIGGER` node with
28
+ `triggerType` and `triggeredBy` set to `INCOMING_WEBHOOK`, and include the
29
+ webhook ID:
30
+
31
+ ```bash
32
+ frontline workflows nodes create --data '{"nodeId":"incoming_webhook_1","type":"TRIGGER","position":{"positionX":0,"positionY":0},"data":{"type":"TRIGGER","triggerType":"INCOMING_WEBHOOK","triggeredBy":"INCOMING_WEBHOOK","triggerByWebhookIds":["<incomingWebhookId>"]}}'
33
+ ```
34
+
35
+ Incoming webhook payload data is available to later automation nodes through the
36
+ runtime webhook payload variables documented in the workflow builder skill.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: tools
3
+ description: Create, list, inspect, update, delete, and assign Frontline API call tools from the CLI. Use when the user asks about tools, custom tools, API tools, headers, arguments, query params, or assigning tools to agents.
4
+ ---
5
+
6
+ ## Prerequisites
7
+
8
+ - Authenticate with `frontline auth login <api-key>`.
9
+ - Creating, updating, and deleting tools requires a USER API key.
10
+ - This public surface supports `API_CALL` tools only. WhatsApp template tools are not exposed yet.
11
+
12
+ ## List And Inspect
13
+
14
+ ```bash
15
+ frontline tools list
16
+ frontline tools list --status ACTIVE --filter-text contact
17
+ frontline tools list --table
18
+ frontline tools describe <toolId>
19
+ ```
20
+
21
+ Tool list output includes `id`, `name`, `status`, `method`, `url`, and timestamps.
22
+
23
+ ## Create An API Tool
24
+
25
+ ```bash
26
+ frontline tools create \
27
+ --name "Fetch contact" \
28
+ --description "Fetches a CRM contact" \
29
+ --method GET \
30
+ --url "https://api.example.com/contacts/{{contactId}}" \
31
+ --arguments '[{"name":"contactId","description":"CRM contact ID","dataType":"STRING"}]' \
32
+ --headers '[{"key":"Authorization","value":"Bearer {{apiKey}}"}]' \
33
+ --query-params '[{"key":"include","value":"deals"}]'
34
+ ```
35
+
36
+ Complex options are JSON arrays:
37
+
38
+ - `--arguments`: `[{ "name": "...", "description": "...", "dataType": "STRING" }]`
39
+ - `--headers`: `[{ "key": "...", "value": "..." }]`
40
+ - `--query-params`: `[{ "key": "...", "value": "..." }]`
41
+
42
+ Supported argument data types are `STRING`, `NUMBER`, `DECIMAL`, and `BOOLEAN`.
43
+ Supported methods are `GET`, `POST`, `PUT`, `PATCH`, and `DELETE`.
44
+
45
+ ## Update And Delete
46
+
47
+ ```bash
48
+ frontline tools update <toolId> --status PAUSED
49
+ frontline tools update <toolId> --url "https://api.example.com/v2/contacts/{{contactId}}"
50
+ frontline tools update <toolId> --headers '[{"key":"Authorization","value":"Bearer {{apiKey}}"}]'
51
+ frontline tools delete <toolId>
52
+ ```
53
+
54
+ Update replaces `arguments`, `headers`, or `queryParams` when those options are
55
+ provided. Delete is a soft delete.
56
+
57
+ ## Assign To An Agent
58
+
59
+ Use `customToolIds` in the agent setting payload:
60
+
61
+ ```bash
62
+ frontline agents agent-setting update --data '{"customToolIds":[123],"instructions":"Use the contact tool when a user asks about CRM data.","temperature":0.2,"aiModelId":1}'
63
+ ```
64
+
65
+ The API validates that assigned tool IDs belong to the same account.
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: variables
3
+ description: Manage Frontline agent variables, workflow variables, and flow intents from the CLI, and explain variable interpolation in nodes and actions.
4
+ allowed-tools: Bash(frontline:*)
5
+ ---
6
+
7
+ # Variables And Intents
8
+
9
+ ## Agent Variables
10
+
11
+ ```bash
12
+ frontline agents use <agentId>
13
+ frontline agents variables list --table
14
+ frontline agents variables all
15
+ frontline agents variables create --name customer_name --description "Customer name"
16
+ frontline agents variables describe 123
17
+ frontline agents variables update 123 --name customer_name --pattern "^[A-Za-z ]+$"
18
+ frontline agents variables delete 123
19
+ frontline agents variables check-name customer_name
20
+ ```
21
+
22
+ Use `--agent-id <id>` to avoid relying on saved context.
23
+
24
+ ## Agent Intents
25
+
26
+ ```bash
27
+ frontline agents intents list --table
28
+ frontline agents intents all
29
+ frontline agents intents create --name cancellation --phrases '["cancel order","stop subscription"]'
30
+ frontline agents intents update 10 --name cancellation --phrases '[{"id":1,"phrase":"cancel order"},{"phrase":"stop order"}]'
31
+ frontline agents intents delete 10
32
+ frontline agents intents generate-phrases --name cancellation --samples '["cancel order"]' --amount 5
33
+ ```
34
+
35
+ For create, `--phrases` is a JSON array of strings. For update, `--phrases` is a
36
+ JSON array of objects; existing phrases include `id`, and new phrases omit it.
37
+
38
+ ## Workflow Variables
39
+
40
+ ```bash
41
+ frontline workflows use <workflowId>
42
+ frontline workflows variables list --table
43
+ frontline workflows variables all
44
+ frontline workflows variables create --name order_id --description "Order ID"
45
+ frontline workflows variables describe 123
46
+ frontline workflows variables update 123 --name order_id --pattern "^[0-9]+$"
47
+ frontline workflows variables delete 123
48
+ frontline workflows variables check-name order_id
49
+ ```
50
+
51
+ Use `--workflow-id <id>` to avoid relying on saved context.
52
+
53
+ ## Interpolation Syntax
54
+
55
+ Variables are referenced inside text fields as `{VARIABLE_NAME}`. The name must
56
+ match `variable.name` exactly. Automation workflows also expose each node output
57
+ as a runtime variable named after the node ID. Because node IDs follow the
58
+ `node_<uuid>` format, a node with `nodeId`
59
+ `node_a1b2c3d4-e5f6-7890-abcd-ef1234567890` is referenced downstream as
60
+ `{node_a1b2c3d4-e5f6-7890-abcd-ef1234567890}`.
61
+
62
+ Agent flow fields with variable replacement:
63
+
64
+ - API: `url`, `headers[].value`, `parameters[].value`, `body`.
65
+ - Say AI: `message`, `prompt`.
66
+ - Response AI: `instructions`.
67
+ - Tools AI: `instructions`.
68
+ - Conditional Routing AI: `conditions[].expression`.
69
+ - Dynamic Tables: `rowId`, `search`, `rowData` values.
70
+
71
+ Automation workflow fields with variable replacement:
72
+
73
+ - API: `url`, `headers[].value`, `parameters[].value`, `body`.
74
+ - Send Message / Say AI: `message`, `prompt`.
75
+ - Response AI: `instructions`.
76
+ - Tools AI: `instructions`, `prompt`.
77
+ - AI Capture: `prompt`, `instructions`.
78
+ - Data Transformer: `prompt`.
79
+ - Conditional Routing AI: `conditions[].expression`.
80
+ - Dynamic Tables: `rowId`, `search`, `rowData` values.
81
+ - Transcription: `audioUrl`.
82
+ - WhatsApp Template: `templateVariables.header`, `templateVariables.body`, `templateVariables.buttons`.