Class Workflow.Builder

java.lang.Object
com.google.adk.workflow.Workflow.Builder
Enclosing class:
Workflow

public static final class Workflow.Builder extends Object
Builder for Workflow. Only the name is required. Unlike other nodes, a workflow reruns from scratch when resumed unless rerunOnResume turns that off.
  • Method Details

    • name

      @CanIgnoreReturnValue public Workflow.Builder name(String name)
    • edges

      @CanIgnoreReturnValue public Workflow.Builder edges(List<Edge> edges)
    • edges

      @CanIgnoreReturnValue public Workflow.Builder edges(Edge... edges)
    • description

      @CanIgnoreReturnValue public Workflow.Builder description(String description)
    • maxConcurrency

      @CanIgnoreReturnValue public Workflow.Builder maxConcurrency(int maxConcurrency)
      Sets the maximum number of nodes to run at once, which must be at least 1. A workflow without one has no limit.
    • rerunOnResume

      @CanIgnoreReturnValue public Workflow.Builder rerunOnResume(boolean rerunOnResume)
    • waitForOutput

      @CanIgnoreReturnValue public Workflow.Builder waitForOutput(boolean waitForOutput)
    • config

      @CanIgnoreReturnValue public Workflow.Builder config(NodeConfig config)
    • inputSchema

      @CanIgnoreReturnValue public Workflow.Builder inputSchema(@Nullable com.google.genai.types.Schema inputSchema)
    • outputSchema

      @CanIgnoreReturnValue public Workflow.Builder outputSchema(@Nullable com.google.genai.types.Schema outputSchema)
    • stateSchema

      @CanIgnoreReturnValue public Workflow.Builder stateSchema(@Nullable com.google.genai.types.Schema stateSchema)
    • build

      public Workflow build()