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

async_stream_query not returning complete response

Open sidtandon2014 opened this issue 3 weeks ago • 0 comments

I am trying to access an agent (with multiple tools) deployed on Agent Engine and using following code to query the remote engine but it is returning partial response

client = vertexai.Client(
    project=PROJECT_ID,
    location=LOCATION,
)

# Get a reference to the deployed agent
resource_name = f"projects/{PROJECT_ID}/locations/{LOCATION}/reasoningEngines/{RESOURCE_ID}"
adk_app = client.agent_engines.get(name=resource_name)

session = await adk_app.async_create_session(user_id="eval-user")

events =[]
# Stream the query to the agent
async for event in adk_app.async_stream_query(
    user_id="eval-user",
    session_id=session["id"],  # Optional
    message="my message",
):
  events.append(event)

To Reproduce

Steps to reproduce the behavior:

  1. Deploy the agent on agent engine
  2. query the remote agent using async_stream_query
  3. Its returning partial response i.e. first LLM call where model is suggesting to call the tool, without tool being actually called

Expected behavior

The entire trajectory should be present tool call, tool response, LLM answer generation

Versions

  • OS: Linux
  • ADK version: 1.16
  • Python version: 3.13

sidtandon2014 avatar Nov 10 '25 09:11 sidtandon2014