Class SingleTurnSubAgentDemo
java.lang.Object
com.example.workflows.SingleTurnSubAgentDemo
A port of ADK Kotlin's single-turn sub-agent sample, which ports adk-python's
single_turn_sub_agent. A phone sales assistant turns the user's request into structured
preferences and calls a single-turn sub-agent, which checks prices with a tool and returns a
structured recommendation without talking to the user. Unlike an AgentTool, the
sub-agent's tool calls stay in the session history.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMock price list that the recommender queries through a tool. -
Method Summary
-
Method Details
-
create
-
main
Runs one recommendation request 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.
-