Completion type that asks the AI to choose between a list of named choices, using a prompt to decide. Each choice and the default outcome carries its own completion type, so whichever is taken runs that completion type, allowing logic and actions to be combined. Written as the decision element inside a step's completion.

Group: AI Agents

Implements: AgentWorkflowStepCompletionType


Properties

PropertyReturnsDescription
choicesList<DecisionChoice>The choices the AI can pick between when evaluating this decision.
defaultCompletionAgentWorkflowStepCompletionTypeThe completion type used when none of the choices apply.
promptStringThe prompt evaluated to ask the AI which choice to take.

Methods

getDefaultCompletion()

Returns: AgentWorkflowStepCompletionType

The completion type used when none of the choices apply.

getChoices()

Returns: List<DecisionChoice>

The choices the AI can pick between when evaluating this decision.

getPrompt()

Returns: String

The prompt evaluated to ask the AI which choice to take.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.