Class AgentInWorkflow
java.lang.Object
com.example.workflows.AgentInWorkflow
A port of ADK Kotlin's agent-in-workflow sample, which ports adk-python's
agent_in_workflow workflow sample, a medical lab intake. A task agent chats with the patient
until it has their name and phone number, and a function node checks them and sends the patient
back to the agent when it finds no records. A single-turn agent then looks up the patient's
orders with a tool that waits for the user to approve the call.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA mock lab system that looks up a patient's orders. -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkflowBuilds the workflow, with both agents onmodel.static voidRuns the workflow in two sessions and prints each message and tool call: in one, a patient gives an unknown name, then Jane Doe's details, and approves the orders lookup; in the other, Jane Doe declines it.
-
Method Details
-
create
-
main
Runs the workflow in two sessions and prints each message and tool call: in one, a patient gives an unknown name, then Jane Doe's details, and approves the orders lookup; in the other, Jane Doe declines it. It calls Gemini, so it needs the credentials the README describes; the first argument, if any, overrides the model.
-