AIAgentNodeDelegate

A delegate for creating and managing an instance of AIAgentNodeBase.

This class simplifies the instantiation and management of AI agent nodes. It leverages property delegation to lazily initialize a node instance using a given AIAgentNodeBuilder. The node's name can either be explicitly provided or derived from the delegated property name.

Parameters

Input

The type of input data the delegated node will process.

Output

The type of output data the delegated node will produce.

name

The optional name of the node. If not provided, the name will be derived from the property to which the delegate is applied.

nodeBuilder

The builder used to construct the AIAgentNodeBase instance for this delegate.

Constructors

Link copied to clipboard
constructor(name: String?, nodeBuilder: AIAgentNodeBuilder<Input, Output>)

Initializes the delegate with the provided node name and builder.

Functions

Link copied to clipboard
operator fun getValue(thisRef: Any?, property: KProperty<*>): AIAgentNodeBase<Input, Output>

Retrieves an instance of AIAgentNodeBase associated with the given property. This operator function acts as a delegate to dynamically provide a reference to an AI agent node.