Act on Data
The Actuate stage executes the actions that the Reason stage planned. It has two substage types: execute (does the work) and evaluate (checks whether it succeeded).
Execute Substage
The execute substage runs one or more executors for each planned action. Each executor performs a specific action: publish an MQTT message, call an API, write to a database, or send an email.
actuate:
substages:
- type: execute
name: alert-publisher
executors:
- type: mqtt_publish
connection: factory-mqtt
topic: factory/alerts/temperature
payload:
severity: '${action.severity}'
message: '${action.message}'
timestamp: '${now}'
source: quality-monitor
- type: email_send
connection: alert-email
condition: "${action.severity == 'critical'}" # Only send for critical alerts
subject: 'CRITICAL ALERT: ${action.sensorType} threshold exceeded'
html: |
<h2>Critical Alert</h2>
<p><strong>Message:</strong> ${action.message}</p>
<p><strong>Time:</strong> ${now}</p>
text: |
CRITICAL ALERT
Message: ${action.message}
Time: ${now}
Executor Fields
| Field | Required | Description |
|---|---|---|
|
Yes |
The action type (e.g., |
|
Varies |
Name of the connection to use (required for most executors) |
|
No |
JavaScript expression. The executor is skipped if this evaluates to |
Template Variables in Executors
Use ${variable} syntax in executor fields (note: ${} not {{}} like in prompts):
| Template | Value |
|---|---|
|
A field from the current planned action’s |
|
A field from the current planned action’s |
|
Current ISO 8601 timestamp |
|
Current cycle number |
|
Agent name from the data-defined agent (DDA) configuration |
Available Action Types
MQTT Publish
Publish a message to an MQTT topic.
executors:
- type: mqtt_publish
connection: factory-mqtt
topic: factory/alerts/${action.sensorType}
payload:
type: '${action.severity}'
message: '${action.message}'
timestamp: '${now}'
source: threshold-monitor
API Call
Make an HTTP request to a configured REST API.
executors:
- type: api_call
connection: erp-api
method: POST
path: /api/v1/maintenance-requests
body:
equipmentId: '${action.params.equipmentId}'
priority: '${action.params.priority}'
description: '${action.params.description}'
requestedBy: quality-monitor
Database Write
Write data to a configured database.
executors:
- type: database_write
connection: quality-db
query: |
INSERT INTO quality_events (timestamp, metric_name, value, severity, message)
VALUES ($1, $2, $3, $4, $5)
params:
- '${now}'
- '${action.params.metricName}'
- '${action.params.value}'
- '${action.params.severity}'
- '${action.params.message}'
Email Send
Send an email via SendGrid or SMTP.
executors:
- type: email_send
connection: alert-email
condition: "${action.severity == 'critical'}"
subject: 'CRITICAL ALERT: ${action.params.sensorType} threshold exceeded'
html: |
<h2>Critical Threshold Alert</h2>
<p><strong>Sensor:</strong> ${action.params.sensorType}</p>
<p><strong>Message:</strong> ${action.params.message}</p>
<p><strong>Time:</strong> ${now}</p>
text: |
CRITICAL THRESHOLD ALERT
Sensor: ${action.params.sensorType}
Message: ${action.params.message}
Time: ${now}
priority: high
|
The |
More Action Types
The platform handler catalog spans 9 categories. Shipped (available) handlers include:
| Category | Handler type(s) |
|---|---|
Communication |
|
Human Workflow |
|
Messaging & Events |
|
System & Application |
|
Data & State |
|
Integration |
|
Industrial / OT |
|
|
Industrial actions ( |
Choosing the Right Risk Level
Each action type has a risk tier. Use this as a guide when deciding which autonomy lane to assign:
| Risk tier | Examples | Suggested lane |
|---|---|---|
|
Log observations, publish status updates |
Autonomous |
|
Send alerts, update configurations |
Supervised |
|
Write to production databases, create tickets |
Controlled |
|
Stop production lines, delete records |
Controlled (always) |
Evaluate Substage
The evaluate substage checks whether the executed actions succeeded.
actuate:
substages:
- type: execute
name: alert-publisher
executors:
- type: mqtt_publish
# ...
- type: evaluate
name: result-checker
successCriteria:
minSuccessRate: 0.8 # At least 80% of actions must succeed
verifications:
- type: mqtt-ack
timeoutMs: 5000 # Wait up to 5 seconds for MQTT acknowledgement
Evaluation results are stored in derivedData.evaluation and accessible in the Reflect stage to feed into learning.
| Field | Description |
|---|---|
|
Fraction of actions that must succeed (0.0–1.0) |
|
Wait for MQTT PUBACK (QoS 1) within |