Class LoopWorkflow

java.lang.Object
com.example.workflows.LoopWorkflow

public final class LoopWorkflow extends Object
A port of adk-python's loop workflow sample: an agent writes a headline about the user's topic, a second agent grades whether it is about technology, and the workflow loops back with the grader's feedback until it is.
  • 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 each headline and grade. It calls Gemini, so it needs the credentials the README describes; the first argument, if any, overrides the model.