Skip to main content

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

PropertyTypeRequiredDescription
callstringYesAction reference integration.action
asstringNoVariable name to store result (in $variables)
namestringNoHuman readable step name
inputsobjectNoOverride auto mapped inputs
outcomesobjectNoBranch based on action outcome
on_errorobjectNoError handling
retryobjectNoRetry 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:

  1. Auto mapping from variables and context
  2. Explicit inputs in the step
  3. Expressions using $user or $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