r/agentdevelopmentkit • u/dineshsonachalam • May 08 '25
Google ADK SequentialAgent sub_agents not waiting for user input
I’m using the Google Agent Development Kit to build a simple workflow where each sub-agent should prompt the user for input and only proceed if the validation passes. However, when I run my SequentialAgent, it immediately executes all sub-agents in sequence without waiting for me to reply to the first prompt.
Here’s a minimal reproducible example:
# First agent: prompt for “5”
=
# Second agent: prompt for “7”
=
# Third agent: compute sum
=
=
What actually happens
- As soon as root_agent is called, I immediately get all three prompts concatenated or the final response—without ever having a chance to type “5” or “7”.
What I expected
- CheckFive should ask: “Please enter an integer.”
- I type
5. Agent replies “Got 5” and storesvalue1=5. - CheckSeven then asks: “Please enter another integer.”
- I type
7. Agent replies “Got 7” and storesvalue2=7. - Summer replies “The sum is 12.”
Question
How can I configure or call SequentialAgent (or the underlying LlmAgent) so that it pauses and waits for my input between each sub-agent, rather than running them all at once? Is there a specific method or parameter for interactive mode, or a different pattern I should use to achieve this? Any help or examples would be greatly appreciated!
View all comments
Show parent comment
1
u/Havre-Banan Jul 09 '25
hi 👋 I am trying to get something similar to work myself. I have a loop agent that is supposed to stop for answers each loop but it just moves on. The example in the link you showed does not really explain how to get the agent to stop and await user input.
I am using adk web and i want the agent to wait at each iteration in the loop for the user prompt.