agent-starter-pack 0.3.3__py3-none-any.whl → 0.21.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_starter_pack/agents/README.md +7 -0
- agents/langgraph_base_react/template/.templateconfig.yaml → agent_starter_pack/agents/adk_a2a_base/.template/templateconfig.yaml +5 -10
- agent_starter_pack/agents/adk_a2a_base/README.md +37 -0
- src/deployment_targets/cloud_run/Dockerfile → agent_starter_pack/agents/adk_a2a_base/app/__init__.py +2 -14
- agent_starter_pack/agents/adk_a2a_base/app/agent.py +70 -0
- agent_starter_pack/agents/adk_a2a_base/notebooks/adk_a2a_app_testing.ipynb +583 -0
- agents/crewai_coding_crew/notebooks/evaluating_crewai_agent.ipynb → agent_starter_pack/agents/adk_a2a_base/notebooks/evaluating_adk_agent.ipynb +163 -199
- {agents/adk_base → agent_starter_pack/agents/adk_a2a_base}/tests/integration/test_agent.py +2 -2
- agents/adk_base/template/.templateconfig.yaml → agent_starter_pack/agents/adk_base/.template/templateconfig.yaml +4 -1
- {agents → agent_starter_pack/agents}/adk_base/README.md +1 -1
- agent_starter_pack/agents/adk_base/app/__init__.py +17 -0
- {agents → agent_starter_pack/agents}/adk_base/app/agent.py +5 -2
- {agents → agent_starter_pack/agents}/adk_base/notebooks/adk_app_testing.ipynb +128 -82
- agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb → agent_starter_pack/agents/adk_base/notebooks/evaluating_adk_agent.ipynb +181 -207
- agent_starter_pack/agents/adk_base/tests/integration/test_agent.py +58 -0
- agents/crewai_coding_crew/template/.templateconfig.yaml → agent_starter_pack/agents/adk_live/.template/templateconfig.yaml +5 -9
- agent_starter_pack/agents/adk_live/README.md +32 -0
- agent_starter_pack/agents/adk_live/app/__init__.py +17 -0
- agent_starter_pack/agents/adk_live/app/agent.py +51 -0
- agent_starter_pack/agents/adk_live/tests/unit/test_dummy.py +38 -0
- agents/agentic_rag/template/.templateconfig.yaml → agent_starter_pack/agents/agentic_rag/.template/templateconfig.yaml +7 -3
- {agents → agent_starter_pack/agents}/agentic_rag/README.md +1 -1
- agent_starter_pack/agents/agentic_rag/app/__init__.py +17 -0
- {agents → agent_starter_pack/agents}/agentic_rag/app/agent.py +8 -4
- {agents → agent_starter_pack/agents}/agentic_rag/notebooks/adk_app_testing.ipynb +128 -82
- agent_starter_pack/agents/agentic_rag/notebooks/evaluating_adk_agent.ipynb +1535 -0
- {agents → agent_starter_pack/agents}/agentic_rag/tests/integration/test_agent.py +3 -3
- agent_starter_pack/agents/langgraph_base/.template/templateconfig.yaml +31 -0
- agent_starter_pack/agents/langgraph_base/README.md +30 -0
- agent_starter_pack/agents/langgraph_base/app/__init__.py +17 -0
- agent_starter_pack/agents/langgraph_base/app/agent.py +34 -0
- {agents/crewai_coding_crew → agent_starter_pack/agents/langgraph_base}/notebooks/evaluating_langgraph_agent.ipynb +30 -17
- {agents/langgraph_base_react → agent_starter_pack/agents/langgraph_base}/tests/integration/test_agent.py +2 -2
- {src → agent_starter_pack}/base_template/.gitignore +5 -3
- agent_starter_pack/base_template/GEMINI.md +5 -0
- agent_starter_pack/base_template/Makefile +339 -0
- agent_starter_pack/base_template/README.md +267 -0
- agent_starter_pack/base_template/deployment/README.md +11 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/apis.tf +2 -2
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/apis.tf +6 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/iam.tf +12 -11
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/providers.tf +5 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/storage.tf +1 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/variables.tf +10 -10
- agent_starter_pack/base_template/deployment/terraform/dev/{% if cookiecutter.is_adk %}telemetry.tf{% else %}unused_telemetry.tf{% endif %} +193 -0
- agent_starter_pack/base_template/deployment/terraform/github.tf +337 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/iam.tf +20 -41
- {src → agent_starter_pack}/base_template/deployment/terraform/locals.tf +10 -3
- {src/resources/setup_cicd → agent_starter_pack/base_template/deployment/terraform}/providers.tf +8 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/service_accounts.tf +7 -8
- agent_starter_pack/base_template/deployment/terraform/sql/completions.sql +138 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/storage.tf +7 -16
- {src → agent_starter_pack}/base_template/deployment/terraform/variables.tf +61 -28
- {src → agent_starter_pack}/base_template/deployment/terraform/vars/env.tfvars +6 -1
- agent_starter_pack/base_template/deployment/terraform/{% if cookiecutter.cicd_runner == 'github_actions' %}wif.tf{% else %}unused_wif.tf{% endif %} +43 -0
- src/base_template/deployment/terraform/build_triggers.tf → agent_starter_pack/base_template/deployment/terraform/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}build_triggers.tf{% else %}unused_build_triggers.tf{% endif %} +55 -38
- agent_starter_pack/base_template/deployment/terraform/{% if cookiecutter.is_adk %}telemetry.tf{% else %}unused_telemetry.tf{% endif %} +206 -0
- {src → agent_starter_pack}/base_template/pyproject.toml +24 -37
- agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'github_actions' %}.github{% else %}unused_github{% endif %}/workflows/deploy-to-prod.yaml +132 -0
- agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'github_actions' %}.github{% else %}unused_github{% endif %}/workflows/pr_checks.yaml +65 -0
- agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'github_actions' %}.github{% else %}unused_github{% endif %}/workflows/staging.yaml +259 -0
- src/base_template/deployment/cd/deploy-to-prod.yaml → agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}.cloudbuild{% else %}unused_.cloudbuild{% endif %}/deploy-to-prod.yaml +38 -30
- src/base_template/deployment/ci/pr_checks.yaml → agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}.cloudbuild{% else %}unused_.cloudbuild{% endif %}/pr_checks.yaml +5 -5
- agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}.cloudbuild{% else %}unused_.cloudbuild{% endif %}/staging.yaml +322 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/telemetry.py +96 -0
- {src/base_template/app/utils → agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils}/typing.py +7 -9
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}converters{% else %}unused_converters{% endif %}/__init__.py +25 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}converters{% else %}unused_converters{% endif %}/part_converter.py +138 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}executor{% else %}unused_executor{% endif %}/__init__.py +13 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}executor{% else %}unused_executor{% endif %}/a2a_agent_executor.py +265 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}executor{% else %}unused_executor{% endif %}/task_result_aggregator.py +152 -0
- agent_starter_pack/cli/commands/create.py +1256 -0
- agent_starter_pack/cli/commands/enhance.py +611 -0
- agent_starter_pack/cli/commands/list.py +203 -0
- agent_starter_pack/cli/commands/register_gemini_enterprise.py +1070 -0
- agent_starter_pack/cli/commands/setup_cicd.py +862 -0
- {src → agent_starter_pack}/cli/main.py +10 -2
- {src → agent_starter_pack}/cli/utils/cicd.py +139 -48
- agent_starter_pack/cli/utils/gcp.py +263 -0
- agent_starter_pack/cli/utils/logging.py +103 -0
- agent_starter_pack/cli/utils/remote_template.py +677 -0
- agent_starter_pack/cli/utils/template.py +1466 -0
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/components/process_data.py +1 -1
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/submit_pipeline.py +20 -6
- {src → agent_starter_pack}/data_ingestion/pyproject.toml +1 -0
- {src → agent_starter_pack}/data_ingestion/uv.lock +602 -494
- agent_starter_pack/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py +484 -0
- agent_starter_pack/deployment_targets/agent_engine/tests/load_test/README.md +84 -0
- agent_starter_pack/deployment_targets/agent_engine/tests/load_test/load_test.py +424 -0
- agent_starter_pack/deployment_targets/agent_engine/tests/{% if cookiecutter.is_a2a %}helpers.py{% else %}unused_helpers.py{% endif %} +138 -0
- agent_starter_pack/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/agent_engine_app.py +263 -0
- agent_starter_pack/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/app_utils/deploy.py +414 -0
- agent_starter_pack/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_adk_live %}expose_app.py{% else %}unused_expose_app.py{% endif %} +519 -0
- agent_starter_pack/deployment_targets/cloud_run/Dockerfile +51 -0
- agent_starter_pack/deployment_targets/cloud_run/deployment/terraform/dev/service.tf +243 -0
- agent_starter_pack/deployment_targets/cloud_run/deployment/terraform/service.tf +417 -0
- agent_starter_pack/deployment_targets/cloud_run/tests/integration/test_server_e2e.py +705 -0
- agent_starter_pack/deployment_targets/cloud_run/tests/load_test/.results/.placeholder +321 -0
- agent_starter_pack/deployment_targets/cloud_run/tests/load_test/README.md +165 -0
- agent_starter_pack/deployment_targets/cloud_run/tests/load_test/load_test.py +329 -0
- agent_starter_pack/deployment_targets/cloud_run/{{cookiecutter.agent_directory}}/fast_api_app.py +556 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/package-lock.json +79 -1044
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/package.json +1 -9
- agent_starter_pack/frontends/adk_live_react/frontend/src/App.tsx +65 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/logger/Logger.tsx +8 -3
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/logger/logger.scss +26 -0
- agent_starter_pack/frontends/adk_live_react/frontend/src/components/side-panel/SidePanel.tsx +516 -0
- agent_starter_pack/frontends/adk_live_react/frontend/src/components/side-panel/side-panel.scss +563 -0
- agent_starter_pack/frontends/adk_live_react/frontend/src/components/transcription-preview/TranscriptionPreview.tsx +106 -0
- agent_starter_pack/frontends/adk_live_react/frontend/src/components/transcription-preview/transcription-preview.scss +150 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/hooks/use-live-api.ts +8 -2
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/multimodal-live-types.ts +40 -2
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/audio-recorder.ts +1 -1
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/audio-streamer.ts +1 -1
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/multimodal-live-client.ts +210 -24
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/utils.ts +27 -5
- agent_starter_pack/resources/docs/adk-cheatsheet.md +1628 -0
- agent_starter_pack/resources/locks/uv-adk_a2a_base-agent_engine.lock +4966 -0
- agent_starter_pack/resources/locks/uv-adk_a2a_base-cloud_run.lock +5011 -0
- agent_starter_pack/resources/locks/uv-adk_base-agent_engine.lock +4946 -0
- agent_starter_pack/resources/locks/uv-adk_base-cloud_run.lock +4991 -0
- agent_starter_pack/resources/locks/uv-adk_live-agent_engine.lock +4963 -0
- agent_starter_pack/resources/locks/uv-adk_live-cloud_run.lock +5006 -0
- agent_starter_pack/resources/locks/uv-agentic_rag-agent_engine.lock +5487 -0
- agent_starter_pack/resources/locks/uv-agentic_rag-cloud_run.lock +5532 -0
- agent_starter_pack/resources/locks/uv-langgraph_base-agent_engine.lock +5788 -0
- agent_starter_pack/resources/locks/uv-langgraph_base-cloud_run.lock +5811 -0
- {src → agent_starter_pack}/utils/generate_locks.py +15 -12
- {src → agent_starter_pack}/utils/lock_utils.py +4 -7
- {src → agent_starter_pack}/utils/watch_and_rebuild.py +2 -2
- agent_starter_pack-0.21.0.dist-info/METADATA +182 -0
- agent_starter_pack-0.21.0.dist-info/RECORD +171 -0
- agent_starter_pack-0.21.0.dist-info/entry_points.txt +2 -0
- llm.txt +362 -0
- agent_starter_pack-0.3.3.dist-info/METADATA +0 -164
- agent_starter_pack-0.3.3.dist-info/RECORD +0 -176
- agent_starter_pack-0.3.3.dist-info/entry_points.txt +0 -2
- agents/crewai_coding_crew/README.md +0 -34
- agents/crewai_coding_crew/app/agent.py +0 -86
- agents/crewai_coding_crew/app/crew/config/agents.yaml +0 -39
- agents/crewai_coding_crew/app/crew/config/tasks.yaml +0 -37
- agents/crewai_coding_crew/app/crew/crew.py +0 -71
- agents/crewai_coding_crew/tests/integration/test_agent.py +0 -47
- agents/langgraph_base_react/README.md +0 -9
- agents/langgraph_base_react/app/agent.py +0 -73
- agents/live_api/README.md +0 -37
- agents/live_api/app/agent.py +0 -78
- agents/live_api/app/server.py +0 -196
- agents/live_api/app/templates.py +0 -51
- agents/live_api/app/vector_store.py +0 -55
- agents/live_api/template/.templateconfig.yaml +0 -29
- agents/live_api/tests/integration/test_server_e2e.py +0 -254
- agents/live_api/tests/load_test/load_test.py +0 -40
- agents/live_api/tests/unit/test_server.py +0 -143
- src/base_template/Makefile +0 -72
- src/base_template/README.md +0 -208
- src/base_template/app/__init__.py +0 -3
- src/base_template/app/utils/tracing.py +0 -155
- src/base_template/deployment/README.md +0 -126
- src/base_template/deployment/cd/staging.yaml +0 -216
- src/base_template/deployment/terraform/dev/log_sinks.tf +0 -63
- src/base_template/deployment/terraform/log_sinks.tf +0 -70
- src/base_template/deployment/terraform/providers.tf +0 -37
- src/cli/commands/create.py +0 -664
- src/cli/commands/setup_cicd.py +0 -829
- src/cli/utils/gcp.py +0 -117
- src/cli/utils/logging.py +0 -51
- src/cli/utils/template.py +0 -737
- src/deployment_targets/agent_engine/app/agent_engine_app.py +0 -336
- src/deployment_targets/agent_engine/notebooks/intro_agent_engine.ipynb +0 -1025
- src/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py +0 -183
- src/deployment_targets/agent_engine/tests/load_test/README.md +0 -42
- src/deployment_targets/agent_engine/tests/load_test/load_test.py +0 -107
- src/deployment_targets/cloud_run/app/server.py +0 -154
- src/deployment_targets/cloud_run/tests/integration/test_server_e2e.py +0 -249
- src/deployment_targets/cloud_run/tests/load_test/.results/.placeholder +0 -0
- src/deployment_targets/cloud_run/tests/load_test/README.md +0 -83
- src/deployment_targets/cloud_run/tests/load_test/load_test.py +0 -118
- src/deployment_targets/cloud_run/uv.lock +0 -6952
- src/frontends/live_api_react/frontend/src/App.tsx +0 -205
- src/frontends/live_api_react/frontend/src/components/control-tray/ControlTray.tsx +0 -217
- src/frontends/live_api_react/frontend/src/components/control-tray/control-tray.scss +0 -201
- src/frontends/live_api_react/frontend/src/components/side-panel/SidePanel.tsx +0 -161
- src/frontends/live_api_react/frontend/src/components/side-panel/side-panel.scss +0 -285
- src/frontends/streamlit/frontend/side_bar.py +0 -214
- src/frontends/streamlit/frontend/streamlit_app.py +0 -265
- src/frontends/streamlit/frontend/style/app_markdown.py +0 -37
- src/frontends/streamlit/frontend/utils/chat_utils.py +0 -67
- src/frontends/streamlit/frontend/utils/local_chat_history.py +0 -125
- src/frontends/streamlit/frontend/utils/message_editing.py +0 -59
- src/frontends/streamlit/frontend/utils/multimodal_utils.py +0 -217
- src/frontends/streamlit/frontend/utils/stream_handler.py +0 -301
- src/frontends/streamlit/frontend/utils/title_summary.py +0 -94
- src/frontends/streamlit_adk/frontend/side_bar.py +0 -214
- src/frontends/streamlit_adk/frontend/streamlit_app.py +0 -314
- src/frontends/streamlit_adk/frontend/style/app_markdown.py +0 -37
- src/frontends/streamlit_adk/frontend/utils/chat_utils.py +0 -84
- src/frontends/streamlit_adk/frontend/utils/local_chat_history.py +0 -110
- src/frontends/streamlit_adk/frontend/utils/message_editing.py +0 -61
- src/frontends/streamlit_adk/frontend/utils/multimodal_utils.py +0 -223
- src/frontends/streamlit_adk/frontend/utils/stream_handler.py +0 -311
- src/frontends/streamlit_adk/frontend/utils/title_summary.py +0 -129
- src/resources/containers/data_processing/Dockerfile +0 -27
- src/resources/containers/e2e-tests/Dockerfile +0 -19
- src/resources/idx/.idx/dev.nix +0 -57
- src/resources/idx/idx-template.json +0 -21
- src/resources/idx/idx-template.nix +0 -26
- src/resources/locks/uv-adk_base-agent_engine.lock +0 -5338
- src/resources/locks/uv-adk_base-cloud_run.lock +0 -5930
- src/resources/locks/uv-agentic_rag-agent_engine.lock +0 -5528
- src/resources/locks/uv-agentic_rag-cloud_run.lock +0 -6120
- src/resources/locks/uv-crewai_coding_crew-agent_engine.lock +0 -6231
- src/resources/locks/uv-crewai_coding_crew-cloud_run.lock +0 -6839
- src/resources/locks/uv-langgraph_base_react-agent_engine.lock +0 -5233
- src/resources/locks/uv-langgraph_base_react-cloud_run.lock +0 -5862
- src/resources/locks/uv-live_api-cloud_run.lock +0 -5832
- src/resources/setup_cicd/cicd_variables.tf +0 -41
- src/resources/setup_cicd/github.tf +0 -87
- {agents → agent_starter_pack/agents}/agentic_rag/app/retrievers.py +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/app/templates.py +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/vars/env.tfvars +0 -0
- {src → agent_starter_pack}/base_template/tests/unit/test_dummy.py +0 -0
- {src/deployment_targets/agent_engine/app/utils → agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils}/gcs.py +0 -0
- {src → agent_starter_pack}/cli/utils/__init__.py +0 -0
- {src → agent_starter_pack}/cli/utils/datastores.py +0 -0
- {src → agent_starter_pack}/cli/utils/version.py +0 -0
- {src → agent_starter_pack}/data_ingestion/README.md +0 -0
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/components/ingest_data.py +0 -0
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/pipeline.py +0 -0
- {src → agent_starter_pack}/deployment_targets/agent_engine/deployment_metadata.json +0 -0
- {src → agent_starter_pack}/deployment_targets/agent_engine/tests/load_test/.results/.placeholder +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/public/favicon.ico +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/public/index.html +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/public/robots.txt +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/App.scss +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/App.test.tsx +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/audio-pulse/AudioPulse.tsx +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/audio-pulse/audio-pulse.scss +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/logger/mock-logs.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/contexts/LiveAPIContext.tsx +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/hooks/use-media-stream-mux.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/hooks/use-screen-capture.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/hooks/use-webcam.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/index.css +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/index.tsx +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/react-app-env.d.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/reportWebVitals.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/setupTests.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/audioworklet-registry.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/store-logger.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/worklets/audio-processing.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/worklets/vol-meter.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/tsconfig.json +0 -0
- {agent_starter_pack-0.3.3.dist-info → agent_starter_pack-0.21.0.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.3.3.dist-info → agent_starter_pack-0.21.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -17,24 +17,15 @@ provider "google" {
|
|
|
17
17
|
user_project_override = true
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
resource "google_storage_bucket" "bucket_load_test_results" {
|
|
21
|
-
name = "${var.cicd_runner_project_id}-${var.project_name}-load-test"
|
|
22
|
-
location = var.region
|
|
23
|
-
project = var.cicd_runner_project_id
|
|
24
|
-
uniform_bucket_level_access = true
|
|
25
|
-
force_destroy = true
|
|
26
|
-
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.shared_services]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
20
|
resource "google_storage_bucket" "logs_data_bucket" {
|
|
30
21
|
for_each = toset(local.all_project_ids)
|
|
31
|
-
name = "${each.value}-${var.project_name}-logs
|
|
22
|
+
name = "${each.value}-${var.project_name}-logs"
|
|
32
23
|
location = var.region
|
|
33
24
|
project = each.value
|
|
34
25
|
uniform_bucket_level_access = true
|
|
35
26
|
force_destroy = true
|
|
36
27
|
|
|
37
|
-
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.
|
|
28
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
38
29
|
}
|
|
39
30
|
{% if cookiecutter.deployment_target == 'cloud_run' %}
|
|
40
31
|
resource "google_artifact_registry_repository" "repo-artifacts-genai" {
|
|
@@ -43,7 +34,7 @@ resource "google_artifact_registry_repository" "repo-artifacts-genai" {
|
|
|
43
34
|
description = "Repo for Generative AI applications"
|
|
44
35
|
format = "DOCKER"
|
|
45
36
|
project = var.cicd_runner_project_id
|
|
46
|
-
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.
|
|
37
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
47
38
|
}
|
|
48
39
|
{% endif %}
|
|
49
40
|
|
|
@@ -56,7 +47,7 @@ resource "google_storage_bucket" "data_ingestion_pipeline_gcs_root" {
|
|
|
56
47
|
uniform_bucket_level_access = true
|
|
57
48
|
force_destroy = true
|
|
58
49
|
|
|
59
|
-
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.
|
|
50
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
60
51
|
}
|
|
61
52
|
|
|
62
53
|
{% if cookiecutter.datastore_type == "vertex_ai_search" %}
|
|
@@ -71,7 +62,7 @@ resource "google_discovery_engine_data_store" "data_store_staging" {
|
|
|
71
62
|
solution_types = ["SOLUTION_TYPE_SEARCH"]
|
|
72
63
|
create_advanced_site_search = false
|
|
73
64
|
provider = google.staging_billing_override
|
|
74
|
-
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.
|
|
65
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
75
66
|
}
|
|
76
67
|
|
|
77
68
|
resource "google_discovery_engine_search_engine" "search_engine_staging" {
|
|
@@ -97,7 +88,7 @@ resource "google_discovery_engine_data_store" "data_store_prod" {
|
|
|
97
88
|
solution_types = ["SOLUTION_TYPE_SEARCH"]
|
|
98
89
|
create_advanced_site_search = false
|
|
99
90
|
provider = google.prod_billing_override
|
|
100
|
-
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.
|
|
91
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
101
92
|
}
|
|
102
93
|
|
|
103
94
|
resource "google_discovery_engine_search_engine" "search_engine_prod" {
|
|
@@ -122,7 +113,7 @@ resource "google_storage_bucket" "vector_search_data_bucket" {
|
|
|
122
113
|
uniform_bucket_level_access = true
|
|
123
114
|
force_destroy = true
|
|
124
115
|
|
|
125
|
-
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.
|
|
116
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
126
117
|
}
|
|
127
118
|
|
|
128
119
|
resource "google_vertex_ai_index" "vector_search_index_staging" {
|
|
@@ -40,8 +40,9 @@ variable "region" {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
variable "host_connection_name" {
|
|
43
|
-
description = "Name of the host connection
|
|
43
|
+
description = "Name of the host connection to create in Cloud Build"
|
|
44
44
|
type = string
|
|
45
|
+
default = "{{ cookiecutter.project_name }}-github-connection"
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
variable "repository_name" {
|
|
@@ -49,41 +50,25 @@ variable "repository_name" {
|
|
|
49
50
|
type = string
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
variable "
|
|
53
|
-
|
|
54
|
-
description = "Log Sink filter for capturing telemetry data. Captures logs with the `traceloop.association.properties.log_type` attribute set to `tracing`."
|
|
55
|
-
{%- if "adk" in cookiecutter.tags %}
|
|
56
|
-
default = "labels.service_name=\"{{cookiecutter.project_name}}\" labels.type=\"agent_telemetry\""
|
|
57
|
-
{%- else %}
|
|
58
|
-
default = "jsonPayload.attributes.\"traceloop.association.properties.log_type\"=\"tracing\" jsonPayload.resource.attributes.\"service.name\"=\"{{cookiecutter.project_name}}\""
|
|
59
|
-
{%- endif %}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
variable "feedback_logs_filter" {
|
|
63
|
-
type = string
|
|
64
|
-
description = "Log Sink filter for capturing feedback data. Captures logs where the `log_type` field is `feedback`."
|
|
65
|
-
default = "jsonPayload.log_type=\"feedback\""
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
{% if cookiecutter.deployment_target == 'cloud_run' %}
|
|
69
|
-
variable "cloud_run_app_roles" {
|
|
70
|
-
description = "List of roles to assign to the Cloud Run app service account"
|
|
71
|
-
{% elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
72
|
-
variable "agentengine_sa_roles" {
|
|
73
|
-
description = "List of roles to assign to the Agent Engine service account"
|
|
74
|
-
{% endif %}
|
|
53
|
+
variable "app_sa_roles" {
|
|
54
|
+
description = "List of roles to assign to the application service account"
|
|
75
55
|
type = list(string)
|
|
76
56
|
default = [
|
|
77
|
-
|
|
78
|
-
"roles/run.invoker",
|
|
79
|
-
{%- endif %}
|
|
57
|
+
|
|
80
58
|
"roles/aiplatform.user",
|
|
81
59
|
"roles/discoveryengine.editor",
|
|
82
60
|
"roles/logging.logWriter",
|
|
83
61
|
"roles/cloudtrace.agent",
|
|
84
|
-
"roles/storage.admin"
|
|
62
|
+
"roles/storage.admin",
|
|
63
|
+
"roles/serviceusage.serviceUsageConsumer",
|
|
64
|
+
{%- if cookiecutter.session_type == "cloud_sql" %}
|
|
65
|
+
"roles/cloudsql.client",
|
|
66
|
+
"roles/secretmanager.secretAccessor",
|
|
67
|
+
{%- endif %}
|
|
85
68
|
]
|
|
86
69
|
}
|
|
70
|
+
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
71
|
+
{%- endif %}
|
|
87
72
|
|
|
88
73
|
variable "cicd_roles" {
|
|
89
74
|
description = "List of roles to assign to the CICD runner service account in the CICD project"
|
|
@@ -183,3 +168,51 @@ variable "vector_search_machine_type" {
|
|
|
183
168
|
}
|
|
184
169
|
{% endif %}
|
|
185
170
|
{% endif %}
|
|
171
|
+
variable "repository_owner" {
|
|
172
|
+
description = "Owner of the Git repository - username or organization"
|
|
173
|
+
type = string
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
{% if cookiecutter.cicd_runner == "github_actions" %}
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
variable "create_repository" {
|
|
180
|
+
description = "Flag indicating whether to create a new Git repository"
|
|
181
|
+
type = bool
|
|
182
|
+
default = false
|
|
183
|
+
}
|
|
184
|
+
{% else %}
|
|
185
|
+
variable "github_app_installation_id" {
|
|
186
|
+
description = "GitHub App Installation ID for Cloud Build"
|
|
187
|
+
type = string
|
|
188
|
+
default = null
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
variable "github_pat_secret_id" {
|
|
193
|
+
description = "GitHub PAT Secret ID created by gcloud CLI"
|
|
194
|
+
type = string
|
|
195
|
+
default = null
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
variable "create_cb_connection" {
|
|
199
|
+
description = "Flag indicating if a Cloud Build connection already exists"
|
|
200
|
+
type = bool
|
|
201
|
+
default = false
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
variable "create_repository" {
|
|
205
|
+
description = "Flag indicating whether to create a new Git repository"
|
|
206
|
+
type = bool
|
|
207
|
+
default = false
|
|
208
|
+
}
|
|
209
|
+
{% endif %}
|
|
210
|
+
{% if cookiecutter.is_adk %}
|
|
211
|
+
|
|
212
|
+
variable "feedback_logs_filter" {
|
|
213
|
+
type = string
|
|
214
|
+
description = "Log Sink filter for capturing feedback data. Captures logs where the `log_type` field is `feedback`."
|
|
215
|
+
default = "jsonPayload.log_type=\"feedback\" jsonPayload.service_name=\"{{cookiecutter.project_name}}\""
|
|
216
|
+
}
|
|
217
|
+
{% endif %}
|
|
218
|
+
|
|
@@ -10,11 +10,16 @@ staging_project_id = "your-staging-project-id"
|
|
|
10
10
|
# Your Google Cloud project ID that will be used to host the Cloud Build pipelines.
|
|
11
11
|
cicd_runner_project_id = "your-cicd-project-id"
|
|
12
12
|
|
|
13
|
+
{%- if cookiecutter.cicd_runner == "google_cloud_build" %}
|
|
13
14
|
# Name of the host connection you created in Cloud Build
|
|
14
15
|
host_connection_name = "git-{{cookiecutter.project_name}}"
|
|
16
|
+
github_pat_secret_id = "your-github_pat_secret_id"
|
|
17
|
+
{%- endif %}
|
|
18
|
+
|
|
19
|
+
repository_owner = "Your GitHub organization or username."
|
|
15
20
|
|
|
16
21
|
# Name of the repository you added to Cloud Build
|
|
17
|
-
repository_name = "
|
|
22
|
+
repository_name = "{{cookiecutter.project_name}}"
|
|
18
23
|
|
|
19
24
|
# The Google Cloud region you will use to deploy the infrastructure
|
|
20
25
|
region = "us-central1"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
data "google_project" "cicd_project" {
|
|
3
|
+
project_id = var.cicd_runner_project_id
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
resource "google_service_account_iam_member" "github_oidc_access" {
|
|
7
|
+
service_account_id = resource.google_service_account.cicd_runner_sa.name
|
|
8
|
+
role = "roles/iam.workloadIdentityUser"
|
|
9
|
+
member = "principalSet://iam.googleapis.com/projects/${data.google_project.cicd_project.number}/locations/global/workloadIdentityPools/${google_iam_workload_identity_pool.github_pool.workload_identity_pool_id}/attribute.repository/${var.repository_owner}/${var.repository_name}"
|
|
10
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
# Allow the GitHub Actions principal to impersonate the CICD runner service account
|
|
14
|
+
resource "google_service_account_iam_member" "github_sa_impersonation" {
|
|
15
|
+
service_account_id = resource.google_service_account.cicd_runner_sa.name
|
|
16
|
+
role = "roles/iam.serviceAccountTokenCreator"
|
|
17
|
+
member = "principalSet://iam.googleapis.com/projects/${data.google_project.cicd_project.number}/locations/global/workloadIdentityPools/${google_iam_workload_identity_pool.github_pool.workload_identity_pool_id}/attribute.repository/${var.repository_owner}/${var.repository_name}"
|
|
18
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
resource "google_iam_workload_identity_pool" "github_pool" {
|
|
22
|
+
workload_identity_pool_id = "${var.project_name}-pool"
|
|
23
|
+
project = var.cicd_runner_project_id
|
|
24
|
+
display_name = "GitHub Actions Pool"
|
|
25
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
resource "google_iam_workload_identity_pool_provider" "github_provider" {
|
|
29
|
+
workload_identity_pool_provider_id = "${var.project_name}-oidc"
|
|
30
|
+
project = var.cicd_runner_project_id
|
|
31
|
+
workload_identity_pool_id = google_iam_workload_identity_pool.github_pool.workload_identity_pool_id
|
|
32
|
+
display_name = "GitHub OIDC Provider"
|
|
33
|
+
oidc {
|
|
34
|
+
issuer_uri = "https://token.actions.githubusercontent.com"
|
|
35
|
+
}
|
|
36
|
+
attribute_mapping = {
|
|
37
|
+
"google.subject" = "assertion.sub"
|
|
38
|
+
"attribute.repository" = "assertion.repository"
|
|
39
|
+
"attribute.repository_owner" = "assertion.repository_owner"
|
|
40
|
+
}
|
|
41
|
+
attribute_condition = "attribute.repository == '${var.repository_owner}/${var.repository_name}'"
|
|
42
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
43
|
+
}
|
|
@@ -27,9 +27,9 @@ resource "google_cloudbuild_trigger" "pr_checks" {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
filename = "
|
|
30
|
+
filename = ".cloudbuild/pr_checks.yaml"
|
|
31
31
|
included_files = [
|
|
32
|
-
"
|
|
32
|
+
"{{cookiecutter.agent_directory}}/**",
|
|
33
33
|
"data_ingestion/**",
|
|
34
34
|
"tests/**",
|
|
35
35
|
"deployment/**",
|
|
@@ -39,7 +39,12 @@ resource "google_cloudbuild_trigger" "pr_checks" {
|
|
|
39
39
|
{% endif %}
|
|
40
40
|
]
|
|
41
41
|
include_build_logs = "INCLUDE_BUILD_LOGS_WITH_STATUS"
|
|
42
|
-
depends_on = [
|
|
42
|
+
depends_on = [
|
|
43
|
+
resource.google_project_service.cicd_services,
|
|
44
|
+
resource.google_project_service.deploy_project_services,
|
|
45
|
+
google_cloudbuildv2_connection.github_connection,
|
|
46
|
+
google_cloudbuildv2_repository.repo
|
|
47
|
+
]
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
# b. Create CD pipeline trigger
|
|
@@ -57,9 +62,9 @@ resource "google_cloudbuild_trigger" "cd_pipeline" {
|
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
|
|
60
|
-
filename = "
|
|
65
|
+
filename = ".cloudbuild/staging.yaml"
|
|
61
66
|
included_files = [
|
|
62
|
-
"
|
|
67
|
+
"{{cookiecutter.agent_directory}}/**",
|
|
63
68
|
"data_ingestion/**",
|
|
64
69
|
"tests/**",
|
|
65
70
|
"deployment/**",
|
|
@@ -68,30 +73,35 @@ resource "google_cloudbuild_trigger" "cd_pipeline" {
|
|
|
68
73
|
include_build_logs = "INCLUDE_BUILD_LOGS_WITH_STATUS"
|
|
69
74
|
substitutions = {
|
|
70
75
|
_STAGING_PROJECT_ID = var.staging_project_id
|
|
71
|
-
|
|
76
|
+
_LOGS_BUCKET_NAME_STAGING = resource.google_storage_bucket.logs_data_bucket[var.staging_project_id].name
|
|
77
|
+
_APP_SERVICE_ACCOUNT_STAGING = google_service_account.app_sa["staging"].email
|
|
72
78
|
_REGION = var.region
|
|
73
|
-
{
|
|
79
|
+
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
74
80
|
_CONTAINER_NAME = var.project_name
|
|
75
81
|
_ARTIFACT_REGISTRY_REPO_NAME = resource.google_artifact_registry_repository.repo-artifacts-genai.repository_id
|
|
76
|
-
|
|
77
|
-
{
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
83
|
+
{%- endif %}
|
|
84
|
+
{%- if cookiecutter.data_ingestion %}
|
|
85
|
+
_PIPELINE_GCS_ROOT_STAGING = "gs://${resource.google_storage_bucket.data_ingestion_pipeline_gcs_root["staging"].name}"
|
|
86
|
+
_PIPELINE_SA_EMAIL_STAGING = resource.google_service_account.vertexai_pipeline_app_sa["staging"].email
|
|
81
87
|
_PIPELINE_CRON_SCHEDULE = var.pipeline_cron_schedule
|
|
82
|
-
{
|
|
83
|
-
|
|
88
|
+
{%- if cookiecutter.datastore_type == "vertex_ai_search" %}
|
|
89
|
+
_DATA_STORE_ID_STAGING = resource.google_discovery_engine_data_store.data_store_staging.data_store_id
|
|
84
90
|
_DATA_STORE_REGION = var.data_store_region
|
|
85
|
-
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
{
|
|
91
|
-
{% endif %}
|
|
91
|
+
{%- elif cookiecutter.datastore_type == "vertex_ai_vector_search" %}
|
|
92
|
+
_VECTOR_SEARCH_INDEX_STAGING = resource.google_vertex_ai_index.vector_search_index_staging.id
|
|
93
|
+
_VECTOR_SEARCH_INDEX_ENDPOINT_STAGING = resource.google_vertex_ai_index_endpoint.vector_search_index_endpoint_staging.id
|
|
94
|
+
_VECTOR_SEARCH_BUCKET_STAGING = resource.google_storage_bucket.vector_search_data_bucket["staging"].url
|
|
95
|
+
{%- endif %}
|
|
96
|
+
{%- endif %}
|
|
92
97
|
# Your other CD Pipeline substitutions
|
|
93
98
|
}
|
|
94
|
-
depends_on = [
|
|
99
|
+
depends_on = [
|
|
100
|
+
resource.google_project_service.cicd_services,
|
|
101
|
+
resource.google_project_service.deploy_project_services,
|
|
102
|
+
google_cloudbuildv2_connection.github_connection,
|
|
103
|
+
google_cloudbuildv2_repository.repo
|
|
104
|
+
]
|
|
95
105
|
|
|
96
106
|
}
|
|
97
107
|
|
|
@@ -105,34 +115,41 @@ resource "google_cloudbuild_trigger" "deploy_to_prod_pipeline" {
|
|
|
105
115
|
repository_event_config {
|
|
106
116
|
repository = "projects/${var.cicd_runner_project_id}/locations/${var.region}/connections/${var.host_connection_name}/repositories/${var.repository_name}"
|
|
107
117
|
}
|
|
108
|
-
filename = "
|
|
118
|
+
filename = ".cloudbuild/deploy-to-prod.yaml"
|
|
109
119
|
include_build_logs = "INCLUDE_BUILD_LOGS_WITH_STATUS"
|
|
110
120
|
approval_config {
|
|
111
121
|
approval_required = true
|
|
112
122
|
}
|
|
113
123
|
substitutions = {
|
|
114
124
|
_PROD_PROJECT_ID = var.prod_project_id
|
|
125
|
+
_LOGS_BUCKET_NAME_PROD = resource.google_storage_bucket.logs_data_bucket[var.prod_project_id].name
|
|
126
|
+
_APP_SERVICE_ACCOUNT_PROD = google_service_account.app_sa["prod"].email
|
|
115
127
|
_REGION = var.region
|
|
116
|
-
{
|
|
128
|
+
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
117
129
|
_CONTAINER_NAME = var.project_name
|
|
118
130
|
_ARTIFACT_REGISTRY_REPO_NAME = resource.google_artifact_registry_repository.repo-artifacts-genai.repository_id
|
|
119
|
-
|
|
120
|
-
{
|
|
121
|
-
{
|
|
122
|
-
|
|
123
|
-
|
|
131
|
+
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
132
|
+
{%- endif %}
|
|
133
|
+
{%- if cookiecutter.data_ingestion %}
|
|
134
|
+
_PIPELINE_GCS_ROOT_PROD = "gs://${resource.google_storage_bucket.data_ingestion_pipeline_gcs_root["prod"].name}"
|
|
135
|
+
_PIPELINE_SA_EMAIL_PROD = resource.google_service_account.vertexai_pipeline_app_sa["prod"].email
|
|
124
136
|
_PIPELINE_CRON_SCHEDULE = var.pipeline_cron_schedule
|
|
125
|
-
{
|
|
126
|
-
|
|
137
|
+
{%- if cookiecutter.datastore_type == "vertex_ai_search" %}
|
|
138
|
+
_DATA_STORE_ID_PROD = resource.google_discovery_engine_data_store.data_store_prod.data_store_id
|
|
127
139
|
_DATA_STORE_REGION = var.data_store_region
|
|
128
|
-
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
{
|
|
133
|
-
{
|
|
140
|
+
{%- elif cookiecutter.datastore_type == "vertex_ai_vector_search" %}
|
|
141
|
+
_VECTOR_SEARCH_INDEX_PROD = resource.google_vertex_ai_index.vector_search_index_prod.id
|
|
142
|
+
_VECTOR_SEARCH_INDEX_ENDPOINT_PROD = resource.google_vertex_ai_index_endpoint.vector_search_index_endpoint_prod.id
|
|
143
|
+
_VECTOR_SEARCH_BUCKET_PROD = resource.google_storage_bucket.vector_search_data_bucket["prod"].url
|
|
144
|
+
{%- endif %}
|
|
145
|
+
{%- endif %}
|
|
134
146
|
# Your other Deploy to Prod Pipeline substitutions
|
|
135
147
|
}
|
|
136
|
-
depends_on = [
|
|
148
|
+
depends_on = [
|
|
149
|
+
resource.google_project_service.cicd_services,
|
|
150
|
+
resource.google_project_service.deploy_project_services,
|
|
151
|
+
google_cloudbuildv2_connection.github_connection,
|
|
152
|
+
google_cloudbuildv2_repository.repo
|
|
153
|
+
]
|
|
137
154
|
|
|
138
155
|
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Copyright 2025 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
# BigQuery dataset for telemetry external tables
|
|
16
|
+
resource "google_bigquery_dataset" "telemetry_dataset" {
|
|
17
|
+
for_each = local.deploy_project_ids
|
|
18
|
+
project = each.value
|
|
19
|
+
dataset_id = replace("${var.project_name}_telemetry", "-", "_")
|
|
20
|
+
friendly_name = "${var.project_name} Telemetry"
|
|
21
|
+
location = var.region
|
|
22
|
+
description = "Dataset for GenAI telemetry data stored in GCS"
|
|
23
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
# BigQuery connection for accessing GCS telemetry data
|
|
27
|
+
resource "google_bigquery_connection" "genai_telemetry_connection" {
|
|
28
|
+
for_each = local.deploy_project_ids
|
|
29
|
+
project = each.value
|
|
30
|
+
location = var.region
|
|
31
|
+
connection_id = "${var.project_name}-genai-telemetry"
|
|
32
|
+
friendly_name = "${var.project_name} GenAI Telemetry Connection"
|
|
33
|
+
|
|
34
|
+
cloud_resource {}
|
|
35
|
+
|
|
36
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# Wait for the BigQuery connection service account to propagate in IAM
|
|
40
|
+
resource "time_sleep" "wait_for_bq_connection_sa" {
|
|
41
|
+
for_each = local.deploy_project_ids
|
|
42
|
+
|
|
43
|
+
create_duration = "10s"
|
|
44
|
+
|
|
45
|
+
depends_on = [google_bigquery_connection.genai_telemetry_connection]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# Grant the BigQuery connection service account access to read from the logs bucket
|
|
49
|
+
resource "google_storage_bucket_iam_member" "telemetry_connection_access" {
|
|
50
|
+
for_each = local.deploy_project_ids
|
|
51
|
+
bucket = google_storage_bucket.logs_data_bucket[each.value].name
|
|
52
|
+
role = "roles/storage.objectViewer"
|
|
53
|
+
member = "serviceAccount:${google_bigquery_connection.genai_telemetry_connection[each.key].cloud_resource[0].service_account_id}"
|
|
54
|
+
|
|
55
|
+
depends_on = [time_sleep.wait_for_bq_connection_sa]
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
# ====================================================================
|
|
59
|
+
# Dedicated Cloud Logging Bucket for GenAI Telemetry
|
|
60
|
+
# ====================================================================
|
|
61
|
+
|
|
62
|
+
# Create a custom Cloud Logging bucket for GenAI telemetry logs with long-term retention
|
|
63
|
+
resource "google_logging_project_bucket_config" "genai_telemetry_bucket" {
|
|
64
|
+
for_each = local.deploy_project_ids
|
|
65
|
+
project = each.value
|
|
66
|
+
location = var.region
|
|
67
|
+
bucket_id = "${var.project_name}-genai-telemetry"
|
|
68
|
+
retention_days = 3650 # 10 years retention (maximum allowed)
|
|
69
|
+
enable_analytics = true # Required for linked datasets
|
|
70
|
+
description = "Dedicated Cloud Logging bucket for ${var.project_name} GenAI telemetry with 10 year retention"
|
|
71
|
+
|
|
72
|
+
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.deploy_project_services]
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
# Log sink to route only GenAI telemetry logs to the dedicated bucket
|
|
76
|
+
# Filter by bucket name in the GCS path (which includes project_name) to isolate this agent's logs
|
|
77
|
+
resource "google_logging_project_sink" "genai_logs_to_bucket" {
|
|
78
|
+
for_each = local.deploy_project_ids
|
|
79
|
+
name = "${var.project_name}-genai-logs"
|
|
80
|
+
project = each.value
|
|
81
|
+
destination = "logging.googleapis.com/projects/${each.value}/locations/${var.region}/buckets/${google_logging_project_bucket_config.genai_telemetry_bucket[each.key].bucket_id}"
|
|
82
|
+
filter = "log_name=\"projects/${each.value}/logs/gen_ai.client.inference.operation.details\" AND (labels.\"gen_ai.input.messages_ref\" =~ \".*${var.project_name}.*\" OR labels.\"gen_ai.output.messages_ref\" =~ \".*${var.project_name}.*\")"
|
|
83
|
+
|
|
84
|
+
unique_writer_identity = true
|
|
85
|
+
depends_on = [google_logging_project_bucket_config.genai_telemetry_bucket]
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
# Create a linked dataset to the GenAI telemetry logs bucket for querying via BigQuery
|
|
89
|
+
resource "google_logging_linked_dataset" "genai_logs_linked_dataset" {
|
|
90
|
+
for_each = local.deploy_project_ids
|
|
91
|
+
link_id = replace("${var.project_name}_genai_telemetry_logs", "-", "_")
|
|
92
|
+
bucket = google_logging_project_bucket_config.genai_telemetry_bucket[each.key].bucket_id
|
|
93
|
+
description = "Linked dataset for ${var.project_name} GenAI telemetry Cloud Logging bucket"
|
|
94
|
+
location = var.region
|
|
95
|
+
parent = "projects/${each.value}"
|
|
96
|
+
|
|
97
|
+
depends_on = [
|
|
98
|
+
google_logging_project_bucket_config.genai_telemetry_bucket,
|
|
99
|
+
google_logging_project_sink.genai_logs_to_bucket
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
# Wait for linked dataset to fully propagate
|
|
104
|
+
resource "time_sleep" "wait_for_linked_dataset" {
|
|
105
|
+
for_each = local.deploy_project_ids
|
|
106
|
+
|
|
107
|
+
create_duration = "10s"
|
|
108
|
+
|
|
109
|
+
depends_on = [google_logging_linked_dataset.genai_logs_linked_dataset]
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
# ====================================================================
|
|
113
|
+
# Feedback Logs to Cloud Logging Bucket
|
|
114
|
+
# ====================================================================
|
|
115
|
+
|
|
116
|
+
# Log sink for user feedback logs - routes to the same Cloud Logging bucket
|
|
117
|
+
resource "google_logging_project_sink" "feedback_logs_to_bucket" {
|
|
118
|
+
for_each = local.deploy_project_ids
|
|
119
|
+
name = "${var.project_name}-feedback"
|
|
120
|
+
project = each.value
|
|
121
|
+
destination = "logging.googleapis.com/projects/${each.value}/locations/${var.region}/buckets/${google_logging_project_bucket_config.genai_telemetry_bucket[each.key].bucket_id}"
|
|
122
|
+
filter = var.feedback_logs_filter
|
|
123
|
+
|
|
124
|
+
unique_writer_identity = true
|
|
125
|
+
depends_on = [google_logging_project_bucket_config.genai_telemetry_bucket]
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
# ====================================================================
|
|
129
|
+
# Completions External Table (GCS-based)
|
|
130
|
+
# ====================================================================
|
|
131
|
+
|
|
132
|
+
# External table for completions data (messages/parts) stored in GCS
|
|
133
|
+
resource "google_bigquery_table" "completions_external_table" {
|
|
134
|
+
for_each = local.deploy_project_ids
|
|
135
|
+
project = each.value
|
|
136
|
+
dataset_id = google_bigquery_dataset.telemetry_dataset[each.key].dataset_id
|
|
137
|
+
table_id = "completions"
|
|
138
|
+
deletion_protection = false
|
|
139
|
+
|
|
140
|
+
external_data_configuration {
|
|
141
|
+
autodetect = false
|
|
142
|
+
source_format = "NEWLINE_DELIMITED_JSON"
|
|
143
|
+
source_uris = ["gs://${google_storage_bucket.logs_data_bucket[each.value].name}/completions/*"]
|
|
144
|
+
connection_id = google_bigquery_connection.genai_telemetry_connection[each.key].name
|
|
145
|
+
ignore_unknown_values = true
|
|
146
|
+
max_bad_records = 1000
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
# Schema matching the ADK completions format
|
|
150
|
+
schema = jsonencode([
|
|
151
|
+
{
|
|
152
|
+
name = "parts"
|
|
153
|
+
type = "RECORD"
|
|
154
|
+
mode = "REPEATED"
|
|
155
|
+
fields = [
|
|
156
|
+
{ name = "type", type = "STRING", mode = "NULLABLE" },
|
|
157
|
+
{ name = "content", type = "STRING", mode = "NULLABLE" },
|
|
158
|
+
{ name = "mime_type", type = "STRING", mode = "NULLABLE" },
|
|
159
|
+
{ name = "uri", type = "STRING", mode = "NULLABLE" },
|
|
160
|
+
{ name = "data", type = "BYTES", mode = "NULLABLE" },
|
|
161
|
+
{ name = "id", type = "STRING", mode = "NULLABLE" },
|
|
162
|
+
{ name = "name", type = "STRING", mode = "NULLABLE" },
|
|
163
|
+
{ name = "arguments", type = "JSON", mode = "NULLABLE" },
|
|
164
|
+
{ name = "response", type = "JSON", mode = "NULLABLE" }
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{ name = "role", type = "STRING", mode = "NULLABLE" },
|
|
168
|
+
{ name = "index", type = "INTEGER", mode = "NULLABLE" }
|
|
169
|
+
])
|
|
170
|
+
|
|
171
|
+
depends_on = [
|
|
172
|
+
google_storage_bucket.logs_data_bucket,
|
|
173
|
+
google_bigquery_connection.genai_telemetry_connection,
|
|
174
|
+
google_storage_bucket_iam_member.telemetry_connection_access
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
# ====================================================================
|
|
179
|
+
# Completions View (Joins Logs with GCS Data)
|
|
180
|
+
# ====================================================================
|
|
181
|
+
|
|
182
|
+
# View that joins Cloud Logging data with GCS-stored completions data
|
|
183
|
+
resource "google_bigquery_table" "completions_view" {
|
|
184
|
+
for_each = local.deploy_project_ids
|
|
185
|
+
project = each.value
|
|
186
|
+
dataset_id = google_bigquery_dataset.telemetry_dataset[each.key].dataset_id
|
|
187
|
+
table_id = "completions_view"
|
|
188
|
+
description = "View of GenAI completion logs joined with the GCS prompt/response external table"
|
|
189
|
+
deletion_protection = false
|
|
190
|
+
|
|
191
|
+
view {
|
|
192
|
+
query = templatefile("${path.module}/sql/completions.sql", {
|
|
193
|
+
project_id = each.value
|
|
194
|
+
dataset_id = google_bigquery_dataset.telemetry_dataset[each.key].dataset_id
|
|
195
|
+
completions_external_table = google_bigquery_table.completions_external_table[each.key].table_id
|
|
196
|
+
logs_link_id = google_logging_linked_dataset.genai_logs_linked_dataset[each.key].link_id
|
|
197
|
+
})
|
|
198
|
+
use_legacy_sql = false
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
depends_on = [
|
|
202
|
+
google_logging_linked_dataset.genai_logs_linked_dataset,
|
|
203
|
+
google_bigquery_table.completions_external_table,
|
|
204
|
+
time_sleep.wait_for_linked_dataset
|
|
205
|
+
]
|
|
206
|
+
}
|