AI Workflows
Workflow Builder Overview
AI Workflows are visual no-code automations that combine AI decision-making with StackFlow ITSM actions. The workflow builder provides a drag-and-drop canvas where you connect trigger nodes, AI nodes, condition nodes, and action nodes. Workflows run as Lambda invocations triggered by SQS messages or EventBridge events.
- DynamoDB:
StackFlow_WorkflowandStackFlow_WorkflowExecutiontables provisioned - SQS:
StackFlow-WorkflowExecution.fifoqueue for async workflow step execution - Lambda:
StackFlowWorkflowEngineconsuming from SQS withbedrock:InvokeModelfor AI nodes - IAM: Workflow engine role must have permissions for all action types: SES, SNS, DynamoDB, Lambda invoke
Workflows are stored as JSON definitions in Aurora and compiled to Lambda execution plans. The SQS queues StackFlow-Events-Ingestion.fifo and StackFlow-Remediation-P1.fifo provide the event backbone for workflow execution.
AI Nodes
| Node Type | Description | Output |
|---|---|---|
| AI Classifier | Classifies input into predefined categories | Category label + confidence |
| AI Text Generator | Generates text from a prompt and context | Generated text string |
| AI Decision Router | Routes workflow based on AI analysis | Named route (true/false/custom) |
| KB Lookup | Semantic search in Bedrock KB | Top N matching articles |
| Sentiment Analyzer | Analyzes sentiment of text input | Positive/Negative/Neutral + score |
| Entity Extractor | Extracts structured data from text | JSON object with extracted fields |
Trigger Configuration
Workflows can be triggered by: ITSM record state changes, SQS message arrival, scheduled EventBridge rule, webhook (external HTTP POST), or manual execution from the portal. SQS-triggered workflows support automatic retry with exponential backoff via the DLQ (StackFlow-Remediation-DLQ.fifo).
{
"workflow": {
"name": "Auto-Route Incident by AI Classification",
"trigger": {"type": "itsm_event", "record_type": "incident", "event": "created"},
"nodes": [
{
"id": "classify",
"type": "ai_classifier",
"input": "{{incident.short_description}} {{incident.description}}",
"categories": ["database", "network", "application", "security", "end_user"],
"model": "claude-3-haiku"
},
{
"id": "route",
"type": "condition",
"input": "{{classify.category}}",
"branches": {
"database": "assign_to_platform_eng",
"network": "assign_to_network_ops",
"security": "assign_to_security_ops"
},
"default": "assign_to_service_desk"
}
]
}
}
Sample Workflows
Auto-Remediation Workflow: Triggers on P1 incidents with category "database", runs Neptune impact analysis, attempts automated restart of the affected service via SSM Run Command, and if successful, adds a work note and moves the incident to "Resolved" state. Failed remediations are escalated via the escalation workflow.
Debugging Workflows
Each workflow execution generates a detailed trace log accessible in AI → Workflows → Execution History. The trace shows each node's input, output, and execution time. Failed executions include the full error stack trace and the SQS message ID for correlation with CloudWatch Logs.