Class RouteWorkflow

java.lang.Object
com.example.workflows.RouteWorkflow

public final class RouteWorkflow extends Object
A port of adk-python's route workflow sample: an agent classifies the user's input as a question, a statement, or something else, and a node routes it to the agent or node that handles that category.
  • Method Details

    • create

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

      public static void main(String[] args)
      Runs the workflow on a question, a statement, and a request, each in its own session, and prints each reply. It calls Gemini, so it needs the credentials the README describes; the first argument, if any, overrides the model.