-
Notifications
You must be signed in to change notification settings - Fork 685
docs: Add advanced deployment considerations and lazy initialization pattern for Agent Engine #852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tommyhutcheson
wants to merge
12
commits into
google:main
Choose a base branch
from
tommyhutcheson:documentation-pickle-serialisation-process-&-lazyload-tools
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+126
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yeesian
approved these changes
Nov 6, 2025
Collaborator
yeesian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much!
Author
Hey @yeesian Do I need to do somethuing else to get this one merged in ? |
|
Any timeline on this getting merged? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds documentation for the pickle timing issue when deploying ADK agents to Vertex AI Agent Engine, where environment variables specified in
AdkApp.env_varsare not available during toolset initialisation at import time.Problem
google/adk-python#3208
When deploying agents to Agent Engine, toolsets that read configuration at import time (e.g., using Pydantic
BaseSettings) will use deployment environment values instead of runtime environment values. This causes production agents to fail with incorrect configuration (e.g., connecting to localhost instead of production APIs).Solution Documented
Added comprehensive documentation to
docs/deploy/agent-engine.mdcovering:Changes
Modified Files
docs/deploy/agent-engine.md- Added "Advanced deployment considerations" section (~120 lines)docs/tools/index.md- Added warning callout with link to solutionKey Features
Explains deployment architecture (import time vs runtime)
Provides complete LazyToolsetWrapper pattern implementation
Includes all necessary imports and helper functions
Error handling for missing environment variables
Custom
__reduce__for proper pickle serialisationComplete usage examples for agent definition and deployment
Related
As requested by @surajksharma07 in #3208:
This PR addresses all three points with focused, practical documentation integrated into the existing Agent Engine deployment guide.