AxFlowable Generated TypeScript API reference. typescript api api/reference build/apidocs/Interface.AxFlowable.md interface AxFlowable

AxFlowable

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/flow/types.ts#L76

Interface for flows that can be tuned, executed, and used in compositions. Provides methods for building and executing complex AI workflows.

Extends

Type Parameters

Type Parameter
IN
OUT

Methods

applyOptimization()

TypeScript
applyOptimization(optimizedProgram: AxOptimizedProgram<OUT>): void;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L390

Parameters

ParameterType
optimizedProgramAxOptimizedProgram<OUT>

Returns

void

Inherited from

AxProgrammable.applyOptimization


applyOptimizedComponents()

TypeScript
applyOptimizedComponents(updates: Readonly<Record<string, string>>): void;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L408

Apply a map of componentKey → newValue updates produced by an optimizer. Each program filters keys belonging to itself and dispatches internally. Unknown keys are silently ignored, which lets parents broadcast a single map across the whole subtree.

Parameters

ParameterType
updatesReadonly<Record<string, string>>

Returns

void

Inherited from

AxProgrammable.applyOptimizedComponents


forward()

TypeScript
forward(
   ai: Readonly<AxAIService>, 
   values: IN, 
options?: Readonly<AxProgramForwardOptions<string>>): Promise<OUT>;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L368

Parameters

ParameterType
aiReadonly<AxAIService>
valuesIN
options?Readonly<AxProgramForwardOptions<string>>

Returns

Promise<OUT>

Inherited from

AxProgrammable.forward


getChatLog()

TypeScript
getChatLog(): readonly AxChatLogEntry[];

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L424

Returns

readonly AxChatLogEntry[]

Inherited from

AxProgrammable.getChatLog


getId()

TypeScript
getId(): string;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L382

Returns

string

Inherited from

AxProgrammable.getId


getOptimizableComponents()

TypeScript
getOptimizableComponents(): readonly AxOptimizableComponent[];

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L400

Enumerate all string-valued artifacts this program tree exposes for reflective optimization (instructions, signature descriptions, function names/descriptions, agent system prompts, etc.). Composite programs flat-map their children’s components and append their own.

The optimizer never walks the tree — traversal is encapsulated here.

Returns

readonly AxOptimizableComponent[]

Inherited from

AxProgrammable.getOptimizableComponents


getSignature()

TypeScript
getSignature(): AxSignature;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L432

Returns

AxSignature

Inherited from

AxProgrammable.getSignature


getTraces()

TypeScript
getTraces(): AxProgramTrace<IN, OUT>[];

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L384

Returns

AxProgramTrace<IN, OUT>[]

Inherited from

AxProgrammable.getTraces


getUsage()

TypeScript
getUsage(): 
  | AxModelUsage & object[]
  | AxAgentUsage;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L423

Returns

| AxModelUsage & object[] | AxAgentUsage

Inherited from

AxProgrammable.getUsage


namedProgramInstances()?

TypeScript
optional namedProgramInstances(): AxNamedProgramInstance<any, any>[];

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L385

Returns

AxNamedProgramInstance<any, any>[]

Inherited from

AxProgrammable.namedProgramInstances


resetUsage()

TypeScript
resetUsage(): void;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L425

Returns

void

Inherited from

AxProgrammable.resetUsage


setDemos()

TypeScript
setDemos(demos: readonly AxProgramDemos<IN, OUT, string>[], options?: object): void;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L386

Parameters

ParameterType
demosreadonly AxProgramDemos<IN, OUT, string>[]
options?{ modelConfig?: Record<string, unknown>; }
options.modelConfig?Record<string, unknown>

Returns

void

Inherited from

AxProgrammable.setDemos


setId()

TypeScript
setId(id: string): void;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L383

Parameters

ParameterType
idstring

Returns

void

Inherited from

AxProgrammable.setId


streamingForward()

TypeScript
streamingForward(
   ai: Readonly<AxAIService>, 
   values: IN, 
options?: Readonly<AxProgramStreamingForwardOptions<string>>): AxGenStreamingOut<OUT>;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/types.ts#L374

Parameters

ParameterType
aiReadonly<AxAIService>
valuesIN
options?Readonly<AxProgramStreamingForwardOptions<string>>

Returns

AxGenStreamingOut<OUT>

Inherited from

AxProgrammable.streamingForward

Docs