### Deployment Setup and Execution Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/README.md Commands for setting up a development environment and deploying an agent. It includes steps for dependency installation, environment configuration, and the actual deployment process using 'make'. ```bash make setup-dev-env make deploy ``` -------------------------------- ### Install agent-starter-pack CLI using uvx Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/adk_agent_agentengine_demo/GEMINI.md Installs the `agent-starter-pack` CLI using `uvx`, a recommended method for zero-installation and automation. This command allows direct execution of the `agent-starter-pack` tool without prior global installation. ```bash uvx agent-starter-pack create ... ``` -------------------------------- ### Copy Environment Example File Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/1_adk_tools/adk_custom_tool_agent/README.md This bash command copies the example environment file (`.env.example`) to a new file named `.env`. This is a standard setup step for applications that require configuration variables, such as API keys, to be stored separately from the code. ```bash cp .env.example .env ``` -------------------------------- ### Install and Create Agent Project with uvx Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/README.md This snippet shows how to install the 'uv' package manager and then use 'uvx' to create a new agent project using the agent-starter-pack. It includes commands for installation, project creation, and navigating to the project directory. ```bash # Install uv (if not already installed) curl -LsSf https://astral.sh/uv/install.sh | sh # Create a new agent project (interactive CLI) uvx agent-starter-pack create my-awesome-agent # Navigate to project and get started cd my-awesome-agent make install && make playground ``` -------------------------------- ### Install Dependencies using uv Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/6_adk_deploy_rag_to_agent_engine/README.md This snippet demonstrates how to install project dependencies using the `uv` package manager. It includes steps for navigating to the parent directory, installing `uv` itself, creating a virtual environment, and then installing dependencies from a `requirements.txt` file. ```bash # Navigate to parent directory cd 6_adk_deploy_rag_to_agent_engine # Install uv if not already installed curl -LsSf https://astral.sh/uv/install.sh | sh # Create virtual environment (if needed) uv venv # Install dependencies uv pip install -r requirements.txt ``` -------------------------------- ### Install Dependencies with pip Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/README.md Installs project dependencies using the standard 'pip' command, usually from a requirements.txt file. This is a fundamental step for Python project setup. ```bash pip install -r requirements.txt ``` -------------------------------- ### Automate CI/CD Infrastructure Setup with Agent Starter Pack Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/adk_agent_agentengine_demo/GEMINI.md This command automates the setup of CI/CD infrastructure for GitHub-based deployments, supporting Google Cloud Build or GitHub Actions. It requires authenticated CLIs for GitHub and Google Cloud, Terraform, and specific GCP roles and GitHub token scopes. The process includes repository configuration, Terraform infrastructure setup with remote state, CI/CD runner connection, environment provisioning, and local Git setup. ```bash uvx agent-starter-pack setup-cicd [OPTIONS] ``` ```bash uvx agent-starter-pack setup-cicd \ --staging-project your-staging-project \ --prod-project your-prod-project \ --repository-name your-repo-name \ --repository-owner your-username \ --auto-approve ``` ```bash git add . && git commit -m "Initial commit" && git push -u origin main ``` -------------------------------- ### Observability Integration with OpenTelemetry (Conceptual) Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/adk_agent_agentengine_demo/GEMINI.md Demonstrates a conceptual example of integrating ADK with observability platforms using OpenTelemetry, specifically showing a placeholder for Comet Opik integration. This requires installing a specific library and calling an enablement function at application startup. ```python # Example using Comet Opik integration (conceptual) # pip install comet_opik_adk # from comet_opik_adk import enable_opik_tracing # enable_opik_tracing() # Call at app startup # Then run your ADK app, traces appear in Comet workspace. ``` -------------------------------- ### Local Development Server Start Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/adk_agent_cloudrun_demo/README.md Starts the local development environment for the project. This includes options for running a Streamlit playground or a local backend server before deployment. ```bash # Streamlit playground make playground # Or local backend server make local-backend ``` -------------------------------- ### Install agent-starter-pack CLI using pip Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/adk_agent_agentengine_demo/GEMINI.md Installs the `agent-starter-pack` package into the current virtual environment using pip. This method requires an active Python virtual environment. ```bash pip install agent-starter-pack ``` -------------------------------- ### Install Dependencies using pip Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/6_adk_deploy_rag_to_agent_engine/README.md This snippet shows how to install project dependencies using the standard `pip` package manager. It covers navigating to the parent directory, creating and activating a Python virtual environment, and then installing dependencies from a `requirements.txt` file. ```bash # Navigate to parent directory cd 6_adk_deploy_rag_to_agent_engine # Create and activate virtual environment (recommended) python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt ``` -------------------------------- ### Setup Environment Variables for Google Search Agent Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/1_adk_tools/adk_builtin_tool_agent/README.md This snippet shows how to copy an example environment file and update it with your Google API key. It highlights the necessary environment variables for configuring the agent to use the Gemini API instead of Vertex AI. ```bash cp .env.example .env # Then edit .env and replace "your-api-key" (or "YOUR_API_KEY") with your actual Google API key. # Environment Variables: # GOOGLE_GENAI_USE_VERTEXAI=False: Use AI Studio (Gemini API) instead of Vertex AI # GOOGLE_API_KEY: Your Google API key from Google AI Studio ``` -------------------------------- ### Create New Agent Projects with Agent Starter Pack using Bash Source: https://context7.com/arjunprabhulal/adk-advanced/llms.txt This bash script shows how to use the Agent Starter Pack CLI to generate new agent projects. It covers installing uv, creating projects interactively or with specific templates and deployment targets (like Agent Engine or GKE), and setting up a RAG agent from a remote template. It also includes commands to navigate into the project and run setup scripts. ```bash # Install uv if not already installed curl -LsSf https://astral.sh/uv/install.sh | sh # Create new agent project (interactive) uvx agent-starter-pack create my-awesome-agent # Create with specific template and deployment target uvx agent-starter-pack create my-agent -a adk_base -d agent_engine # Create RAG agent from remote template uvx agent-starter-pack create my-rag-agent -a adk@rag # Navigate and run cd my-awesome-agent make install && make playground ``` -------------------------------- ### Create Agent Project with uv and Agent Starter Pack (Bash) Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/6_adk_deploy_rag_to_agent_engine/adk_rag_agent_engine_demo/README.md A streamlined command using `uvx` to create a new agent project with the Agent Starter Pack. This method handles the creation of a virtual environment and installation of necessary packages in a single step, suitable for users with `uv` installed. ```bash uvx agent-starter-pack create my-rag-agent -a adk@rag ``` -------------------------------- ### Install Dependencies with uv Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/adk_agent_agentengine_demo/README.md Installs all necessary project dependencies using the 'uv' package manager. This command ensures that the project has all the required libraries to run correctly. ```bash make install ``` -------------------------------- ### Local Testing (Before Deployment) Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/adk_agent_cloudrun_demo/README.md Guides for running the application locally before deployment, including options for a Streamlit playground and a local backend server. ```APIDOC ## Local Testing (Before Deployment) ### Description This section provides commands to run the application locally before deploying it to Cloud Run. Two options are available: a Streamlit playground and a local backend server. ### Method N/A (Local execution) ### Endpoint N/A (Local execution) ### Parameters None ### Request Example None ### Response None ### Setup Choose one of the following methods: 1. **Streamlit playground:** ```bash make playground ``` 2. **Local backend server:** ```bash make local-backend ``` ``` -------------------------------- ### Post-Creation Commands for RAG Agent Project Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/6_adk_deploy_rag_to_agent_engine/README.md After successfully creating a RAG agent project using the `adk@rag` template, these commands are used to navigate into the project directory and set up the development environment. `make install` installs project dependencies, and `make playground` likely launches a local development server or interface for testing the agent. ```bash cd adk-rag-agent-engine-demo make install && make playground ``` -------------------------------- ### Install Project Dependencies with uv Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/6_adk_deploy_rag_to_agent_engine/adk_rag_agent_engine_demo/README.md This command synchronizes project dependencies based on the 'pyproject.toml' file and installs them into the virtual environment. It ensures all necessary libraries are available for the project to run. ```bash uv sync ``` -------------------------------- ### Install Dependencies with uv pip Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/README.md Installs project dependencies using the 'uv pip' command, typically from a requirements.txt file. This is a common step for setting up Python projects. ```bash uv pip install -r requirements.txt ``` -------------------------------- ### Create .env file from example Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/7_adk_vertex_ai_search_simple/README.md Copies the example environment variables file to '.env' for local configuration. This file is used to set up API keys and project details necessary for running the agent. ```bash cd vertex_search_agent cp .env.example .env ``` -------------------------------- ### Basic LlmAgent Setup in Python Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/adk_agent_agentengine_demo/GEMINI.md Illustrates the creation of a basic `LlmAgent` instance in Python. It includes defining the agent's name, model, instructions, description, and integrating a custom tool. ```python from google.adk.agents import Agent def get_current_time(city: str) -> dict: """Returns the current time in a specified city.""" # Mock implementation if city.lower() == "new york": return {"status": "success", "time": "10:30 AM EST"} return {"status": "error", "message": f"Time for {city} not available."} my_first_llm_agent = Agent( name="time_teller_agent", model="gemini-2.5-flash", # Essential: The LLM powering the agent instruction="You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool for this purpose.", description="Tells the current time in a specified city.", # Crucial for multi-agent delegation tools=[get_current_time] # List of callable functions/tool instances ) ``` -------------------------------- ### Environment Variables for Google Cloud Vertex AI Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/adk_agent_cloudrun_demo/GEMINI.md Example environment variables for configuring ADK agents to use Google Cloud Vertex AI. This setup is recommended for production environments. ```dotenv GOOGLE_GENAI_USE_VERTEXAI=1 GOOGLE_CLOUD_PROJECT= GOOGLE_CLOUD_LOCATION=us-central1 ``` -------------------------------- ### Environment Variables for Google AI Studio Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/adk_agent_cloudrun_demo/GEMINI.md Example environment variables for configuring ADK agents to use Google AI Studio with Gemini. This setup is simpler and suitable for rapid prototyping. ```dotenv GOOGLE_GENAI_USE_VERTEXAI=0 GOOGLE_API_KEY= ``` -------------------------------- ### Create Agent Project with Agent Starter Pack (Bash) Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/6_adk_deploy_rag_to_agent_engine/adk_rag_agent_engine_demo/README.md Initializes a new agent project using the Agent Starter Pack, which helps create a production-ready agent with various deployment options. This command sets up a virtual environment and installs the starter pack. ```bash # Create and activate a virtual environment python -m venv .venv && source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install the starter pack and create your project pip install --upgrade agent-starter-pack agent-starter-pack create my-rag-agent -a adk@rag ``` -------------------------------- ### Automate CI/CD Setup with Agent Starter Pack Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/adk_agent_cloudrun_demo/GEMINI.md This command automates the complete CI/CD infrastructure setup for GitHub-based deployments. It intelligently detects your CI/CD runner (Google Cloud Build or GitHub Actions) and configures everything automatically. Prerequisites include authenticated `gh` and `gcloud` CLIs, `terraform`, and appropriate GCP roles/GitHub scopes. The command can be run with or without interactive prompts using the `--auto-approve` flag. ```bash uvx agent-starter-pack setup-cicd [OPTIONS] # Automated Example: uvx agent-starter-pack setup-cicd \ --staging-project your-staging-project \ --prod-project your-prod-project \ --repository-name your-repo-name \ --repository-owner your-username \ --auto-approve # After setup, push to trigger pipeline: git add . && git commit -m "Initial commit" && git push -u origin main ``` -------------------------------- ### Create Basic Agent with Built-in Google Search Tool Source: https://context7.com/arjunprabhulal/adk-advanced/llms.txt Demonstrates the creation of a simple ADK agent utilizing the built-in `google_search` tool. This requires no additional setup and is a straightforward way to start building agents. ```python from google.adk.agents import Agent from google.adk.tools import google_search root_agent = Agent( model="gemini-2.5-flash", name="google_search_agent", instruction="You are a helpful google search assistant.", tools=[google_search], ) ``` -------------------------------- ### agent-starter-pack setup-cicd Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/6_adk_deploy_rag_to_agent_engine/adk_rag_agent_engine_demo/GEMINI.md Automates the complete CI/CD infrastructure setup for GitHub-based deployments. It intelligently detects your CI/CD runner (Google Cloud Build or GitHub Actions) and configures everything automatically. ```APIDOC ## `agent-starter-pack setup-cicd` ### Description Automates the complete CI/CD infrastructure setup for GitHub-based deployments. Intelligently detects your CI/CD runner (Google Cloud Build or GitHub Actions) and configures everything automatically. ### Method CLI Command ### Endpoint N/A (CLI Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash uvx agent-starter-pack setup-cicd \ --staging-project your-staging-project \ --prod-project your-prod-project \ --repository-name your-repo-name \ --repository-owner your-username \ --auto-approve ``` ### Response #### Success Response (200) Successful execution of the CI/CD setup. #### Response Example ``` CI/CD infrastructure setup complete. ``` ### Prerequisites - Run from the project root (directory with `pyproject.toml`) - Required tools: `gh` CLI (authenticated), `gcloud` CLI (authenticated), `terraform` - `Owner` role on GCP projects - GitHub token with `repo` and `workflow` scopes ### Key Options - `--staging-project`, `--prod-project`: GCP project IDs (will prompt if omitted). - `--repository-name`, `--repository-owner`: GitHub repo details (will prompt if omitted). - `--cicd-project`: CI/CD resources project (defaults to prod project). - `--dev-project`: Development project ID (optional). - `--region`: GCP region (default: `us-central1`). - `--auto-approve`: Skip all interactive prompts. - `--local-state`: Use local Terraform state instead of GCS backend. - `--debug`: Enable debug logging. ### What it does: 1. Creates/connects GitHub repository 2. Sets up Terraform infrastructure with remote state 3. Configures CI/CD runner connection (Cloud Build or GitHub Actions with WIF) 4. Provisions staging/prod environments 5. Sets up local Git repository with origin remote ### Post-setup Action: ```bash git add . && git commit -m "Initial commit" && git push -u origin main ``` ### Notes: - For coding agents: ask user for required project IDs and repo details before running with `--auto-approve`. - If user prefers a different git provider, refer to `deployment/README.md` for manual deployment. ``` -------------------------------- ### Install Dependencies with uv Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/5_adk_deploy_gke/README.md Installs project dependencies using the `uv` package manager. This involves navigating to the parent directory, installing `uv` if necessary, creating a virtual environment, and then installing from `requirements.txt`. ```bash # Navigate to parent directory cd 5_adk_deploy_gke # Install uv if not already installed curl -LsSf https://astral.sh/uv/install.sh | sh # Create virtual environment (if needed) uv venv # Install dependencies uv pip install -r requirements.txt ``` -------------------------------- ### agent-starter-pack setup-cicd Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/adk_agent_cloudrun_demo/GEMINI.md Automates the complete CI/CD infrastructure setup for GitHub-based deployments. It intelligently detects your CI/CD runner (Google Cloud Build or GitHub Actions) and configures everything automatically. ```APIDOC ## `agent-starter-pack setup-cicd` ### Description Automates the complete CI/CD infrastructure setup for GitHub-based deployments. Intelligently detects your CI/CD runner (Google Cloud Build or GitHub Actions) and configures everything automatically. ### Method CLI Command ### Endpoint N/A (CLI Command) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```bash uvx agent-starter-pack setup-cicd \ --staging-project your-staging-project \ --prod-project your-prod-project \ --repository-name your-repo-name \ --repository-owner your-username \ --auto-approve ``` ### Response #### Success Response (200) Successful execution of the CI/CD setup. #### Response Example N/A (CLI Output) ### Key Options: * `--staging-project`, `--prod-project`: GCP project IDs (will prompt if omitted). * `--repository-name`, `--repository-owner`: GitHub repo details (will prompt if omitted). * `--cicd-project`: CI/CD resources project (defaults to prod project). * `--dev-project`: Development project ID (optional). * `--region`: GCP region (default: `us-central1`). * `--auto-approve`: Skip all interactive prompts. * `--local-state`: Use local Terraform state instead of GCS backend. * `--debug`: Enable debug logging. ### Prerequisites: - Run from the project root (directory with `pyproject.toml`) - Required tools: `gh` CLI (authenticated), `gcloud` CLI (authenticated), `terraform` - `Owner` role on GCP projects - GitHub token with `repo` and `workflow` scopes ``` -------------------------------- ### Install uv Package Manager Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/6_adk_deploy_rag_to_agent_engine/adk_rag_agent_engine_demo/README.md This command downloads and installs the 'uv' package manager, a fast Python package installer and language tool. It is a prerequisite for managing project dependencies. ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Install Dependencies with pip Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/5_adk_deploy_gke/README.md Installs project dependencies using the standard `pip` package manager. This includes creating and activating a virtual environment, then installing from `requirements.txt`. ```bash # Navigate to parent directory cd 5_adk_deploy_gke # Create and activate virtual environment (recommended) python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt ``` -------------------------------- ### Install uv Package Manager Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/README.md Installs the `uv` package manager, a fast Python package installer and virtual environment manager. It provides commands for macOS/Linux and Windows. ```bash # On macOS and Linux curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` -------------------------------- ### agent-starter-pack create Command Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/adk_agent_cloudrun_demo/GEMINI.md Generates a new agent project directory based on a chosen template and configuration. Supports interactive and automated setup. ```APIDOC ## POST /agent-starter-pack create ### Description Generates a new agent project directory based on a chosen template and configuration. This command allows for both interactive and fully automated project setup. ### Method POST ### Endpoint /agent-starter-pack create ### Parameters #### Path Parameters - **PROJECT_NAME** (string) - Required - Name for your new project directory and base for GCP resource naming (max 26 chars, converted to lowercase). #### Query Parameters - **-a, --agent** (string) - Optional - Agent template. Can be built-in (e.g., `adk_base`, `agentic_rag`), remote (`adk@gemini-fullstack`, `github.com/user/repo@branch`), or local (`local@./path`). - **-d, --deployment-target** (string) - Optional - Target environment (`cloud_run` or `agent_engine`). - **--cicd-runner** (string) - Optional - CI/CD runner (`google_cloud_build` or `github_actions`). - **--region** (string) - Optional - GCP region (default: `us-central1`). - **-i, --include-data-ingestion** (boolean) - Optional - Include data ingestion pipeline. - **-ds, --datastore** (string) - Optional - Datastore type (`vertex_ai_search`, `vertex_ai_vector_search`, `alloydb`). - **--session-type** (string) - Optional - Session storage (`in_memory`, `alloydb`, `agent_engine`). - **-o, --output-dir** (string) - Optional - Output directory (default: current directory). - **--agent-directory, -dir** (string) - Optional - Agent code directory name (default: `app`). - **--in-folder** (boolean) - Optional - Create files in current directory instead of new subdirectory. - **--auto-approve** (boolean) - Optional - Skip all interactive prompts (crucial for automation). - **--skip-checks** (boolean) - Optional - Skip GCP/Vertex AI verification checks. - **--debug** (boolean) - Optional - Enable debug logging. ### Request Example ```bash uvx agent-starter-pack create my-automated-agent \ -a adk_base \ -d cloud_run \ --region us-central1 \ --auto-approve ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating successful project creation. #### Response Example ```json { "message": "Project 'my-automated-agent' created successfully." } ``` ``` -------------------------------- ### Install Dependencies with pip Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/README.md Installs project dependencies using the standard 'pip' package manager. This method involves creating and activating a virtual environment before installing packages from 'requirements.txt'. ```bash # Navigate to parent directory cd 4_adk_deploy_cloudrun # Create and activate virtual environment (recommended) python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt ``` -------------------------------- ### Install Dependencies with uv Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/README.md Installs project dependencies using the 'uv' package manager. This is the recommended method for managing Python packages and virtual environments. It requires 'uv' to be installed first. ```bash # Navigate to parent directory cd 4_adk_deploy_cloudrun # Install uv if not already installed curl -LsSf https://astral.sh/uv/install.sh | sh # Create virtual environment (if needed) uv venv # Install dependencies uv pip install -r requirements.txt ``` -------------------------------- ### Install Dependencies using pip Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/README.md Installs project dependencies using the standard 'pip' package manager. This method involves creating and activating a virtual environment before installing packages from a requirements file. ```bash cd 3_adk_deploy_agent_engine # Create and activate virtual environment (recommended) python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt ``` -------------------------------- ### Install Dependencies using uv Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/README.md Installs project dependencies using the 'uv' package manager. This is the recommended method for managing Python packages and virtual environments. It requires 'uv' to be installed globally. ```bash cd 3_adk_deploy_agent_engine # Install uv if not already installed curl -LsSf https://astral.sh/uv/install.sh | sh # Create virtual environment (if needed) uv venv # Install dependencies uv pip install -r requirements.txt ``` -------------------------------- ### Automated CI/CD Pipeline Setup Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/adk_agent_agentengine_demo/README.md Initiates a streamlined, one-command deployment of the entire CI/CD pipeline and infrastructure. This command handles infrastructure provisioning, CI/CD configuration, and repository connection. ```bash uvx agent-starter-pack setup-cicd ``` -------------------------------- ### ADK Project Structure Example Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/adk_agent_cloudrun_demo/GEMINI.md Illustrates the standard directory layout for an ADK project, including agent definitions, tools, data, environment variables, tests, and entry points. This structure aids in maintainability and leverages ADK CLI tools. ```text your_project_root/ ├── my_first_agent/ # Each folder is a distinct agent app │ ├── __init__.py # Makes `my_first_agent` a Python package (`from . import agent`) │ ├── agent.py # Contains `root_agent` definition and `LlmAgent`/WorkflowAgent instances │ ├── tools.py # Custom tool function definitions │ ├── data/ # Optional: static data, templates │ └── .env # Environment variables (API keys, project IDs) ├── my_second_agent/ │ ├── __init__.py │ └── agent.py ├── requirements.txt # Project's Python dependencies (e.g., google-adk, litellm) ├── tests/ # Unit and integration tests │ ├── unit/ │ │ └── test_tools.py │ └── integration/ │ └── test_my_first_agent.py │ └── my_first_agent.evalset.json # Evaluation dataset for `adk eval` └── main.py # Optional: Entry point for custom FastAPI server deployment ``` -------------------------------- ### Create a new agent project Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/4_adk_deploy_cloudrun/adk_agent_cloudrun_demo/GEMINI.md Generates a new agent project directory using the `agent-starter-pack create` command. This command supports various options for template selection, deployment targets, data ingestion, and automation. ```bash agent-starter-pack create PROJECT_NAME [OPTIONS] ``` -------------------------------- ### Install Google Cloud AI Platform SDK Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/6_adk_deploy_rag_to_agent_engine/adk_rag_agent_engine_demo/notebooks/adk_app_testing.ipynb Installs or upgrades the google-cloud-aiplatform package. This is a prerequisite for using Vertex AI services. ```python !pip install google-cloud-aiplatform --upgrade ``` -------------------------------- ### Local Development Setup Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/5_adk_deploy_gke/adk_agent_gke_demo/README.md Steps to configure the environment for local testing of the ADK agent. ```APIDOC ## Local Development ### Description Instructions to set up the local development environment for the ADK agent. ### Method N/A (Shell Commands) ### Endpoint N/A ### Steps 1. **Create `.env` file from `.env.example`**: ```bash cp .env.example .env ``` 2. **Edit `.env` file and set the following variables**: - `GOOGLE_GENAI_USE_VERTEXAI=False` (for local testing with API key) - `GOOGLE_API_KEY="your-api-key"` (obtain from https://aistudio.google.com/apikey) 3. **Run the ADK agent**: ```bash adk run adk_agent_gke_demo ``` 4. **Alternatively, start the web server**: ```bash python main.py ``` ``` -------------------------------- ### Initialize Agent Engine App for Local Testing Source: https://github.com/arjunprabhulal/adk-advanced/blob/main/3_adk_deploy_agent_engine/adk_agent_agentengine_demo/notebooks/adk_app_testing.ipynb Sets up the AgentEngineApp for local testing by importing the root agent and initializing the application. This requires specific environment setup. ```python # Uncomment the following lines if you're not using the virtual environment created by uv # import sys # sys.path.append("../") ``` ```python from app.agent import root_agent from app.agent_engine_app import AgentEngineApp agent_engine = AgentEngineApp(agent=root_agent) ```