Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions agent_starter_pack/agents/google_ads/.template/templateconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

description: "Google Ads management agent — audits, keywords, bidding, budgets, Quality Score"
example_question: "Show me my Google Ads campaign performance for the last 30 days"
settings:
requires_data_ingestion: false
requires_session: true
deployment_targets: ["agent_engine", "cloud_run", "none"]
extra_dependencies: ["google-adk>=1.15.0,<2.0.0", "google-ads>=25.1.0"]
tags: ["adk", "google-ads", "advertising"]
frontend_type: "None"
66 changes: 66 additions & 0 deletions agent_starter_pack/agents/google_ads/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Google Ads Management Agent

An ADK agent for Google Ads campaign analysis, auditing, and optimization using the Google Ads API.

## What It Does

This agent connects to a Google Ads account via the API and provides:

- **Account Summary** — Total spend, conversions, CPA, ROAS for any date range
- **Campaign Performance** — All campaigns ranked by spend with key metrics
- **Wasted Spend Analysis** — Search terms with clicks but zero conversions
- **Quality Score Audit** — Distribution across all keywords with improvement recommendations
- **Optimization Recommendations** — Google's own suggestions with projected conversion lift

## Setup

### Prerequisites

- Google Ads API developer token ([apply here](https://developers.google.com/google-ads/api/docs/get-started/dev-token))
- OAuth2 credentials for Google Ads API access
- A Google Ads account with campaign data

### Environment Variables

```bash
export GOOGLE_ADS_DEVELOPER_TOKEN="your-developer-token"
export GOOGLE_ADS_CUSTOMER_ID="123-456-7890"
export GOOGLE_ADS_LOGIN_CUSTOMER_ID="your-mcc-id" # if using MCC
```

The agent uses `google-ads` Python client library which reads credentials from environment variables or a `google-ads.yaml` file.

### Install Dependencies

```bash
pip install google-ads>=25.1.0 google-adk>=1.15.0
```

## Example Interactions

**User:** "Show me my account performance for the last 30 days"

**Agent:** Calls `get_account_summary(date_range="LAST_30_DAYS")`, presents spend, conversions, CPA, ROAS with analysis.

**User:** "Run a full audit of my account"

**Agent:** Chains 5 tool calls: account summary → campaign list → wasted spend → quality scores → recommendations. Presents structured findings with severity ratings.

**User:** "Where am I wasting money?"

**Agent:** Calls `find_wasted_spend()`, identifies search terms with zero conversions, calculates total waste, recommends negative keywords.

## Architecture

```
User → ADK Agent → Google Ads API (GAQL queries)
→ Gemini (analysis + recommendations)
```

The agent uses GAQL (Google Ads Query Language) to pull live data, then Gemini analyzes the results and provides expert-level recommendations.

## About

Created by [John Williams](https://itallstartedwithaidea.com) — Lead, Paid Media at Seer Interactive. Part of the [googleadsagent.ai](https://googleadsagent.ai) platform.

For the full skill library (73 skills across 10 categories), see [Agent Skills](https://github.com/itallstartedwithaidea/agent-skills).
13 changes: 13 additions & 0 deletions agent_starter_pack/agents/google_ads/app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Loading