AIAgentNodeBuilder

open class AIAgentNodeBuilder<Input, Output>(inputType: KType, outputType: KType, execute: suspend AIAgentContextBase.(Input) -> Output) : BaseBuilder<AIAgentNodeBase<Input, Output>> (source)

A builder class for constructing instances of AIAgentNodeBase with specific behavior and attributes.

This class is responsible for managing the configuration of an AI agent node, including its name and execution logic. It provides a mechanism for defining a unit of execution that operates within the context of an AI agent, linking an input type Input to an output type Output.

Parameters

Input

The type of input data the node will process.

Output

The type of output data the node will produce.

inputType

KType of the Input

outputType

KType of the Output

execute

A suspending function to define the execution logic of the node. This function will be called in the scope of AIAgentContextBase, where it has access to the AI agent's context and tools relevant to its operation.

Inheritors

Constructors

Link copied to clipboard
constructor(inputType: KType, outputType: KType, execute: suspend AIAgentContextBase.(Input) -> Output)

Used internally to create a new builder with the provided execution logic.

Properties

Link copied to clipboard
lateinit var name: String

The name of the AI agent node being built.

Functions

Link copied to clipboard
open override fun build(): AIAgentNodeBase<Input, Output>

Builds and returns the instance of type T that has been configured using the builder.