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

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Represents the "finish" node in the AI agent's subgraph structure. This node indicates the endpoint of the subgraph and acts as a terminal stage where the workflow stops.

Link copied to clipboard
abstract val nodeStart: StartNode<Input>

Represents the starting node of the subgraph in the AI agent's strategy graph.

Functions

Link copied to clipboard
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