This is not an officially supported Google product.
AdSpace Agent is designed to provide a standardized way to integrate an LLM with Google Ads, YouTube, Google Cloud, and Google Search to form a more comprehensive campaign and marketing plan for agencies.
Create a .env file in the root of the project. Here are the environment
variables required for the project:
# ADK
export GOOGLE_CLOUD_LOCATION=global
export GOOGLE_CLOUD_PROJECT=
export GOOGLE_GENAI_USE_VERTEXAI=TRUE
# Google API Toolsets
export CLIENT_ID=
export CLIENT_SECRET=
# Google Ads
# Required for: `adspace_agent/tools/google_ads.py`
# Reference:
# https://developers.google.com/google-ads/api/docs/client-libs/python/configuration#env-config-fields
# https://github.com/googleads/google-ads-python/blob/HEAD/google-ads.yaml
# https://developers.google.com/google-ads/api/docs/api-policy/developer-token
export GOOGLE_ADS_DEVELOPER_TOKEN=
export GOOGLE_ADS_LOGIN_CUSTOMER_ID=When deploying, you can set those environment variables in the Google Cloud user interface.
Install the dependencies with uv including all development dependencies:
uv sync --all-extrasRun the ADK webserver locally:
uv run adk webFollow the URL to open the web interface.
You can list all available tools for supported APIs using the list-tools
utility command. This is useful for discovering what operations the agent can
perform.
uv run list-tools google_adsuv run list-tools youtubeuv run list-tools google --api <api_name> --version <version>Example for Google Drive:
uv run list-tools google --api drive --version v3To deploy the application, you can use the Google Cloud user interface to set the environment variables. Refer to the previous section for instructions on how to set up the environment variables.
gcloud run deploy adspace-agent \
--source . \
--memory 4Gi \
--port 8000You will also need the following APIs enabled:
gcloud services enable \
aiplatform.googleapis.com \
bigquery.googleapis.com \
cloudbuild.googleapis.com \
dfareporting.googleapis.com \
displayvideo.googleapis.com \
doubleclickbidmanager.googleapis.com \
drive.googleapis.com \
googleads.googleapis.com \
run.googleapis.com \
merchantapi.googleapis.com \
searchads360.googleapis.com \
storage.googleapis.com \
youtube.googleapis.comWant to contribute? Learn more
