async_stream_query not returning complete response
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 1.3k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 34
Description
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
Contributor guide
Assessment
This issue has not been assessed yet.