Skip to main content

Module exec_context

Module exec_context 

Source
Expand description

Execution context — runtime variables accessible between steps.

Provides $variable interpolation in user prompts and system prompts. Variables are populated automatically by the runner as steps execute.

Built-in variables: $result — output of the most recent step $step_name — name of the current step $step_type — type of the current step $flow_name — name of the current flow $persona_name — name of the current persona $unit_index — 1-based index of the current execution unit $step_index — 1-based index of the current step within the unit ${StepName} — result of a specific named step (e.g., ${Analyze})

Variable syntax: $name or ${name} (braces for disambiguation).

Structs§

ExecContext
Execution context — holds runtime variables for a single execution unit.

Functions§

interpolate_vars
resolve_named_arg_value
v2.10.0 — resolve a use Tool(k = v) keyword-argument VALUE against the runtime bindings, by its frontend-classified value_kind:
resolve_value_reference
v2.17.0 — resolve a VALUE-POSITION expression (a for … in <expr> iterable, a return <expr>) against the runtime bindings. These positions carry no frontend value_kind classification (unlike a v2.10.0 kwarg), so this resolves the three reference forms a flow author writes, in order: