Skip to main content

Parameters

Selector Return Types

The selector function can return any of the following: selector also accepts a CEL expression string in place of a function. The expression must evaluate to a step name from choices.

Selector Function Signatures

Basic Signature

Extended Signature (with step_choices)

The step_choices parameter provides access to the prepared Step objects from Router.choices, enabling dynamic selection based on available options.

Extended Signature (with session_state)

If the selector accepts a session_state parameter, the workflow’s session state is passed to it at call time.

Async Support

All selector signatures support async functions: