SimpleAIAgentNodeImpl
Represents a simple implementation of an AI agent node within a graph-based structure.
This class facilitates the execution of a computation node, receiving an input of type TInput and producing an output of type TOutput. It is designed to be used within an AI agent graph context.
Type Parameters
The type of the input data this node accepts.
The type of the output data this node produces.
Inheritors
Properties
The directed edges connecting this node to other nodes in the AI agent strategy graph. Each edge defines the flow and optional transformation of output data from this node to another.
A suspendable lambda function that defines the execution logic of the node. It operates in the context of an AIAgentGraphContextBase, taking an input of type TInput and producing an output of type TOutput.
The TypeToken representing the type of output produced by the node.
Functions
Adds a directed edge from the current node, enabling connections between this node and other nodes in the AI agent strategy graph.
Executes a specific operation based on the given context and input.
Executes the node operation using the provided execution context and input, bypassing static type checks. This method internally performs an unchecked cast of input to TInput and delegates to execute. The caller is responsible for ensuring that input is actually assignable to TInput; otherwise a ClassCastException may be thrown at the call site or later during execution.
Creates a directed edge from this AIAgentNodeBase to another AIAgentNodeBase, allowing data to flow from the output of the current node to the input of the specified node.
Resolves the edge associated with the provided node output and execution context. Iterates through available edges and identifies the first edge that can successfully process the given node output within the provided context. If a resolvable edge is found, it returns a ResolvedEdge containing the edge and its output. Otherwise, returns null.