Skip to content

When using VertexAiSessionService, streaming audio applications become unusable due to excessive HTTP traffic. #2162

@frankfarzan

Description

@frankfarzan

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

Describe the bug
When using VertexAiSessionService, streaming audio applications become unusable due to excessive HTTP traffic. During streaming scenarios, every event generated results in an immediate HTTP call to the Vertex AI session service (reasoningEngines/{id}/sessions/{session_id}:appendEvent), creating a very chatty communication pattern that introduces significant latency and network overhead.

To Reproduce
Steps to reproduce the behavior:
2. Configure VertexAiSessionService:

session_service = VertexAiSessionService("PROJECT_ID", "LOCATION")
runner = adk.Runner(
    agent=root_agent,
    app_name=app_name,
    session_service=session_service
)
  1. Start any streaming session with audio modality with run_live
  2. Observe network traffic showing frequent HTTP POST requests to the session service
  3. Experience degraded performance

Expected behavior
Streaming applications should have optimized session management that doesn't create excessive network chatter. The session service should either batch events, buffer them, or use other optimization strategies to minimize HTTP calls during high-frequency streaming scenarios.

In addition, for our use case specifically, persisting audio blobs to session is not useful. We only care about persisting transcribed input/output text. There should be a way to filter audio out as well. But note that even if only persisting text, the performance degradation is a problem.

Desktop (please complete the following information):

  • OS: macOS 24.5.0 (darwin)
  • Python version(python -V): Python 3.13.4
  • ADK version(pip show google-adk): 1.6.1

Model Information:
gemini-live-2.5-flash-preview-native-audio

Metadata

Metadata

Assignees

Labels

bot triaged[Bot] This issue is triaged by ADK botservices[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions