node

fun <Input, Output> node(name: String? = null, execute: suspend AIAgentContextBase.(input: Input) -> Output): AIAgentNodeDelegateBase<Input, Output>(source)

Defines a new node in the agent's stage, representing a unit of execution that takes an input and produces an output.

Parameters

name

An optional name for the node. If not provided, the property name of the delegate will be used.

execute

A suspendable function that defines the node's execution logic.