Session not found in Gemini Enterprise
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.
I am having the same error.
Bug is coming from Agent Engine SDK. Google Engineering team is already addressing this.
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
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
You are right, this commit wasn't picked up yet in 1.128.0:
https://github.com/googleapis/python-aiplatform/commit/d9f6c58a2315352b41cf763646243229a3fe5059
Hi, I am getting this error as well - any known workarounds? do we know what is triggering the error? thanks!
✅ 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.
Thanks, Elia, this works for me
Introduced a temporary patch, so that the registration command will suggest the workaround. Added to version 0.21.2