flow() API Flow builder, workflow graph, execution plan, and mermaid APIs.
Most Used AxFlowInterface for flows that can be tuned, executed, and used in compositions.
Provides methods for building and executing complex AI workflows.
Field Value Kind classForm AxFlowSource source
Call Shape m < TNewState >( transform : ( _state : TState ) => TNewState ) : AxFlow < IN , OUT , TNodes , TNewState >; m < TNewState >( transform : ( _state : TState ) => Promise < TNewState >) : AxFlow < IN , OUT , TNodes , TNewState >; m < TNewState >( transforms : ( _state : TState ) => TNewState [], options : object ) : AxFlow < IN , OUT , TNodes , TNewState >; Full reference
flowCreates a new AxFlow builder. Passing a string compiles a mermaid
flowchart in the AxFlow dialect (see AxFlow.toString) into a runnable
flow — node contracts come from %%ax nodeId: <signature> directives or
from bindings.nodes, data wiring is by field name (a node input binds to
the nearest upstream producer of that field), labeled out-edges of a
decision node become branches, and back-edges become feedback/while
loops. flow(String(otherFlow)) round-trips.
Field Value Kind variableForm flowReturns AxFlow <TInput, TOutput, { }, TInput>Source source
Call Shape < TInput , TOutput >( options? : AxFlowOptions ) : AxFlow < TInput , TOutput , {
}, TInput >; < TInput , TOutput >( mermaid : string , bindings? : AxFlowMermaidBindings ) : AxFlow < TInput , TOutput , any , any >; Arguments And Options Full reference
Advanced / internals / full reference axCreateFlowColorLoggerFactory function to create a colorized AxFlow logger
Call Shape function axCreateFlowColorLogger ( output : ( message : string ) => void ) : AxFlowLoggerFunction ; Arguments And Options Name Type Description output(message: string) => void
Full reference
axCreateFlowTextLoggerFactory function to create a text-only AxFlow logger (no colors)
Call Shape function axCreateFlowTextLogger ( output : ( message : string ) => void ) : AxFlowLoggerFunction ; Arguments And Options Name Type Description output(message: string) => void
Full reference
axDefaultFlowLoggerDefault AxFlow logger with colors
Field Value Kind variableForm axDefaultFlowLoggerSource source
Call Shape const axDefaultFlowLogger : AxFlowLoggerFunction ; Full reference
AxFlowableInterface for flows that can be tuned, executed, and used in compositions.
Provides methods for building and executing complex AI workflows.
Field Value Kind interfaceForm AxFlowableSource source
Call Shape applyOptimization ( optimizedProgram : AxOptimizedProgram < OUT >) : void ; Full reference
AxFlowBranchEvaluationDataData types for different AxFlow logging events
Field Value Kind interfaceForm AxFlowBranchEvaluationDataSource source
Call Shape Full reference
AxFlowCompleteDataData types for different AxFlow logging events
Field Value Kind interfaceForm AxFlowCompleteDataSource source
Call Shape Full reference
AxFlowDynamicContextTypeScript interface exported by @ax-llm/ax. See the fields and full reference below.
Field Value Kind interfaceForm AxFlowDynamicContextSource source
Full reference
AxFlowErrorDataData types for different AxFlow logging events
Field Value Kind interfaceForm AxFlowErrorDataSource source
Call Shape Full reference
AxFlowExecutionPlanTypeScript interface exported by @ax-llm/ax. See the fields and full reference below.
Field Value Kind interfaceForm AxFlowExecutionPlanSource source
Full reference
AxFlowExecutionPlanGroupTypeScript interface exported by @ax-llm/ax. See the fields and full reference below.
Field Value Kind interfaceForm AxFlowExecutionPlanGroupSource source
Full reference
AxFlowExecutionPlanStepTypeScript interface exported by @ax-llm/ax. See the fields and full reference below.
Field Value Kind interfaceForm AxFlowExecutionPlanStepSource source
Full reference
AxFlowForwardOptionsTypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.
Field Value Kind typealiasForm AxFlowForwardOptionsSource source
Call Shape type AxFlowForwardOptions < T > = AxProgramForwardOptionsWithModels < T > & object ; Full reference
AxFlowLogDataTypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.
Field Value Kind typealiasForm AxFlowLogDataSource source
Call Shape type AxFlowLogData =
| AxFlowStartData
| AxFlowStepStartData
| AxFlowStepCompleteData
| AxFlowParallelGroupStartData
| AxFlowParallelGroupCompleteData
| AxFlowBranchEvaluationData
| AxFlowCompleteData
| AxFlowErrorData ; Full reference
AxFlowLoggerDataData types for different AxFlow logging events
Field Value Kind interfaceForm AxFlowLoggerDataSource source
Call Shape Full reference
AxFlowLoggerFunctionFunction type for AxFlow logging
Field Value Kind typealiasForm AxFlowLoggerFunctionReturns voidSource source
Call Shape type AxFlowLoggerFunction = ( data : AxFlowLogData ) => void ; Arguments And Options Full reference
AxFlowMermaidBindingsTypeScript interface exported by @ax-llm/ax. See the fields and full reference below.
Field Value Kind interfaceForm AxFlowMermaidBindingsSource source
Full reference
AxFlowMermaidErrorTypeScript class exported by @ax-llm/ax. See the constructor, methods, and full reference below.
Field Value Kind classForm AxFlowMermaidErrorSource source
Call Shape new AxFlowMermaidError (
message : string ,
line : number ,
context : string ,
suggestion? : string ) : AxFlowMermaidError ; Full reference
AxFlowMermaidNodeBindingTypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.
Field Value Kind typealiasForm AxFlowMermaidNodeBindingSource source
Call Shape type AxFlowMermaidNodeBinding =
| string
| AxSignature
| {
forward : (... args : any []) => any ;
}
| ( state : AxFlowState ) =>
| AxFlowState
| Promise < AxFlowState >; Full reference
AxFlowMermaidRenderOptionsTypeScript interface exported by @ax-llm/ax. See the fields and full reference below.
Field Value Kind interfaceForm AxFlowMermaidRenderOptionsSource source
Full reference
AxFlowOptionsTypeScript interface exported by @ax-llm/ax. See the fields and full reference below.
Field Value Kind interfaceForm AxFlowOptionsSource source
Full reference
AxFlowParallelGroupCompleteDataData types for different AxFlow logging events
Field Value Kind interfaceForm AxFlowParallelGroupCompleteDataSource source
Call Shape Full reference
AxFlowParallelGroupStartDataData types for different AxFlow logging events
Field Value Kind interfaceForm AxFlowParallelGroupStartDataSource source
Call Shape Full reference
AxFlowStartDataData types for different AxFlow logging events
Field Value Kind interfaceForm AxFlowStartDataSource source
Call Shape Full reference
AxFlowStateTypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.
Field Value Kind typealiasForm AxFlowStateSource source
Call Shape type AxFlowState = Record < string , unknown >; Full reference
AxFlowStateDependencyAnalysisBest-effort static dependency extraction for flow execute mappings.
Field Value Kind interfaceForm AxFlowStateDependencyAnalysisSource source
Full reference
AxFlowStepCompleteDataData types for different AxFlow logging events
Field Value Kind interfaceForm AxFlowStepCompleteDataSource source
Call Shape Full reference
AxFlowStepStartDataData types for different AxFlow logging events
Field Value Kind interfaceForm AxFlowStepStartDataSource source
Call Shape Full reference
AxFlowTypedParallelBranchTypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.
Call Shape type AxFlowTypedParallelBranch < TNodes , TState > = ( subFlow : AxFlowTypedSubContext < TNodes , TState >) => AxFlowTypedSubContext < TNodes , AxFlowState >; Arguments And Options Full reference
AxFlowTypedSubContextTypeScript interface exported by @ax-llm/ax. See the fields and full reference below.
Field Value Kind interfaceForm AxFlowTypedSubContextSource source
Call Shape execute < TNodeName , TAI >(
nodeName : TNodeName ,
mapping : ( state : TState ) => GetGenIn < TNodes [ TNodeName ] >,
dynamicContext? : AxFlowDynamicContext < TAI >) : AxFlowTypedSubContext < TNodes , AddNodeResult < TState , TNodeName , GetGenOut < TNodes [ TNodeName ] >>>; Full reference
Full Reference Open the full TypeScript reference . This page highlights the flow symbols most relevant to everyday use.