Skip to content

Deploying after enhance fails with 'NoneType' object has no attribute 'name' #42

Description

@Yorko

What happened?

Deployment to Agent Runtime failed after enhancing the agent

Steps to Reproduce

  1. Take an existing agent and enhance it: uvx google-agents-cli scaffold enhance -i
  2. Test it in the playground making sure it works: agents-cli install && agents-cli playground
  3. Deploy the agent to Agent Runtime: uvx google-agents-cli deploy --no-confirm-project

What did you expect to happen?

Deploy the agent successfully and see smth like this:

Using project root directory: /home/admin_/my-awesome-agent
  📦 Auto-generated requirements: app/app_utils/.requirements.txt

    ╔═══════════════════════════════════════════════════════════╗
    ║                                                           ║
    ║   🤖 DEPLOYING AGENT TO AGENT RUNTIME 🤖                  ║
    ║                                                           ║


Using project root directory: /home/admin_/my-awesome-agent
  📦 Auto-generated requirements: app/app_utils/.requirements.txt

    ╔═══════════════════════════════════════════════════════════╗
    ║                                                           ║
    ║   🤖 DEPLOYING AGENT TO AGENT RUNTIME 🤖                  ║
    ║                                                           ║
    ╚═══════════════════════════════════════════════════════════╝
    

📋 Deployment Parameters:
  Project: learning-agentspace
  Location: us-east1
  Display Name: my-awesome-agent
  Min Instances: 1
  Max Instances: 10
  CPU: 4
  Memory: 8Gi
  Container Concurrency: 9

🌍 Environment Variables:
  AGENT_VERSION: 0.1.0
  GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY: true
  GOOGLE_CLOUD_REGION: us-east1
  NUM_WORKERS: 1
  OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT: true

🚀 Creating agent: my-awesome-agent (this can take 5-10 minutes)...
INFO:vertexai_genai.agentengines:Creating in-memory tarfile of source_packages
INFO:vertexai_genai.agentengines:Using agent framework: google-adk
   Operation: projects/903290458825/locations/us-east1/reasoningEngines/4823812597750956032/operations/7451432426477191168
   If this command is interrupted, run 'google-agents deploy --status' to check progress.


✅ Deployment successful!
Agent Runtime ID: projects/903290458825/locations/us-east1/reasoningEngines/4823812597750956032
Service Account: service-903290458825@gcp-sa-aiplatform-re.iam.gserviceaccount.com

📊 Open Console Playground: https://console.cloud.google.com/vertex-ai/agents/agent-engines/locations/us-east1/agent-engines/4823812597750956032/playground?project=learning-agentspace

Client information

Client Information

CLI version: 0.2.0
CLI install path: /Users/ldap/.local/share/uv/tools/google-agents-cli/lib/python3.14/site-packages/google/agents/cli
OS info: macOS-15.7.7-arm64-arm-64bit-Mach-O
Installed skills: none

Project root: /Users/kashnitsky/Downloads/ge-hackathons-tech-track
Project name: ge-hackathons-tech-track
Deployment target: agent_runtime
Agent directory: google_search_agent
Region: us-east1

Command Output / Logs

 File "/Users/ldap/.local/share/uv/tools/google-agents-cli/lib/python3.14/site-packages/google/agents/cli/deploy/agent_runtime.py", line 546, in deploy_agent_runtime
    write_deployment_metadata(remote_agent, cfg)
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/Users/ldap/.local/share/uv/tools/google-agents-cli/lib/python3.14/site-packages/google/agents/cli/deploy/agent_runtime.py", line 141, in write_deployment_metadata
    "remote_agent_runtime_id": remote_agent.api_resource.name,
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'name'

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions