Diagnose common ADK issues (import errors, auth failures, runtime crashes)
Diagnoses common ADK issues including import errors, authentication failures, and runtime crashes.
/plugin marketplace add MattMagg/agentic-plugins/plugin install adk-builder@agentic-pluginsSystematically diagnose common ADK issues including import errors, authentication failures, runtime crashes, and configuration problems.
Run these commands to collect diagnostic information:
# Check Python and ADK installation
python --version
pip show google-genai-adk
# Verify project structure
ls -la
cat adk.yaml 2>/dev/null || echo "No adk.yaml found"
cat pyproject.toml 2>/dev/null || echo "No pyproject.toml found"
# Check for ADK imports
find . -name "*.py" -type f -exec grep -l "from google.genai.adk" {} \; 2>/dev/null
# Test basic import
python -c "from google.genai.adk import Agent; print('ADK import successful')" 2>&1
Common issue categories:
ModuleNotFoundError: No module named 'google.genai.adk'pip install google-genai-adk or pip install --upgrade google-genai-adk401 Unauthorized, API key not found, authentication errorsGOOGLE_API_KEY or configure service account authenticationpip install --upgrade google-genai-adk
pip install --upgrade google-generativeai
# Option 1: API Key
export GOOGLE_API_KEY="your-api-key-here"
# Option 2: Service Account (check if file exists)
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
ls -la $GOOGLE_APPLICATION_CREDENTIALS
# Option 3: gcloud authentication
gcloud auth application-default login
# Check for required files
ls -la adk.yaml agents/ tools/ 2>/dev/null
# Validate YAML syntax
python -c "import yaml; yaml.safe_load(open('adk.yaml'))" 2>&1
# List installed packages
pip list | grep -E "google|genai|adk"
# Check for conflicts
pip check
# Add to your Python script
import logging
logging.basicConfig(level=logging.DEBUG)
After running diagnostics, provide:
Environment Summary
Issue Classification
Recommended Actions
Next Steps
/adk-init - Re-initialize project/adk-create-agent - Recreate agent with validated configUser: "I'm getting ModuleNotFoundError when importing ADK"
Assistant: Runs diagnostic commands, identifies missing installation, provides fix:
pip install google-genai-adk
python -c "from google.genai.adk import Agent; print('Success')"
User: "My agent is getting authentication errors"
Assistant: Checks environment variables, validates credentials, guides setup:
export GOOGLE_API_KEY="your-key"
# or
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/creds.json"