A node that executes a synchronous R function.
Value
An `AgentLogicNode` object.
Public fields
logic_fn
Function(state) -> List(status, output).
Methods
Method new()
Initialize AgentLogicNode
Arguments
id
Unique identifier.
logic_fn
Function that takes an AgentState object and returns a list.
label
Optional human-readable name.
params
Optional list of parameters.
Run the Logic Node
Method run()
Usage
AgentLogicNode$run(state, ...)
Arguments
state
AgentState object.
...
Additional arguments.
Returns
List with status, output, and metadata.
Method clone()
The objects of this class are cloneable with this method.
Usage
AgentLogicNode$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
node <- AgentLogicNode$new("start", function(state) list(status = "success"))