You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent Engine Session / Memory URI Construction Incorrectly Relies on GOOGLE_CLOUD_LOCATION #1760
services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etcwip[Status] This issue is being worked on. Either there is a pending PR or is planned to be fixed
Description:
When constructing the Agent Engine session URI, the ADK fast_api.py module incorrectly assumes that the Agent Engine's location can be reliably derived from os.environ["GOOGLE_CLOUD_LOCATION"]. This assumption leads to issues when the default global region (often associated with Gemini, which uses GOOGLE_CLOUD_LOCATION as a default) does not match the specific region where the Agent Engine session or memory is actually deployed.
Context:
This issue was identified during the integration of AE Managed sessions into Cloud Run ADK deployments.
Current Behavior:
The current implementation implicitly uses os.environ["GOOGLE_CLOUD_LOCATION"] to build parts of the session_service_uri. This forces developers to manually extract the Agent Engine's bare ID from its full resource name when trying to use it, like so:
Expected Behavior:
ADK should allow developers to directly pass the full Agent Engine resource name (e.g., projects/PROJECT_ID/locations/LOCATION/agents/AGENT_ID) to the session_service_uri without relying on os.environ["GOOGLE_CLOUD_LOCATION"] for its internal construction.
Proposed Solution:
Modify the fast_api.py module (specifically around lines 293 and 311) to accept and utilize the full Agent Engine resource name when constructing the session_service_uri, rather than attempting to derive parts of it from os.environ["GOOGLE_CLOUD_LOCATION"].
changed the title [-]Agent Engine Session URI Construction Incorrectly Relies on `GOOGLE_CLOUD_LOCATION`[/-][+]Agent Engine Session / Memory URI Construction Incorrectly Relies on `GOOGLE_CLOUD_LOCATION`[/+]on Jul 9, 2025
services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etcwip[Status] This issue is being worked on. Either there is a pending PR or is planned to be fixed
Activity
eliasecchig commentedon Jul 2, 2025
Adding @DeanChensj
[-]Agent Engine Session URI Construction Incorrectly Relies on `GOOGLE_CLOUD_LOCATION`[/-][+]Agent Engine Session / Memory URI Construction Incorrectly Relies on `GOOGLE_CLOUD_LOCATION`[/+]feat: Support passing fully qualified agent engine resource name when…
feat: Support passing fully qualified agent engine resource name when…
feat: Support passing fully qualified agent engine resource name when…
feat: Support passing fully qualified agent engine resource name when…
feat: Support passing fully qualified agent engine resource name when…
feat: Support passing fully qualified agent engine resource name when…
feat: Support passing fully qualified agent engine resource name when…
feat: Support passing fully qualified agent engine resource name when…
feat: Support passing fully qualified agent engine resource name when…