Replies: 1 comment
-
|
From the screenshot it seems that the agent is behaving correctly. it asked a question and is waiting for answers. once you answer it will call finish_task and continue the workflow. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building a two-step workflow with Google ADK where the first agent gathers a year from the user and produces three historical facts, and the second agent asks the user a quiz question about those facts and grades the answer. Both are
LlmAgentinstances withmode="task"and a Pydanticoutput_schema, wired together in aWorkflow.What I expect: The historian gathers the year (or accepts one the user has already given), calls
finish_taskwith the facts, then the questioner emits its question and waits for the user's answer before grading it viafinish_task.What actually happens: The historian works as expected — it returns a
finish_taskcall with the facts. The questioner then generates the question as a plain text message... and the workflow immediately advances to END without ever waiting for the user to respond. The attached screenshot shows the graph reaching END right after the questioner emits the question, and the question is never followed by afinish_taskcall.Inspecting the logs, the questioner's LLM response is plain text:
and the next log line is:
Both agents receive the same auto-injected task-mode system instruction telling them to call
finish_taskwhen done, so the framework appears to consider both to be in task mode. But only the historian actually invokesfinish_task— the questioner emits a text question instead, and the workflow node exits.Why does task mode work for the first agent but not the second? Is it expected that a task-mode
LlmAgentplaced directly in workflow edges won't pause for user input between turns? If so, what's the right pattern to make the second agent ask a question and wait for the user's reply within aWorkflow?ADK version:
google-adk 2.0.0b1.Beta Was this translation helpful? Give feedback.
All reactions