Skip to content

docs(deep-search): fix cloud deployment instructions and scaffold path (#2575) - #2629

Open
Anurag-M1 wants to merge 7 commits into
google:mainfrom
Anurag-M1:fix/deep-search-cloud-deployment-docs-2575
Open

Anurag-M1 wants to merge 7 commits into
google:mainfrom
Anurag-M1:fix/deep-search-cloud-deployment-docs-2575

Conversation

@Anurag-M1

@Anurag-M1 Anurag-M1 commented Sep 12, 2026

Copy link
Copy Markdown

What

Fixes #2575. Updates core/python/deep-search/README.md to resolve broken scaffolding and cloud deployment instructions, clarifies backend container vs custom React UI serving architecture, and removes unused imports in documentation code snippets.

Why

  • agents-cli create -a adk@deep-search fails with FileNotFoundError because the shorthand points to the legacy path python/agents/deep-search, which was removed in Delete old recipes which already have been copied to core or contrib #2618 when recipes moved to core/.
  • The local clone instructions referenced the stale path adk-samples/python/agents/deep-search.
  • The Cloud Deployment section instructed users to run non-existent Makefile commands (make deploy IAP=true and make deploy IAP=true PORT=5173).
  • Option 2 linked to the bare repo root of google/agents-cli for a non-existent "Deploy UI Guide", leaving users confused about how the React frontend communicates with the agent backend.
  • As confirmed by maintainers in [BUG]: python/agents/deep-search README Cloud Deployment section is broken #2575, the default generated container is backend-only. Users wishing to deploy the React frontend need a multi-stage Dockerfile and static file mount in FastAPI.

How it works

  1. Scaffold & Clone Commands (core/python/deep-search/README.md):

    • Replaced adk@deep-search with the full URL: https://github.com/google/adk-samples/tree/main/core/python/deep-search.
    • Updated the local clone path from adk-samples/python/agents/deep-search to adk-samples/core/python/deep-search.
  2. Cloud Deployment (core/python/deep-search/README.md):

    • Replaced non-existent make deploy targets with agents-cli deploy --iap and agents-cli deploy.
    • Clarified the frontend-backend communication pattern (local Vite dev proxy vs production static files).
    • Inlined a clean, production-ready multi-stage Dockerfile showing how to build the Vite/React frontend and bundle it with the FastAPI backend.
    • Provided the clean code snippet to mount static files in app/fast_api_app.py.

Testing

Verified locally with full test and validation suites:

$ uv run python tools/validate_readme.py core/python/deep-search
[PASS] All 1 recipe README(s) are present and valid.

$ uv run python tools/validate_structure.py core/python/deep-search
[PASS] All 1 recipe(s) passed structural checks.

$ uv run python3 .github/scripts/check_env_vars.py core/python/deep-search
[PASS] core/python/deep-search/.env.example: every environment variable read in Python source is declared (3 detected, 0 in the OS allowlist, 3 declared).

$ uv run --no-project --with pyyaml --with packaging python3 .github/scripts/check_recipe_pyproject.py core/python/deep-search
[PASS] core/python/deep-search/pyproject.toml: name, requires-python, description and default index all satisfy the repo rules.

$ git diff --name-only origin/main...HEAD | uv run python tools/check_frozen_paths.py
[PASS] No changes inside retired recipe folders.

$ uv run python tools/validate_placement.py
[PASS] Every recipe under skills/ is correctly placed.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Maintainability review — 1 finding(s).

Comment thread core/python/deep-search/app/config.py Outdated

critic_model: str = os.getenv("MODEL_NAME")
worker_model: str = os.getenv("MODEL_NAME")
critic_model: str = os.getenv("MODEL_NAME", "gemini-3.5-flash")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using hardcoded defaults on environment variable reads. There are two instances in this file; default values should be documented in .env.example instead.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Correctness review — 2 finding(s).

Comment thread core/python/deep-search/app/config.py Outdated

critic_model: str = os.getenv("MODEL_NAME")
worker_model: str = os.getenv("MODEL_NAME")
critic_model: str = os.getenv("MODEL_NAME", "gemini-3.5-flash")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid hardcoding a default model name in the environment read. The model name should be loaded from the environment variable, and the default belongs in .env.example.

Comment thread core/python/deep-search/app/config.py Outdated
critic_model: str = os.getenv("MODEL_NAME")
worker_model: str = os.getenv("MODEL_NAME")
critic_model: str = os.getenv("MODEL_NAME", "gemini-3.5-flash")
worker_model: str = os.getenv("MODEL_NAME", "gemini-3.5-flash")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid hardcoding a default model name in the environment read. The model name should be loaded from the environment variable, and the default belongs in .env.example.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Security review — 1 finding(s).

Comment thread core/python/deep-search/app/config.py Outdated

critic_model: str = os.getenv("MODEL_NAME")
worker_model: str = os.getenv("MODEL_NAME")
critic_model: str = os.getenv("MODEL_NAME", "gemini-3.5-flash")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using hardcoded defaults for environment reads in source files. Document the default values in .env.example instead (there are 2 instances in this file).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Hygiene review — 1 finding(s).

Comment thread core/python/deep-search/README.md Outdated
```python
from pathlib import Path
from fastapi.staticfiles import StaticFiles
from fastapi.responses import FileResponse

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import of FileResponse is unused in this code snippet. It should be removed to keep the example clean.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Security review — 1 finding(s).

RUN npm run build

# Stage 2: Backend + bundled frontend
FROM python:3.11-slim

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dockerfile example for the final stage lacks a USER directive, meaning the container runs as root by default. Add a USER instruction to run the container as a non-privileged user.

@github-actions

Copy link
Copy Markdown
Contributor

There is a problem with the Antigravity CLI Maintainability PR review. Please check the action logs for details.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Correctness review — 2 finding(s).

Comment thread core/python/deep-search/README.md Outdated
WORKDIR /app
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running uv sync before copying the source code will fail because uv expects the package source to be present to install the project by default. Add the --no-install-project flag to only sync dependencies first, or copy the source code before running the sync.

Comment thread core/python/deep-search/README.md Outdated

frontend_dist = Path("frontend/dist")
if frontend_dist.exists():
app.mount("/app", StaticFiles(directory=str(frontend_dist), html=True), name="frontend")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mounting the frontend at /app will cause asset loading failures (404 errors for /assets/...) unless the Vite build is specifically configured with base: "/app/". Mount the static files at the root / to serve the frontend as the main interface while keeping /api/* routed to ADK.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated House Rules review — 0 finding(s).

Also, on lines this PR does not change:

  • core/python/deep-search/frontend/vite.config.ts:1 — [MINOR] no .ts file in this recipe carries the standard Apache header (0 have a shorter notice, 3 have none) (core/python/deep-search/frontend/vite.config.ts; core/python/deep-search/frontend/src/vite-env.d.ts; core/python/deep-search/frontend/src/utils.ts)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Security review — 0 finding(s).

⚠️ This PR's diff was too large to review in full, so 33 file(s) were not looked at by this lane:

  • .agents/skills/github-pr-review/scripts/existing_comments.py
  • .agents/skills/github-pr-review/scripts/plan_review.py
  • .agents/skills/github-pr-review/scripts/post_comments.py
  • .agents/skills/github-pr-review/scripts/rejections.py
  • .agents/skills/github-pr-review/scripts/verify_findings.py
  • .agents/skills/github-pr-review/tests/conftest.py
  • .agents/skills/github-pr-review/tests/fixtures/pr2373_outcomes.json
  • .agents/skills/github-pr-review/tests/test_build_report.py
  • .agents/skills/github-pr-review/tests/test_check_house_rules.py
  • .agents/skills/github-pr-review/tests/test_house_rules_drift.py
  • .agents/skills/github-pr-review/tests/test_plan_review.py
  • .agents/skills/github-pr-review/tests/test_post_comments.py
  • .agents/skills/github-pr-review/tests/test_regression_pr2373.py
  • .agents/skills/github-pr-review/tests/test_rejections.py
  • .agents/skills/github-pr-review/tests/test_verify_findings.py
  • …and 18 more

Splitting the PR up would get them reviewed.


Round 4 · 8 of this PR's 25 automated comments used · this round is capped at 1 across all reviewers · only Security and Correctness still run.

@happyhuman
happyhuman self-requested a review September 14, 2026 16:04

@happyhuman happyhuman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at a few comments left by the bots, and address he failed workflow (all should be minor things).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: python/agents/deep-search README Cloud Deployment section is broken

2 participants