Class SequenceWorkflow

java.lang.Object
com.example.workflows.SequenceWorkflow

public final class SequenceWorkflow extends Object
A port of adk-python's sequence workflow sample: one agent names a random fruit, and the next agent receives that answer as its input and tells a health benefit of the fruit.
  • 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 once and prints each agent's answer. It calls Gemini, so it needs the credentials the README describes; the first argument, if any, overrides the model.