agent-starter-pack icon indicating copy to clipboard operation
agent-starter-pack copied to clipboard

Session not found in Gemini Enterprise

Open Yorko opened this issue 2 months ago • 9 comments

Description When deploying the basic ADK agent with Agent Starter Pack, the agent works in Agent Engine but not in Gemini Enterprise.

Error Details

ValueError: Session not found: temp_session_HASH

(in other deployments also noticed "async_generator object is not iterable.")

Steps to Reproduce:

  • Download the agent starter pack
  • Create a template ADK agent with uvx agent-starter-pack create NAME
  • Deploy using make deploy
  • Verify deployment succeeds and ReasoningEngine is created (check deployment_metadata.json)
  • Test the deployed agent in the playground, make sure it works fine
  • Link the agent to Gemini Enterprise with make register-gemini-enterprise
  • Make sure it fails in the Gemini Enterprise
  • Check Cloud Logs filtering for specific ReasoningEngine ID.

Tested with us-central1, Python version: 3.11.11, google-adk==1.18.0, google-cloud-aiplatform[agent_engines,adk]==1.126.1

✅ Temporary Workaround Available

In your project, upgrade to the latest SDK from git:

uv add "google-cloud-aiplatform[adk,agent_engines] @ git+https://github.com/googleapis/python-aiplatform.git"

The rerun deployment e.g make deploy This will be included in the next PyPI release (>1.128.0) - early dec. No code changes needed in agent-starter-pack - users just need the SDK update.

Yorko avatar Nov 13 '25 15:11 Yorko

I am having the same error.

rom2019 avatar Nov 17 '25 03:11 rom2019

Bug is coming from Agent Engine SDK. Google Engineering team is already addressing this.

eliasecchig avatar Nov 18 '25 19:11 eliasecchig

This is now fixed as "google-cloud-aiplatform>=1.128.0" introduced the fix.

All new samples should be working. For previous samples, please updated the version e.g uv add google-cloud-aiplatform>=1.128.0

eliasecchig avatar Nov 20 '25 13:11 eliasecchig

Hi @eliasecchig, sorry to spoil the party but it's still showing the same "session not found" error.

I've created a new agent from scratch as outlined in the issue description

[[package]]
name = "google-adk"
version = "1.18.0"
source = { registry = "https://pypi.org/simple" }
...

[[package]]
name = "google-cloud-aiplatform"
version = "1.128.0"
source = { registry = "https://pypi.org/simple" }

Python version: 3.13.2

Yorko avatar Nov 20 '25 14:11 Yorko

You are right, this commit wasn't picked up yet in 1.128.0:

https://github.com/googleapis/python-aiplatform/commit/d9f6c58a2315352b41cf763646243229a3fe5059

eliasecchig avatar Nov 22 '25 15:11 eliasecchig

Hi, I am getting this error as well - any known workarounds? do we know what is triggering the error? thanks!

alvarossl avatar Nov 24 '25 17:11 alvarossl

✅ Temporary Workaround Available

In your project, upgrade to the latest SDK from git:

uv add "google-cloud-aiplatform[adk,agent_engines] @ git+https://github.com/googleapis/python-aiplatform.git"

The rerun deployment e.g make deploy

This will be included in the next PyPI release (>1.128.0) - early dec. No code changes needed in agent-starter-pack - users just need the SDK update.

eliasecchig avatar Nov 25 '25 22:11 eliasecchig

Thanks, Elia, this works for me

Yorko avatar Nov 26 '25 11:11 Yorko

Introduced a temporary patch, so that the registration command will suggest the workaround. Added to version 0.21.2

eliasecchig avatar Nov 26 '25 15:11 eliasecchig