You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"adk deploy agent_engine" fails if the agent folder name contains dashes. #2902
The generated code will fail on the following line:
...
from agent-folder-name.agent import root_agent
..
with "Deploy failed: Failed to set up agent engine <vertexai.agent_engines._agent_engines.ModuleAgent object at 0x1310dbad0>: invalid syntax (agent_engine_app.py, line 13)".
It's pretty hard to debug, at the very least would be good to add a validation step and print a descriptive reason for the failure.
This seems to be no longer an issue due to as I just tested with adk deploy agent_engine --project=$PROJECT_ID --region=$LOCATION_ID --display_name="My First Agent" hello-world. Seems to be related to how the template has changed.
Activity
surajksharma07 commentedon Oct 10, 2025
Hi @silichenko,
Rename your agent folder to use underscores instead of dashes (e.g.,
agent_folder_nameinstead ofagent-folder-name), and it should work.Thanks.
yeesian commentedon Oct 10, 2025
We'll work on providing better validation and error messages, thank you for the report!
fix(cli): validate agent folder names for agent_engine
surajksharma07 commentedon Feb 5, 2026
@slilichenko The issue happens because Python module names can't contain dashes - they're interpreted as minus operators.
Rename your agent folder to use underscores instead (e.g.,
agent_folder_nameinstead ofagent-folder-name) and the deployment will work.PR #4246 is open to add proper validation with a clearer error message.
For now, just swap dashes for underscores in your folder name.
wuliang229 commentedon Feb 13, 2026
This seems to be no longer an issue due to as I just tested with
adk deploy agent_engine --project=$PROJECT_ID --region=$LOCATION_ID --display_name="My First Agent" hello-world. Seems to be related to how the template has changed.