Class InputOutputSchemaDemo

java.lang.Object
com.example.workflows.InputOutputSchemaDemo

public final class InputOutputSchemaDemo extends Object
A port of ADK Kotlin's input and output schema sample, which ports adk-python's input_output_schema. A weather agent with input and output schemas runs in single-turn mode, so its parent can call it as a tool that takes a city and returns structured weather information.
  • Method Details

    • create

      public static Workflow create(String model)
      Builds a workflow with the weather concierge as its only node, running both agents on model. A single-turn sub-agent runs as a tool only when its parent runs as a workflow node.
    • main

      public static void main(String[] args)
      Asks about three cities in separate sessions and prints each message and tool call. It calls Gemini and requires the credentials described in the README; the first argument, if any, overrides the model.