Overview
ThecreateStep
function creates a new step within the active session. Steps represent logical units of work in your workflow.
Syntax
Parameters
Optional object with step configuration:
Returns
Returns a Promise that resolves to an object with:stepId
- Unique identifier for the step
undefined
.
Examples
Basic Step Creation
With Evaluation
Sequential Steps
Error Handling
With Provider Integration
Best Practices
1. Use Context Managers for Self-Contained Workflows
PreferwithLucidic
for short, self-sufficient tasks that should end when work completes. See Session Context.
2. Always End Steps
3. One Active Step
Only one step can be active at a time:Notes
- An active session is required before creating steps
- Previous step must be ended before creating a new one
- Steps are automatically ended when the session ends
- All parameters are optional - you can create a step with no configuration
See Also
- endStep - End the current step
- updateStep - Update step properties
- createEvent - Create events within steps