🔴 Required Information
Describe the Bug:
An Agent Engine deployed with adk deploy agent_engine is not provisioned
with the long-running query API (reasoningEngines:asyncQuery, a.k.a.
AsyncQueryReasoningEngine / durable query jobs). The engine comes up and serves
synchronous traffic fine, but any call to the :asyncQuery REST endpoint is
rejected server-side with:
FAILED_PRECONDITION: The reasoning engine resource [...] does not support
AsyncQueryReasoningEngine API.
adk deploy should provision engines that support :asyncQuery. Today only the
programmatic vertexai.agent_engines.create(...) path yields an async-query-capable
engine; an engine created by adk deploy cannot be upgraded in place, so any agent
that relies on durable/long-running query jobs simply cannot be deployed via the
ADK CLI. Treating this as a bug rather than a missing feature: adk deploy is the
documented happy path and it silently produces an engine that's missing a
first-class Agent Engine capability.
Relevant code in src/google/adk/cli/cli_deploy.py (v2.2.0):
- The agent_engine deploy path creates the engine with default config
(client.agent_engines.create()), then client.agent_engines.update(...) with
agent_config['class_methods'] = _AGENT_ENGINE_CLASS_METHODS.
_AGENT_ENGINE_CLASS_METHODS only registers methods with api_mode of
'' (sync), async, stream, and async_stream. No method registers the
long-running async-query/job API, and nothing in the deploy request opts the
engine into the AsyncQueryReasoningEngine capability — so the provisioned
engine never supports :asyncQuery.
Steps to Reproduce:
-
Create a trivial agent package sample_agent/:
sample_agent/__init__.py
sample_agent/agent.py
from google.adk.agents import LlmAgent
root_agent = LlmAgent(
name="hello_agent",
model="gemini-2.0-flash",
instruction="Reply with exactly: 'hello from the sample agent'.",
)
sample_agent/requirements.txt
google-adk==2.2.0
# adk 2.2.0's generated container launches `adk api_server --a2a`, which
# imports `a2a.server.apps` (only present in a2a-sdk 0.3.x; 1.x removed it).
# Pin so the container actually starts and we can reach the asyncQuery test.
a2a-sdk[http-server]==0.3.25
-
Deploy with the ADK CLI:
adk deploy agent_engine \
--project=YOUR_PROJECT --region=us-central1 \
--display_name=asyncquery_repro \
sample_agent
Note the created resource name, e.g.
projects/.../locations/us-central1/reasoningEngines/ENGINE_ID.
-
Confirm the engine is healthy — synchronous :query returns HTTP 200:
ENGINE="projects/YOUR_PROJECT/locations/us-central1/reasoningEngines/ENGINE_ID"
TOKEN=$(gcloud auth application-default print-access-token)
curl -s -X POST \
-H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" \
-H "x-goog-user-project: YOUR_PROJECT" \
"https://us-central1-aiplatform.googleapis.com/v1beta1/${ENGINE}:query" \
-d '{"classMethod":"async_create_session","input":{"user_id":"repro"}}' \
-w "\nHTTP_STATUS:%{http_code}\n"
# -> HTTP_STATUS:200, session created
-
Call the long-running query API :asyncQuery on the same engine:
BUCKET=your-gcs-bucket
echo '{"class_method":"async_stream_query","input":{"user_id":"repro","message":"hi"}}' \
> /tmp/asyncq_input.json
gcloud storage cp /tmp/asyncq_input.json "gs://${BUCKET}/asyncq-repro/input.json"
curl -s -X POST \
-H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" \
-H "x-goog-user-project: YOUR_PROJECT" \
"https://us-central1-aiplatform.googleapis.com/v1beta1/${ENGINE}:asyncQuery" \
-d "{\"inputGcsUri\":\"gs://${BUCKET}/asyncq-repro/input.json\",\"outputGcsUri\":\"gs://${BUCKET}/asyncq-repro/out/\"}" \
-w "\nHTTP_STATUS:%{http_code}\n"
Expected Behavior:
An engine provisioned by adk deploy agent_engine supports :asyncQuery, so the
durable/long-running query job is accepted (returns an LRO) — the same capability
you get from vertexai.agent_engines.create(...).
Observed Behavior:
:query works (HTTP 200), but :asyncQuery on the same engine fails:
{
"error": {
"code": 400,
"message": "The reasoning engine resource [projects/.../reasoningEngines/ENGINE_ID] does not support AsyncQueryReasoningEngine API.",
"status": "FAILED_PRECONDITION"
}
}
Environment Details:
- ADK Library Version (pip show google-adk): 2.2.0
- Desktop OS: Linux
- Python Version (python -V): 3.11
Model Information:
- Are you using LiteLLM: No
- Which model is being used: gemini-2.0-flash (irrelevant; this is a deploy/provisioning issue)
🟡 Optional Information
Suggested fix:
Have the adk deploy agent_engine path provision an async-query-capable engine —
e.g. register the long-running query method / set the capability in the
create/update request so the backing infrastructure for AsyncQueryReasoningEngine
(:asyncQuery) is wired up, matching what vertexai.agent_engines.create(...)
does. Ideally expose it as the default (or via a flag) so CLI-deployed agents can
run durable query jobs.
Note (separate, pre-existing blocker):
With google-adk==2.2.0, the generated Dockerfile launches adk api_server --a2a
but the generated requirements.txt only pins google-adk (no a2a-sdk). An
unconstrained a2a-sdk resolves to 1.x, which removed a2a.server.apps, so the
container crashes on startup with ModuleNotFoundError: No module named 'a2a.server.apps' before it can serve anything. Pinning a2a-sdk[http-server]==0.3.25
(as in the repro above) works around it so the asyncQuery behavior can be observed.
🔴 Required Information
Describe the Bug:
An Agent Engine deployed with
adk deploy agent_engineis not provisionedwith the long-running query API (
reasoningEngines:asyncQuery, a.k.a.AsyncQueryReasoningEngine/ durable query jobs). The engine comes up and servessynchronous traffic fine, but any call to the
:asyncQueryREST endpoint isrejected server-side with:
adk deployshould provision engines that support:asyncQuery. Today only theprogrammatic
vertexai.agent_engines.create(...)path yields an async-query-capableengine; an engine created by
adk deploycannot be upgraded in place, so any agentthat relies on durable/long-running query jobs simply cannot be deployed via the
ADK CLI. Treating this as a bug rather than a missing feature:
adk deployis thedocumented happy path and it silently produces an engine that's missing a
first-class Agent Engine capability.
Relevant code in
src/google/adk/cli/cli_deploy.py(v2.2.0):(
client.agent_engines.create()), thenclient.agent_engines.update(...)withagent_config['class_methods'] = _AGENT_ENGINE_CLASS_METHODS._AGENT_ENGINE_CLASS_METHODSonly registers methods withapi_modeof''(sync),async,stream, andasync_stream. No method registers thelong-running async-query/job API, and nothing in the deploy request opts the
engine into the
AsyncQueryReasoningEnginecapability — so the provisionedengine never supports
:asyncQuery.Steps to Reproduce:
Create a trivial agent package
sample_agent/:sample_agent/__init__.pysample_agent/agent.pysample_agent/requirements.txtDeploy with the ADK CLI:
Note the created resource name, e.g.
projects/.../locations/us-central1/reasoningEngines/ENGINE_ID.Confirm the engine is healthy — synchronous
:queryreturns HTTP 200:Call the long-running query API
:asyncQueryon the same engine:Expected Behavior:
An engine provisioned by
adk deploy agent_enginesupports:asyncQuery, so thedurable/long-running query job is accepted (returns an LRO) — the same capability
you get from
vertexai.agent_engines.create(...).Observed Behavior:
:queryworks (HTTP 200), but:asyncQueryon the same engine fails:{ "error": { "code": 400, "message": "The reasoning engine resource [projects/.../reasoningEngines/ENGINE_ID] does not support AsyncQueryReasoningEngine API.", "status": "FAILED_PRECONDITION" } }Environment Details:
Model Information:
🟡 Optional Information
Suggested fix:
Have the
adk deploy agent_enginepath provision an async-query-capable engine —e.g. register the long-running query method / set the capability in the
create/update request so the backing infrastructure for
AsyncQueryReasoningEngine(
:asyncQuery) is wired up, matching whatvertexai.agent_engines.create(...)does. Ideally expose it as the default (or via a flag) so CLI-deployed agents can
run durable query jobs.
Note (separate, pre-existing blocker):
With
google-adk==2.2.0, the generated Dockerfile launchesadk api_server --a2abut the generated
requirements.txtonly pinsgoogle-adk(noa2a-sdk). Anunconstrained
a2a-sdkresolves to 1.x, which removeda2a.server.apps, so thecontainer crashes on startup with
ModuleNotFoundError: No module named 'a2a.server.apps'before it can serve anything. Pinninga2a-sdk[http-server]==0.3.25(as in the repro above) works around it so the asyncQuery behavior can be observed.