adk-docs
adk-docs copied to clipboard
async_stream_query not returning complete response
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:
- Deploy the agent on agent engine
- query the remote agent using async_stream_query
- 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