Skip to content

Commit e1f4961

Browse files
authored
Merge pull request #50 from KestrelAI/add-workflow-request-docs
Add workflow request docs
2 parents a50cb80 + aa1d7f0 commit e1f4961

2 files changed

Lines changed: 65 additions & 9 deletions

File tree

docs/workflows/cli.mdx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,34 @@ kestrel workflows test <workflow-id>
141141

142142
### Request a workflow
143143

144-
Submit a natural language request to trigger a matching workflow (CLI equivalent of `/kestrel-workflow` in Slack):
144+
Submit a natural language request to trigger a matching workflow. This is the CLI equivalent of `/kestrel-workflow` in Slack or the "Make a Request" page in the Kestrel Platform UI:
145145

146146
```bash
147147
kestrel workflows request "provision an MSK cluster with 3 brokers in us-east-1"
148148
kestrel workflows request "scale the payments deployment to 5 replicas"
149+
kestrel workflows request "create a DNS record for api.example.com in Cloudflare"
150+
kestrel workflows request "add a new PagerDuty escalation policy for the payments team"
151+
```
152+
153+
If the matched workflow requires additional parameters, you'll be prompted interactively:
154+
155+
```
156+
$ kestrel workflows request "create a configmap"
157+
Routing request: create a configmap
158+
159+
! Matched workflow: On-Demand K8s Resource Provision
160+
Extracted: resource_type=ConfigMap
161+
162+
Please provide the following details:
163+
164+
cluster: prod-cluster
165+
namespace: payments
166+
name: app-config
167+
168+
Submitting with parameters...
169+
170+
✓ Matched workflow: On-Demand K8s Resource Provision
171+
✓ Workflow is now executing.
149172
```
150173

151174
## Execution Commands

docs/workflows/sdk.mdx

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,47 @@ Trigger.vercel_error_anomaly()
163163
Trigger.vercel_usage_anomaly()
164164
Trigger.vercel_domain_issue()
165165

166-
# Slack Requests (on-demand via /kestrel-workflow)
167-
Trigger.request_k8s_provision()
168-
Trigger.request_k8s_edit()
169-
Trigger.request_k8s_investigate()
170-
Trigger.request_cloud_provision()
171-
Trigger.request_cloud_edit()
172-
Trigger.request_cloud_investigate()
173-
Trigger.request_any()
166+
# Developer Requests (on-demand via Slack /kestrel-workflow, Kestrel Platform UI, or CLI)
167+
Trigger.request_kubernetes() # Kubernetes operations
168+
Trigger.request_cloud() # AWS / Cloud operations
169+
Trigger.request_cloudflare() # Cloudflare operations
170+
Trigger.request_pagerduty() # PagerDuty operations
171+
Trigger.request_datadog() # Datadog operations
172+
Trigger.request_argocd() # ArgoCD operations
173+
Trigger.request_github() # GitHub operations
174+
Trigger.request_gitlab() # GitLab operations
175+
Trigger.request_helm() # Helm operations
176+
Trigger.request_vercel() # Vercel operations
177+
Trigger.request_general() # General (catch-all)
178+
```
179+
180+
Each request trigger can be scoped further:
181+
182+
```python
183+
from kestrel.workflows import Trigger
184+
185+
# Kubernetes requests — only create operations from Slack
186+
Trigger.request_kubernetes().config(
187+
request_sources=["slack"],
188+
request_types=["create"],
189+
)
190+
191+
# Cloud requests — only from Platform UI and CLI
192+
Trigger.request_cloud().config(
193+
request_sources=["platform", "cli"],
194+
)
195+
```
196+
197+
### Submitting Requests Programmatically
198+
199+
```python
200+
# Submit a request (like /kestrel-workflow in Slack)
201+
result = client.workflows.request("create a configmap for my-app in production")
202+
203+
# If clarification is needed:
204+
if result.status == "awaiting_params":
205+
reply = client.workflows.request_reply(result.id, "use the prod-cluster, namespace=payments")
206+
```
174207

175208
# Custom Webhook
176209
Trigger.custom_webhook("my-event-type")

0 commit comments

Comments
 (0)