AIAgentGraphStrategyBuilder

class AIAgentGraphStrategyBuilder<TInput, TOutput>(name: String, inputType: TypeToken, outputType: TypeToken, toolSelectionStrategy: ToolSelectionStrategy) : AIAgentSubgraphBuilderBase<TInput, TOutput> , BaseBuilder<AIAgentGraphStrategy<TInput, TOutput>> (source)

A builder class responsible for constructing an instance of AIAgentGraphStrategy. The AIAgentGraphStrategyBuilder serves as a specific configuration for creating AI agent strategies with a defined start and finish node, along with a designated tool selection strategy.

Parameters

name

The name of the strategy being built, serving as a unique identifier.

toolSelectionStrategy

The strategy used to determine the subset of tools available during subgraph execution.

Constructors

Link copied to clipboard
constructor(name: String, inputType: TypeToken, outputType: TypeToken, toolSelectionStrategy: ToolSelectionStrategy)

Properties

Link copied to clipboard
open override val nodeFinish: FinishNode<TOutput>

Represents the "finish" node in the AI agent's subgraph structure. This node indicates the endpoint of the subgraph and acts as a terminal stage where the workflow stops.

Link copied to clipboard
open override val nodeStart: StartNode<TInput>

Represents the starting node of the subgraph in the AI agent's strategy graph.

Functions

Link copied to clipboard
open override fun build(): AIAgentGraphStrategy<TInput, TOutput>

Builds and returns the instance of type T that has been configured using the builder.

Link copied to clipboard
Link copied to clipboard
inline fun <Input, Output, OutputTransformed> AIAgentSubgraphBuilderBase<Input, OutputTransformed>.setupSubgraphWithTask(finishTool: Tool<Output, OutputTransformed>, assistantResponseRepeatMax: Int? = null, noinline defineTask: suspend AIAgentGraphContextBase.(Input) -> String)

Configures a subgraph within the AI agent framework, associating it with required tasks and operations.

inline fun <Input, Output, OutputTransformed> AIAgentSubgraphBuilderBase<Input, OutputTransformed>.setupSubgraphWithTask(finishTool: Tool<Output, OutputTransformed>, runMode: ToolCalls, assistantResponseRepeatMax: Int? = null, noinline defineTask: suspend AIAgentGraphContextBase.(Input) -> String)
fun <Input, Output, OutputTransformed> AIAgentSubgraphBuilderBase<Input, OutputTransformed>.setupSubgraphWithTask(finishTool: Tool<Output, OutputTransformed>, inputType: TypeToken, outputTransformedType: TypeToken, runMode: ToolCalls, assistantResponseRepeatMax: Int? = null, defineTask: suspend AIAgentGraphContextBase.(Input) -> String)

Configures and sets up a subgraph with task handling, including tool execution operations, assistant response management, and task finalization logic.

Link copied to clipboard