FullAgentEdgeBuilder

A builder class for constructing a specialized edge in an AI agent strategy graph. This edge enables data flow between two nodes while supporting a composition of the output transformation logic.

Parameters

IncomingOutput

The type of input data from the fromNode.

IntermediateOutput

The type of processed data output by the forwardOutputComposition function.

OutgoingInput

The type of input data expected by the toNode.

fromNode

The source node in the strategy graph. This node produces the input data.

toNode

The destination node in the strategy graph. This node consumes the transformed data.

forwardOutputComposition

A suspendable function that transforms the output of the fromNode into an intermediate format before passing it to the toNode. The transformation output is represented as an Option type, allowing for optional chaining and flexibility in data flow.

Inheritors

Functions

Link copied to clipboard

Applies a contextual condition to filter the output being processed and forwarded within the graph.

Attaches a condition that filters intermediate outputs before they are propagated to the target node within the agent's processing graph.

Link copied to clipboard
open fun <CompatibleOutput : OutgoingInput> onIsInstance(clazz: ERROR CLASS: Symbol not found for Class<CompatibleOutput>): CompatibleFullAgentEdgeBuilder<IncomingOutput, CompatibleOutput, OutgoingInput>

Filters intermediate outputs to only process those that are instances of the specified class type.

open fun <OutputSubtype : IntermediateOutput> onIsInstance(clazz: ERROR CLASS: Symbol not found for Class<OutputSubtype>): FullAgentEdgeBuilder<IncomingOutput, OutputSubtype, OutgoingInput>

Filters the outputs of the current processing edge based on their type, forwarding only those that are instances of the specified class.