Interface Node
- All Known Implementing Classes:
BaseAgent, BaseNode, JoinNode, LlmAgent, LoopAgent, ParallelAgent, PlannerAgent, RemoteA2AAgent, SequentialAgent, Start, Workflow
public interface Node
A unit of work in a workflow graph. Node names must be unique within a graph. Every member except
name() and description() is experimental, so implementing this interface is too.-
Method Summary
Modifier and TypeMethodDescriptiondefault NodeConfigconfig()Returns the node's retry policy and execution timeout.default StringReturns what the node does, for humans and for a model that may call it.default Optional<com.google.genai.types.Schema> Returns the schema the node's input must match.name()Returns the name that identifies the node within its graph.default Optional<com.google.genai.types.Schema> Returns the schema that the node's output value must match.default booleanReturnstrueif the node runs only once every predecessor has completed, receiving all their outputs keyed by node name, as a fan-in node does.default booleanReturnstrueif a resumed node runs again from scratch, rather than completing with the resuming answer as its output.io.reactivex.rxjava3.core.Flowable<?> Runs the node onnodeInput, the output it receives from its predecessors.default Optional<com.google.genai.types.Schema> Returns the schema declaring the state keys the node uses.default booleanReturnstrueif the node stays re-triggerable until it produces an output or a route, instead of completing when its run completes.
-
Method Details
-
name
String name()Returns the name that identifies the node within its graph. -
description
Returns what the node does, for humans and for a model that may call it. -
rerunOnResume
Returnstrueif a resumed node runs again from scratch, rather than completing with the resuming answer as its output. -
waitForOutput
Returnstrueif the node stays re-triggerable until it produces an output or a route, instead of completing when its run completes. -
config
Returns the node's retry policy and execution timeout. -
inputSchema
Returns the schema the node's input must match. -
outputSchema
Returns the schema that the node's output value must match. The content of a message-as-output event is not checked against this schema. -
stateSchema
Returns the schema declaring the state keys the node uses. Child nodes inherit it unless they declare their own. -
requiresAllPredecessors
Returnstrueif the node runs only once every predecessor has completed, receiving all their outputs keyed by node name, as a fan-in node does. -
runNode
@Experimental io.reactivex.rxjava3.core.Flowable<?> runNode(Context context, @Nullable Object nodeInput) Runs the node onnodeInput, the output it receives from its predecessors.An emitted
Eventpasses through, and any other emitted value becomes the node's output (at most one per run); emit nothing for no output, since RxJava forbids null. The wildcard lets an implementation return aFlowableof its own type.
-