subgraph
fun <Input, Output> subgraph(name: String? = null, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, define: AIAgentSubgraphBuilderBase<Input, Output>.() -> Unit): AIAgentSubgraphDelegateBase<Input, Output>(source)
Creates a subgraph with specified tool selection strategy.
Parameters
name
Optional subgraph name
toolSelectionStrategy
Strategy for tool selection
define
Subgraph definition function
fun <Input, Output> subgraph(name: String? = null, tools: List<Tool<*, *>>, define: AIAgentSubgraphBuilderBase<Input, Output>.() -> Unit): AIAgentSubgraphDelegateBase<Input, Output>(source)
Creates a subgraph with specified tools.
Parameters
name
Optional subgraph name
tools
List of tools available to the subgraph
define
Subgraph definition function