subgraph
inline fun <Input, Output> subgraph(name: String? = null, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: LLModel? = null, llmParams: LLMParams? = null, responseProcessor: ResponseProcessor? = null, define: AIAgentSubgraphBuilderBase<Input, Output>.() -> Unit): AIAgentSubgraphDelegate<Input, Output>(source)
Creates a subgraph with a specified tool selection strategy.
Parameters
name
Optional subgraph name
toolSelectionStrategy
Strategy for tool selection
llmModel
Initial LLM model used in this subgraph
llmParams
Initial LLM prompt parameters used in this subgraph
responseProcessor
Initial optional processor defining the post-processing of messages returned from the LLM.
define
Subgraph definition function
inline fun <Input, Output> subgraph(name: String? = null, tools: List<Tool<*, *>>, llmModel: LLModel? = null, llmParams: LLMParams? = null, responseProcessor: ResponseProcessor? = null, define: AIAgentSubgraphBuilderBase<Input, Output>.() -> Unit): AIAgentSubgraphDelegate<Input, Output>(source)
Creates a subgraph with specified tools.
Parameters
name
Optional subgraph name
tools
List of tools available to the subgraph
llmModel
Initial LLM model used in this subgraph
llmParams
Initial LLM prompt parameters used in this subgraph
responseProcessor
Initial optional processor defining the post-processing of messages returned from the LLM.
define
Subgraph definition function