Skip to content

feat: add support for updating existing Agent Engine instances#755

Open
hanorik wants to merge 3 commits intogoogle:mainfrom
hanorik:agent_engine_deployment
Open

feat: add support for updating existing Agent Engine instances#755
hanorik wants to merge 3 commits intogoogle:mainfrom
hanorik:agent_engine_deployment

Conversation

@hanorik
Copy link
Copy Markdown
Contributor

@hanorik hanorik commented Apr 24, 2026

This PR introduces the ability to update an existing Vertex AI Reasoning Engine (Agent Engine) instance using the adkgo deployment tool, removing the need to always deploy a new instance when changes are made.

Key Changes

  • CLI Flags: Added two new persistent flags to the agentEngine deployment command:

    • --update: A boolean flag to trigger the update workflow.
    • --instance_name: Specifies the full resource name of the Agent Engine instance to update (required if --update is set).
  • Update Workflow: Implemented gcloudUpdateAgentEngine() to handle the update process:

    • Automatically extracts the GCP region from the provided --instance_name to set up the correct regional endpoint.
    • Packs and uploads the updated source code archive.
    • Retrieves and registers available class methods via ListClassMethods to ensure the instance specification matches the code.
    • Utilizes a FieldMask (spec.source_code_spec, spec.class_methods) to selectively update the instance via the aiplatform client.
  • Deployment Logic: Updated deployOnagentEngine to route to the update logic when the flags are present.

@hanorik hanorik requested a review from kdroste-google April 24, 2026 14:17
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the capability to update an existing Agent Engine instance by adding --update and --instance_name flags to the deployment command. It implements the gcloudUpdateAgentEngine method, which utilizes the ReasoningEngineClient to update the source code and class methods of a specified instance. A review comment suggests that the update request should also include DeploymentSpec and AgentFramework fields to ensure consistency with the creation logic and to correctly manage environment variables and framework identifiers.

Comment thread cmd/adkgo/internal/deploy/agentengine/agentengine.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant