Skip to content

ModelTurnLoopInput

Stable boundary between Kuralle’s turn-composition pipeline and a model/tool loop implementation. Drivers may replace this loop, but they do not own policies, gather, output gating, host control, persistence, or flow state.

ctx: RunContext;

maxSteps: number;

messages: ModelMessage[];

model: LanguageModel;

node: ResolvedNode;

purpose: "extraction" | "speaking";

optional stopAfterToolResults?: (state) => boolean | Promise<boolean>;

Optional early-stop condition used by silent typed extraction.

Parameter Type

state

ModelTurnLoopState

boolean | Promise<boolean>


system: SystemModelMessage[];

optional temperature?: number;

optional tools?: ToolSet;

volatileSystemBlocks: (string | undefined)[];