Description
The google-agents-cli setup command crashes with a FileNotFoundError if the Google Cloud SDK (gcloud) is not installed. This creates a significant "first-mile" failure for new users, especially those following the "Local Development" path described in the documentation.
Documentation Inconsistencies & User Frustration
The current behavior directly contradicts the project's documentation, leading to a confusing setup experience:
-
README Prerequisites: The README lists only Python 3.11+, uv, and Node.js as prerequisites. gcloud is not mentioned as a requirement for installation or basic setup.
-
FAQ Contradiction: The FAQ explicitly states:
"Do I need Google Cloud? For local development (create, run, eval), no — you can use an AI Studio API key to run Gemini with ADK locally."
Despite this, setup crashes immediately upon checking for Google Cloud credentials, preventing users from ever reaching the point where they could configure an AI Studio API key.
-
Brittle Authentication Check: Even when running setup non-interactively, the CLI attempts to verify the environment's authentication status. Instead of gracefully failing or falling back to API key detection, it assumes the presence of the gcloud binary.
Steps to Reproduce
- Use an environment (Linux/macOS) where
gcloud is not in the PATH.
- Run the recommended install command:
uvx google-agents-cli setup.
Actual Behavior
The CLI crashes during the authentication check phase:
Traceback (most recent call last):
...
File ".../google/agents/cli/auth.py", line 366, in is_authenticated
if not _check_valid_adc():
File ".../google/agents/cli/auth.py", line 382, in _check_valid_adc
subprocess.run(
["gcloud", "auth", "application-default", "print-access-token", "--quiet"],
check=True,
capture_output=True,
)
...
FileNotFoundError: [Errno 2] No such file or directory: 'gcloud'
Technical Root Cause
In google/agents/cli/auth.py, the _check_valid_adc function only catches subprocess.CalledProcessError. It should also catch FileNotFoundError to handle cases where the Google Cloud SDK is not installed.
# Proposed fix in google/agents/cli/auth.py
def _check_valid_adc():
try:
subprocess.run(["gcloud", ...], check=True, capture_output=True)
return True
except (subprocess.CalledProcessError, FileNotFoundError):
return False
Workaround for Users
Currently, users must use the undocumented --skip-auth flag to bypass the crash:
uvx google-agents-cli setup --skip-auth
Description
The
google-agents-cli setupcommand crashes with aFileNotFoundErrorif the Google Cloud SDK (gcloud) is not installed. This creates a significant "first-mile" failure for new users, especially those following the "Local Development" path described in the documentation.Documentation Inconsistencies & User Frustration
The current behavior directly contradicts the project's documentation, leading to a confusing setup experience:
README Prerequisites: The README lists only
Python 3.11+,uv, andNode.jsas prerequisites.gcloudis not mentioned as a requirement for installation or basic setup.FAQ Contradiction: The FAQ explicitly states:
Despite this,
setupcrashes immediately upon checking for Google Cloud credentials, preventing users from ever reaching the point where they could configure an AI Studio API key.Brittle Authentication Check: Even when running
setupnon-interactively, the CLI attempts to verify the environment's authentication status. Instead of gracefully failing or falling back to API key detection, it assumes the presence of thegcloudbinary.Steps to Reproduce
gcloudis not in thePATH.uvx google-agents-cli setup.Actual Behavior
The CLI crashes during the authentication check phase:
Technical Root Cause
In
google/agents/cli/auth.py, the_check_valid_adcfunction only catchessubprocess.CalledProcessError. It should also catchFileNotFoundErrorto handle cases where the Google Cloud SDK is not installed.Workaround for Users
Currently, users must use the undocumented
--skip-authflag to bypass the crash:uvx google-agents-cli setup --skip-auth