Add Vertex AI Agent Engine operators (Create, Get, Query, Update, Delete)#68479
Conversation
7efe781 to
36971f7
Compare
SameerMesiah97
left a comment
There was a problem hiding this comment.
This is a large PR so I could only get through part of the diff in one sitting. I have left some comment for you to address.
MaksYermak
left a comment
There was a problem hiding this comment.
@AlejandroMorgante could you please provider a screenshot from Airflow UI that the new example_vertex_ai_agent_engine.py system test pass successfully?
Sure. I validated the same operator lifecycle end-to-end in a real Airflow environment using this DAG: AlejandroMorgante/agentic-airflow-demo@bedf76b It exercises:
All tasks completed successfully:
The DAG uses my real Agent Engine container, so the query payload is adapted to that runtime, but the operator lifecycle is the same as in |
34b8962 to
4747cfc
Compare
|
Quickest fix: git fetch upstream main && git rebase upstream/main
rm uv.lock && uv lock
git add uv.lock && git rebase --continue
git push --force-with-leaseAutomated nudge — ignore if you're not ready to rebase. This comment is updated in place on future |
962d3b2 to
d13b01f
Compare
8473b09 to
3917f29
Compare
SameerMesiah97
left a comment
There was a problem hiding this comment.
I have left some more comments.
e62e21c to
ad80e73
Compare
ad80e73 to
70ede63
Compare
SameerMesiah97
left a comment
There was a problem hiding this comment.
Approved pending green CI.
shahar1
left a comment
There was a problem hiding this comment.
Almost there, last comments to handle from my prespective.
Please take a final look at all files to see that it's good to ship.
Introduces CheckQueryAgentEngineOperator (with deferrable support via AgentEngineQueryJobTrigger) to poll the status of a batch query job started by QueryAgentEngineOperator. Switches QueryAgentEngineOperator from a custom REST call to the SDK's public run_query_job() method, and removes the now-unused internal polling helpers.
… Engine - Move _serialize_value from operators and triggers into the hook module so both import from a single source of truth - Warn on unknown query job status values in wait_for_query_agent_engine_job to surface unexpected API responses instead of silently looping - Add round-trip serialize test for AgentEngineQueryJobTrigger with a Pydantic model config to verify _serialize_value is applied on serialize()
The resources/agent_engine directory only contained a license-header __init__.py and no actual resources, flagged in review.
The system test previously required the agent container image and the query-output bucket to pre-exist in the test project. Review feedback on the PR asked for the test to be atomic, so the image is now built by Cloud Build from sources checked in under resources/agent_engine/ into an Artifact Registry repository scoped to the test run, and both the repository and the bucket are created and deleted by the test itself. Remaining project prerequisites (APIs and IAM for the Cloud Build service account and the Agent Engine service agent) are documented in the Dag docstring.
The prek hook that creates missing init files in test packages generates this file, so CI static checks fail if it is not committed.
02a7adc to
c3fae86
Compare

Add a hook, operators, deferrable trigger support, unit tests, docs, and a system test for the Vertex AI Agent Engine (Reasoning Engine) API.
Operators
CreateAgentEngineOperator- creates a new Agent Engine resource.GetAgentEngineOperator- retrieves an existing Agent Engine.RunQueryJobOperator- starts a query job using the publicrun_query_jobSDK method and can wait for completion, including deferrable mode.UpdateAgentEngineOperator- updates an Agent Engine.DeleteAgentEngineOperator- deletes an Agent Engine, with optional wait support.Review-driven changes
This PR was updated based on review feedback to avoid relying on private SDK helpers and to keep the Airflow task semantics explicit:
run_query_jobAPI.RunQueryJobOperatorsupport for waiting on query jobs and retrieving query output throughcheck_query_job.AgentEngineQueryJobTriggerfor deferrable query-job waiting.Changes
providers/google/cloud/hooks/vertex_ai/agent_engine.py- new Agent Engine hook methods.providers/google/cloud/operators/vertex_ai/agent_engine.py- new Agent Engine operators.providers/google/cloud/triggers/vertex_ai.py- Agent Engine query-job trigger.providers/google/provider.yaml- hook and operator registration.providers/google/get_provider_info.py- matching provider metadata registration.providers/google/docs/operators/cloud/vertex_ai.rst- Agent Engine operator docs.providers/google/tests/system/google/cloud/vertex_ai/example_vertex_ai_agent_engine.py- self-contained Agent Engine lifecycle system test.Validation
Validated end-to-end against a real GCP environment, including create, get, query-job submission, query-job output retrieval, update, and delete flows.
The complete system test can be reproduced from the Airflow checkout with GCP credentials forwarded to Breeze,
SYSTEM_TESTS_GCP_PROJECTconfigured infiles/airflow-breeze-config/environment_variables.env, and a unique environment ID:Latest result:
1 passed in 763.87s. The run exercised both synchronous and deferrable query jobs and completed resource teardown successfully.The latest system test version builds its own agent container and creates its own query-output bucket. It still requires the one-time project setup documented in the system test docstring: enabling Cloud Build and Artifact Registry APIs, granting the Agent Engine service agent access to pull the image and write query output, and ensuring the Cloud Build service account can manage the test Artifact Registry repository.
Real GCP validation screenshots and per-operator logs are attached in the review thread.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Sonnet 4.6) and Codex (GPT-5) following the guidelines