adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

[Live] The agent does not process the question after the transfer to the agent.

Open NikitaZemtsov opened this issue 1 year ago • 2 comments

My agent structure: orchestrator model gemini-2.5-flash-preview-native-audio-dialog mode Audio it has two subagents planner and fallback agent. I run it through run_live. I ask a question (audio), Orchestrator calls transfer_to_agent, transferring the right to answer to the fallback agent. The function executes successfully, but the agent is silent. If I repeat the question, it may start answering, but not always. I saw in logs "no content is sent" see img. I did everything according to the example.

Image

There is one more problem that may be related. I start the agent in the same way, but I send the question in Text format via send_content(content=content) Orchestrator calls transfer_to_agent, transferring the right to answer fallback agent. The agent doesn't respond. I send the same message again, the Agent replies “How can I help you?”. And after sending a third same message, the agent starts responding. With a text message, the repeatability is 10/10.

NikitaZemtsov avatar Jul 21 '25 12:07 NikitaZemtsov

My agent structure: orchestrator model gemini-2.5-flash-preview-native-audio-dialog mode Audio it has two subagents planner and fallback agent. I run it through run_live. I ask a question (audio), Orchestrator calls transfer_to_agent, transferring the right to answer to the fallback agent. The function executes successfully, but the agent is silent. If I repeat the question, it may start answering, but not always. I saw in logs "no content is sent" see img. I did everything according to the example.

Image There is one more problem that may be related. I start the agent in the same way, but I send the question in Text format via send_content(content=content) Orchestrator calls transfer_to_agent, transferring the right to answer fallback agent. The agent doesn't respond. I send the same message again, the Agent replies “How can I help you?”. And after sending a third same message, the agent starts responding. With a text message, the repeatability is 10/10.

UPD:

@hangfei The problem seems to be that executable_code, function_call and function_response events fall under the transcription_cache condition and are created as transcription_cache although they are not.

Image

Therefore, further down the chain they fall under another condition and after filtering there is no content to send to the agent. But my next message is already sent directly to the agent and I get a response.

Image

Adding additional conditions is enough to make it work properly.

if (
  event.content
  and event.content.parts
  and event.content.parts[0].inline_data is None
  and not event.partial
  and event.content.parts[0].executable_code is None
  and event.content.parts[0].function_call is None
  and event.content.parts[0].function_response is None
  ):

NikitaZemtsov avatar Jul 22 '25 00:07 NikitaZemtsov

This should be fixed now as all data are in session now. It's passed over to next agent during transfer. Please give it a try.

hangfei avatar Nov 08 '25 15:11 hangfei