graphStrategy
abstract fun <Input, Output> graphStrategy(strategy: AIAgentGraphStrategy<Input, Output>): GraphAgentBuilder<Input, Output>(source)
Configures and returns a GraphAgentBuilder instance using the specified AIAgentGraphStrategy.
The method allows associating an AI agent with a specific graph-based strategy for managing and executing workflows. It provides flexibility to define input and output types specific to the desired strategy.
Return
An instance of GraphAgentBuilder configured with the specified input type, output type, and strategy.
Parameters
Input
The type of input data that the strategy will process.
Output
The type of output data that the strategy will produce.
strategy
The AIAgentGraphStrategy instance defining the workflow, including the start and finish nodes as well as the tool selection strategy.