action Step
The action step calls external systems through integrations. The platform executes actions; the LLM only provides language and context.
Syntax
Short Form
- action: integration.action_name
- action: integration.action_name -> result
-> result is shorthand for as: result.
Full Form
- action:
call: integration.action_name
as: result
name: "Step Name"
inputs:
param1: "$variables.some_field"
param2: "static value"
outcomes:
success: continue
not_found:
- done: "Item not found"
on_error:
timeout:
- goto: retry_step
default:
- escalate: support
retry:
max: 3
delay: 1000
on_exhausted:
- escalate: support
Properties
| Property | Type | Required | Description |
|---|---|---|---|
call | string | Yes | Action reference integration.action |
as | string | No | Variable name to store result (in $variables) |
name | string | No | Human readable step name |
inputs | object | No | Override auto mapped inputs |
outcomes | object | No | Branch based on action outcome |
on_error | object | No | Error handling |
retry | object | No | Retry configuration |
Capturing Results
Results are stored in $variables:
- action: orders.get_details -> order
- done: "Order {{variables.order.id}} is {{variables.order.status}}"
Inputs
Actions receive inputs in three ways:
- Auto mapping from variables and context
- Explicit inputs in the step
- Expressions using
$useror$variables
- action:
call: orders.get_details
inputs:
order_id: "$variables.order_number"
include_items: true
Outcomes
- action: orders.lookup -> order
outcomes:
found: continue
not_found:
- done: "Order not found"
Outcomes are defined in the action configuration. See Actions.
Error Handling
- action:
call: payments.charge
on_error:
timeout:
- goto: retry_payment
auth_failed:
- escalate: payment_support
default:
- escalate: support