Skip to content

AgentEngine async_stream_query not working as expected. Only returns first few events. #3003

Description

@sentheesh-cts

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Describe the bug
I'm trying to invoke the AgentEngine using vertexAI sdk for python. My root agent calls multiple agents in sequence. When I invoke async_stream_query passing the input, it returns only the first 3 events out of 27 events.

To Reproduce
agent = agent_engines.get("projects/PROJECT_ID/locations/LOCATION/reasoningEngines/RESOURCE_ID")

async for response in agent.async_stream_query(
input="case_id"
):
print(response)

Expected behavior
This method should return all events asynchronously

Desktop (please complete the following information):

  • OS:
  • Python version(python -V): 3.12.5
  • ADK version(pip show google-adk):1.13.0

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: gemini-2.5-pro

Metadata

Metadata

Labels

agent engine[Component] This issue is related to Vertex AI Agent Engine

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions