wait
Wait primitive for durable suspension.
kitaru.wait() suspends a running flow until input is provided. On local
runs with an interactive terminal, the runtime prompts for input directly in
the same terminal and the flow continues in-process. In non-interactive
contexts (remote orchestrators, CI, piped output, etc.), the execution moves
to waiting status and input must be supplied later via the client API, CLI,
or MCP.
Wait is valid only directly inside a flow, not inside a checkpoint.
func_resolve_zenml_wait() -> Callable[..., Any]Load the upstream wait primitive from the installed ZenML build.
Returns
collections.abc.Callable[..., typing.Any]funcwait(*, schema=None, name=None, question=None, timeout=None, metadata=None) -> AnySuspend the current flow until input is provided.
On local interactive runs the runtime prompts for input in the same
terminal and the flow continues automatically. In non-interactive
contexts the execution pauses until input is supplied externally via
KitaruClient, the CLI, or MCP.
paramschemaAny= NoneExpected type of the input value. When None
(the default), the wait acts as a pure continue/abort gate
and returns None on continuation. Pass an explicit type
(e.g. bool, str, a Pydantic model) when the caller
needs structured input from the human.
paramnamestr | None= NoneDisplay name for this wait point.
paramquestionstr | None= NoneHuman-readable prompt describing what input is needed.
paramtimeoutint | None= NoneMaximum seconds the runner keeps polling before it pauses the execution and exits. Not an expiration on the wait record itself. Defaults to 600.
parammetadatadict[str, Any] | None= NoneAdditional metadata to attach to the wait record.
Returns
typing.AnyThe validated input value, provided either inline via the terminal