Class NodeConfig

java.lang.Object
com.google.adk.workflow.NodeConfig

@Experimental public abstract class NodeConfig extends Object
A node's retry policy and execution timeout.
  • Constructor Details

    • NodeConfig

      public NodeConfig()
  • Method Details

    • retryConfig

      public abstract Optional<RetryConfig> retryConfig()
      Returns how the node is retried when it fails; empty does not retry. A retried workflow replays its nodes that finished and left an event in the session, and reruns the others. A failure that a node passes on unchanged from a child it runs with Context.runNode(Node) is not retried; give the child a retry policy of its own instead.
    • timeout

      public abstract Optional<Duration> timeout()
      Returns how long an attempt may run before it is canceled and fails with a NodeTimeoutException; empty imposes no limit. The timeout cancels the attempt and fails it once the FunctionNode bodies, the ToolNodes tool calls that block in runAsync or as they are subscribed, and the Context.runNode children it started have stopped, so a body that ignores the interrupt, or such a tool call, delays the failure and any retry. The limit also covers the wait for work a body left running when it returned, so a node can time out after it sent its output. An LlmAgent node's own tool calls are not waited for.
    • builder

      public static NodeConfig.Builder builder()
    • toBuilder

      public abstract NodeConfig.Builder toBuilder()