Agent Engine deployments do not work after latest release
Using a basic agent with
root_agent = Agent( model="gemini-2.5-pro", name=..., instruction=...., description=...., tools=[my_tool] )
Fails to get queried in agentspace with error:
AttributeError: 'LlmAgent' object has no attribute 'static_instruction'. Did you mean: 'global_instruction'?
Reverting to 1.14.1 fixes the issue
Hi, there were people who ran into similar issues and it was resolved when they pinned to google-adk>=1.15.1 both locally and in their requirements.txt file when they're deploying to AgentEngine. Can I check if that works for you?
Based on the cloudbuild logs it installed google-adk-1.15.1, The issue still persisted
~I'm also having this issue even after pinning to version 1.14.1 and redeploying my agent.~
AttributeError: 'LlmAgent' object has no attribute 'static_instruction'. Did you mean: 'global_instruction'?
Nevermind. Specifying the version 1.15.1 and redeploying the agent now gives me successful messages
Based on the cloudbuild logs it installed google-adk-1.15.1, The issue still persisted
Thanks for chiming in! Can I check what version of google-genai it picked up?
Based on the cloudbuild logs it installed google-adk-1.15.1, The issue still persisted
Thanks for chiming in! Can I check what version of
google-genaiit picked up?
It's 1.39.1
Hello, does the bug still exist? I have the same problem.
Hey Diego, I believe it is resolved but it is a bit tricky to get the right dependencies installed. This is what works for me:
remote_app = agent_engines.create(
app,
display_name="Agentic SOC Agent Engine",
requirements=[
"cloudpickle",
"google-adk>=1.15.1", # fixes AttributeError: 'LlmAgent' object has no attribute 'static_instruction'. Did you mean: 'global_instruction'
"google-genai",
"google-cloud-discoveryengine",
"google-cloud-aiplatform[agent-engines]==1.119.0", # fixes VertexAiSessionService
...
Note that I do NOT have adk in the google-cloud-aiplatform[...] and instead I'm explicitly installing it higher in the dependency list with google-adk>=1.15.1. I needed to upgrade both google-adk and google-cloud-aiplatform to resolve the issue. Also, I updated both in my local environment's venv where I build and in these dependencies for the agent itself.
I hope this works for you too!
I confirm the issue using 1.119 or 1.120. I fixed the problem with the above approach.
I faced same problem. I tried this one, but it's couldn't be solved.
agent_engine = agent_engines.create(
display_name="test_agent",
description="test_agent",
agent_engine=app,
gcs_dir_name="test_agent_engine",
requirements=[
"cloudpickle",
"google-adk==1.15.1",
"google-genai",
"google-cloud-discoveryengine",
"google-cloud-aiplatform[agent-engines]==1.119.0"
]
)
I faced same problem. I tried this one, but it's couldn't be solved.
@hiracky16 Can you confirm that the error you receive is:
AttributeError: 'LlmAgent' object has no attribute 'static_instruction'. Did you mean: 'global_instruction'?
Also, are you using the exact same versions in the requirements.txt file for the venv that you are using?
@dandye my requirements.txt is here.
cloudpickle
google-adk==1.15.1
google-genai
google-cloud-discoveryengine
google-cloud-aiplatform[agent-engines]==1.119.0
pydantic==2.11.7
@hiracky16 Can you also please confirm that the error you are seeing is:
AttributeError: 'LlmAgent' object has no attribute 'static_instruction'. Did you mean: 'global_instruction'?
@dandye
The following error occurred (I observed it in Cloud Trace):
'LlmAgent' object has no attribute 'static_instruction'
I suspect this is because static_instruction was implemented starting from version v1.15.1.
I tried using the version(google-adk==1.14.1 and google-cloud-aiplatform[agent-engines]==1.113.0) specified in this requirements.txt, but I was unable to create the agent engine session because the error occurred.
requirements.txt
cloudpickle
google-adk==1.14.1
google-genai
google-cloud-discoveryengine
google-cloud-aiplatform[agent-engines]==1.113.0
pydantic==2.11.7
error
google.genai.errors.ClientError: 400 FAILED_PRECONDITION. {'error': {'code': 400, 'message': 'Reasoning Engine Execution failed.\nPlease refer to our documentation (https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/troubleshooting/use) for checking logs and other troubleshooting tips.\nError Details: {"detail":"Agent Engine Error: An error occurred during invocation. Exception: Cannot send a request, as the client has been closed.\\nRequest Data: {\'user_id\': \'USER_ID\'}"}', 'status': 'FAILED_PRECONDITION'}}
I have the same problem here. I tried to download the modules, but I couldn't resolve it.
The following set of requirements resolved the issue for me:
"cloudpickle", "google-adk>=1.17.0", "google-genai==1.49.0", "google-cloud-discoveryengine", "google-cloud-aiplatform[agent-engines]==1.125.0"
I tried all the above methods, but the issue has persisted
The only explanation for this issue is that there is a different in versions of google-adk from the version that was used in the agent that was initialized for deployment, versus the version that was deployed.
To avoid this issue, either use the more recent version of google-adk, and use the same version across both local/deployment and remote/deployed environments, or use the source-based approach for deployment in https://docs.cloud.google.com/agent-builder/agent-engine/deploy#from-source-files