Skip to content

CollectNode

optional ask?: (missing, state) => string;

Deterministic, framework-emitted question shown when fields are still missing. Collect extraction never speaks model-authored text, so this is the only user-facing copy a collect node produces. Must not claim any downstream outcome (order placed, delivery scheduled, payment, website).

Parameter Type

missing

string[]

state

FlowState

string


optional choices?: ChoiceOption[];

id: string;

optional instructions?: (missing, state) => Instructions;

Extraction-only guidance for the (non-speaking) field extraction turn. This text is NEVER shown to the user — see ask for user-facing copy.

Parameter Type

missing

string[]

state

FlowState

Instructions


kind: "collect";

optional maxTurns?: number;

onComplete: (data, state) =>
| Transition
| Promise<Transition>;
Parameter Type

data

unknown

state

FlowState

| Transition | Promise<Transition>


optional required?: string[];

schema: StandardSchemaV1;