Skip to content

Folder name would affect adk deploy #2885

@keewooi

Description

@keewooi

Describe the bug
Certain folder names could cause adk deploy to fail. In the following 3 examples, all codes within are identical, the only difference is their folder names:

Example 1 - folder name: kl-ai-2025

uv run adk deploy agent_engine --project=ksaw-agentspace --region=us-central1 --staging_bucket=gs://ksaw-agentspace-staging --display_name='Hellozz' .
Copying agent source code...
Copying agent source code complete.
Initializing Vertex AI...
Resolving files and dependencies...
Reading environment variables from /Users/ksaw/Projects/works/test/adk/kl-ai-2025/.env

(lines omitted)

Writing to gs://ksaw-agentspace-staging/agent_engine/dependencies.tar.gz
Cleaning up the temp folder: /var/folders/02/wd_dyc097rnc8z3zk73wpmm400gmgd/T/agent_engine_deploy_src/20250909_143632
Deploy failed: Failed to set up agent engine <vertexai.agent_engines._agent_engines.ModuleAgent object at 0x110089d50>: invalid decimal literal (agent_engine_app.py, line 13)

Example 2 - folder name: copy

uv run adk deploy agent_engine --project=ksaw-agentspace --region=us-central1 --staging_bucket=gs://ksaw-agentspace-staging --display_name='Hellozz' .
Copying agent source code...
Copying agent source code complete.
Initializing Vertex AI...
Resolving files and dependencies...
Reading environment variables from /Users/ksaw/Projects/works/test/adk/copy/.env

(lines omitted)

Creating in-memory tarfile of extra_packages
Writing to gs://ksaw-agentspace-staging/agent_engine/dependencies.tar.gz
Cleaning up the temp folder: /var/folders/02/wd_dyc097rnc8z3zk73wpmm400gmgd/T/agent_engine_deploy_src/20250909_143704
Deploy failed: Failed to set up agent engine <vertexai.agent_engines._agent_engines.ModuleAgent object at 0x10e74b350>: No module named 'copy.agent'; 'copy' is not a package

Example 3 - folder name: kl_ai_2025

uv run adk deploy agent_engine --project=ksaw-agentspace --region=us-central1 --staging_bucket=gs://ksaw-agentspace-staging --display_name='Helloz' .
Copying agent source code...
Copying agent source code complete.
Initializing Vertex AI...
Resolving files and dependencies...
Reading environment variables from /Users/ksaw/Projects/works/test/adk/kl_ai_2025/.env

(lines omitted)

Create AgentEngine backing LRO: projects/1052535955881/locations/us-central1/reasoningEngines/694051321870811136/operations/8063698585960579072
View progress and logs at https://console.cloud.google.com/logs/query?project=ksaw-agentspace
AgentEngine created. Resource name: projects/1052535955881/locations/us-central1/reasoningEngines/694051321870811136
To use this AgentEngine in another session:
agent_engine = vertexai.agent_engines.get('projects/1052535955881/locations/us-central1/reasoningEngines/694051321870811136')
Cleaning up the temp folder: /var/folders/02/wd_dyc097rnc8z3zk73wpmm400gmgd/T/agent_engine_deploy_src/20250909_134315

In the examples above, only Example 3 would deploy correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Create a simple ADK agent in a folder named copy.
  2. Run adk deploy agent_engine
  3. See error

Expected behavior
ADK deploy should work regardless of folder name

Metadata

Metadata

Assignees

Labels

agent engine[Component] This issue is related to Agent Engine deploymentbot triaged[Bot] This issue is triaged by ADK bot

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions