TypedGraphStrategyBuilder
class TypedGraphStrategyBuilder<Input : Any, Output : Any>(strategyName: String, inputClass: KClass<Input>, outputClass: KClass<Output>, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, builder: AIAgentGraphStrategyBuilder<Input, Output> = AIAgentGraphStrategyBuilder(
strategyName,
typeToken(inputClass),
typeToken(outputClass),
toolSelectionStrategy
), edgeBuilders: MutableList<AIAgentGraphStrategyBuilder<Input, Output>.() -> Unit> = mutableListOf())(source)
Builder class used for constructing and configuring an AIAgentGraphStrategy.
Parameters
strategyName
The name of the strategy being built.
Type Parameters
Input
The type of the input entity.
Output
The type of the output entity.
Constructors
Link copied to clipboard
constructor(strategyName: String, inputClass: KClass<Input>, outputClass: KClass<Output>, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, builder: AIAgentGraphStrategyBuilder<Input, Output> = AIAgentGraphStrategyBuilder(
strategyName,
typeToken(inputClass),
typeToken(outputClass),
toolSelectionStrategy
), edgeBuilders: MutableList<AIAgentGraphStrategyBuilder<Input, Output>.() -> Unit> = mutableListOf())
Properties
Functions
Link copied to clipboard
Builds and returns an instance of AIAgentGraphStrategy configured with the specified parameters, input/output types, and edge builders.
Link copied to clipboard
fun <IncomingOutput, OutgoingInput> edge(edge: AIAgentEdge<IncomingOutput, OutgoingInput>): TypedGraphStrategyBuilder<Input, Output>
Adds an edge to the graph strategy using the provided AIAgentEdge.
fun <OutgoingInput, CompatibleOutput : OutgoingInput> edge(from: AIAgentNodeBase<*, CompatibleOutput>, to: AIAgentNodeBase<OutgoingInput, *>): TypedGraphStrategyBuilder<Input, Output>
Adds an edge to the graph strategy, connecting two nodes with a compatible data flow between them.
Link copied to clipboard
fun withToolSelectionStrategy(strategy: ToolSelectionStrategy): TypedGraphStrategyBuilder<Input, Output>
Configures the strategy for selecting tools to be used in the current graph strategy builder.