AIAgentSubgraphBuilderBase
Abstract base class for building AI agent subgraphs.
This class provides utilities for defining and connecting nodes within a subgraph, constructing custom subgraphs with specified tools or tool selection strategies, and managing the structural relationships between subgraph nodes.
Type Parameters
Input
The input type expected by the starting node of the subgraph.
Output
The output type produced by the finishing node of the subgraph.
Inheritors
Properties
Functions
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>, assistantResponseRepeatMax: Int? = null, noinline defineTask: suspend AIAgentGraphContextBase.(Input) -> String)
Configures a subgraph within the AI agent framework, associating it with required tasks and operations.
inline fun <Input, Output, OutputTransformed> AIAgentSubgraphBuilderBase<Input, OutputTransformed>.setupSubgraphWithTask(finishTool: Tool<Output, OutputTransformed>, runMode: ToolCalls, 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, runMode: ToolCalls, 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.