Class ParallelWorkerWorkflow

java.lang.Object
com.example.workflows.ParallelWorkerWorkflow

public final class ParallelWorkerWorkflow extends Object
A port of adk-python's parallel_worker workflow sample: an agent lists three topics related to the user's topic, a function node uppercases each one, an agent explains how each relates to the original topic, and a last node joins the explanations. The two middle nodes are parallel workers, which run once per item of their list input, concurrently.
  • Method Details

    • create

      public static Workflow create(String model)
      Builds the workflow, with both agents on model.
    • main

      public static void main(String[] args)
      Runs the workflow on one topic and prints what each node produced. It calls Gemini, so it needs the credentials the README describes; the first argument, if any, overrides the model.