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
Functions
Link copied to clipboard
Builds and returns the instance of type T that has been configured using the builder.
Link copied to clipboard
fun <IncomingOutput, OutgoingInput, CompatibleOutput : OutgoingInput> edge(edgeIntermediate: AIAgentEdgeBuilderIntermediate<IncomingOutput, CompatibleOutput, OutgoingInput>)
Creates an edge between nodes.
Link copied to clipboard
inline fun <Input, Output, OutputTransformed> AIAgentSubgraphBuilderBase<Input, OutputTransformed>.setupSubgraphWithTask(finishTool: Tool<Output, OutputTransformed>, parallelTools: Boolean, 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, parallelTools: Boolean, 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
infix fun <IncomingOutput, OutgoingInput, OutgoingOutput> AIAgentNodeBase<IncomingOutput, OutgoingInput>.then(nextNode: AIAgentNodeBase<OutgoingInput, OutgoingOutput>): AIAgentNodeBase<OutgoingInput, OutgoingOutput>
Connects the sequence of nodes with edges between them.