This sample is an Agent Development Kit (ADK) multi-agent workflow that helps optimize retail product titles for brand search performance.
- Finds high-value keywords for a brand from product catalog data in BigQuery.
- Searches a target website using browser tooling.
- Compares top search results with your product data.
- Recommends title improvements to reduce zero/low-result search outcomes.
The root agent routes work to specialized sub-agents:
keyword_finding: extracts relevant brand keywords.search_results: navigates and analyzes search result pages.comparison: compares candidate titles and proposes improvements.
- Python 3.12+
uvinstalled: https://docs.astral.sh/uv/- Google Cloud project access
- Application Default Credentials:
gcloud auth application-default login- Clone the repository and open this agent directory:
git clone https://github.com/google/adk-samples.git
cd adk-samples/python/agents/brand-search-optimization- Create your environment file:
cp .env.example .env- Sync dependencies:
uv sync --dev- (Optional) Populate sample BigQuery data:
uv run python -m deployment.bq_populate_dataCLI mode:
uv run adk run brand_search_optimizationWeb UI mode:
uv run adk webThen select brand-search-optimization from the app dropdown.
uv run adk eval brand_search_optimization eval/data/eval_data1.evalset.json --config_file_path eval/data/test_config.jsonRun tests with warnings enabled:
uv run pytest -s -W defaultRun Ruff checks and formatting:
uv run ruff check . --fix
uv run ruff format .Run mypy:
uv run mypy .uv sync --group deployment
uv run python deployment/deploy.py --createFor a post-deploy validation flow, see deployment/test_deployment.py.
Environment variables are documented in .env.example.
Important variables:
GOOGLE_CLOUD_PROJECTGOOGLE_CLOUD_LOCATIONGOOGLE_GENAI_USE_VERTEXAIMODELDATASET_IDTABLE_IDDISABLE_WEB_DRIVERSTAGING_BUCKET
See tests/example_interaction.md for a full sample session.
This sample is for educational and prototyping use. It is not production hardened and should be reviewed, tested, and secured before production deployment.