Define Workflows
The core contract lives in @kortyx/core and is exposed through kortyx.
TypeScript workflow (recommended)
Node return shape
Nodes return a subset of NodeResult:
Important fields in practice:
data: merged into runtime state and forwarded as future inputui.message: emitted as a final message eventui.structured: emitted asstructured-datacondition/intent: used for conditional edge routingtransitionTo: triggers workflow handoff
Node behavior currently implemented
From WorkflowNodeBehavior and runtime code:
behavior.retry.maxAttemptsbehavior.retry.delayMsbehavior.checkpoint
Note: onError.mode exists in schema types but is not currently applied by the execution graph compiler.
Validation
You can validate directly: