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
|
@@ -14,27 +14,27 @@
|
|
|
14
14
|
|
|
15
15
|
steps:
|
|
16
16
|
{%- if cookiecutter.data_ingestion %}
|
|
17
|
-
- name: "python:3.
|
|
17
|
+
- name: "python:3.12-slim"
|
|
18
18
|
id: deploy-data-ingestion-pipeline-prod
|
|
19
19
|
entrypoint: bash
|
|
20
20
|
args:
|
|
21
21
|
- -c
|
|
22
22
|
- |
|
|
23
|
-
cd data_ingestion && pip install uv==0.
|
|
24
|
-
uv run python
|
|
23
|
+
cd data_ingestion && pip install uv==0.8.13 --user && cd data_ingestion_pipeline && \
|
|
24
|
+
uv sync --locked && uv run python submit_pipeline.py
|
|
25
25
|
env:
|
|
26
|
-
- "PIPELINE_ROOT=${
|
|
26
|
+
- "PIPELINE_ROOT=${_PIPELINE_GCS_ROOT_PROD}"
|
|
27
27
|
- "REGION=${_REGION}"
|
|
28
28
|
{%- if cookiecutter.datastore_type == "vertex_ai_search" %}
|
|
29
29
|
- "DATA_STORE_REGION=${_DATA_STORE_REGION}"
|
|
30
|
-
- "DATA_STORE_ID=${
|
|
30
|
+
- "DATA_STORE_ID=${_DATA_STORE_ID_PROD}"
|
|
31
31
|
{%- elif cookiecutter.datastore_type == "vertex_ai_vector_search" %}
|
|
32
|
-
- "VECTOR_SEARCH_INDEX=${
|
|
33
|
-
- "VECTOR_SEARCH_INDEX_ENDPOINT=${
|
|
34
|
-
- "VECTOR_SEARCH_BUCKET=${
|
|
32
|
+
- "VECTOR_SEARCH_INDEX=${_VECTOR_SEARCH_INDEX_PROD}"
|
|
33
|
+
- "VECTOR_SEARCH_INDEX_ENDPOINT=${_VECTOR_SEARCH_INDEX_ENDPOINT_PROD}"
|
|
34
|
+
- "VECTOR_SEARCH_BUCKET=${_VECTOR_SEARCH_BUCKET_PROD}"
|
|
35
35
|
{%- endif %}
|
|
36
36
|
- "PROJECT_ID=${_PROD_PROJECT_ID}"
|
|
37
|
-
- "SERVICE_ACCOUNT=${
|
|
37
|
+
- "SERVICE_ACCOUNT=${_PIPELINE_SA_EMAIL_PROD}"
|
|
38
38
|
- "PIPELINE_NAME=${_PIPELINE_NAME}"
|
|
39
39
|
- "CRON_SCHEDULE=${_PIPELINE_CRON_SCHEDULE}"
|
|
40
40
|
- "DISABLE_CACHING=TRUE"
|
|
@@ -42,7 +42,7 @@ steps:
|
|
|
42
42
|
{%- endif %}
|
|
43
43
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
44
44
|
|
|
45
|
-
- name: "gcr.io/cloud-builders/gcloud"
|
|
45
|
+
- name: "gcr.io/cloud-builders/gcloud-slim"
|
|
46
46
|
id: trigger-deployment
|
|
47
47
|
entrypoint: gcloud
|
|
48
48
|
args:
|
|
@@ -55,41 +55,49 @@ steps:
|
|
|
55
55
|
- "$_REGION"
|
|
56
56
|
- "--project"
|
|
57
57
|
- $_PROD_PROJECT_ID
|
|
58
|
-
|
|
59
|
-
- "1"
|
|
60
|
-
- "--no-cpu-throttling"
|
|
61
|
-
- "--cpu"
|
|
62
|
-
- "4"
|
|
63
|
-
- "--memory"
|
|
64
|
-
- "4Gi"
|
|
65
|
-
- "--concurrency"
|
|
66
|
-
- "40"
|
|
67
|
-
- "--service-account"
|
|
68
|
-
- "${_CLOUD_RUN_APP_SA_EMAIL}"
|
|
69
|
-
- "--set-env-vars"
|
|
70
|
-
- "COMMIT_SHA=${COMMIT_SHA}{%- if cookiecutter.data_ingestion %}{%- if cookiecutter.datastore_type == "vertex_ai_search" %},DATA_STORE_ID=${_DATA_STORE_ID},DATA_STORE_REGION=${_DATA_STORE_REGION}{%- elif cookiecutter.datastore_type == "vertex_ai_vector_search" %},VECTOR_SEARCH_INDEX=${_VECTOR_SEARCH_INDEX},VECTOR_SEARCH_INDEX_ENDPOINT=${_VECTOR_SEARCH_INDEX_ENDPOINT},VECTOR_SEARCH_BUCKET=${_VECTOR_SEARCH_BUCKET}{%- endif %}{%- endif %}"
|
|
58
|
+
|
|
71
59
|
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
72
|
-
|
|
60
|
+
{%- if cookiecutter.is_a2a %}
|
|
61
|
+
# Extract version from pyproject.toml
|
|
62
|
+
- name: "gcr.io/cloud-builders/gcloud-slim"
|
|
63
|
+
id: extract-version
|
|
64
|
+
entrypoint: /bin/bash
|
|
65
|
+
args:
|
|
66
|
+
- "-c"
|
|
67
|
+
- |
|
|
68
|
+
VERSION=$(awk -F'"' '/^version = / {print $$2}' pyproject.toml || echo '0.0.0')
|
|
69
|
+
echo "$${VERSION}" > /workspace/agent_version.txt
|
|
70
|
+
|
|
71
|
+
{%- endif %}
|
|
72
|
+
- name: "python:3.12-slim"
|
|
73
73
|
id: install-dependencies
|
|
74
74
|
entrypoint: /bin/bash
|
|
75
75
|
args:
|
|
76
76
|
- "-c"
|
|
77
77
|
- |
|
|
78
|
-
pip install uv==0.
|
|
78
|
+
pip install uv==0.8.13 --user && uv sync --locked
|
|
79
79
|
env:
|
|
80
80
|
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
81
81
|
|
|
82
|
-
- name: "python:3.
|
|
82
|
+
- name: "python:3.12-slim"
|
|
83
83
|
id: trigger-deployment
|
|
84
84
|
entrypoint: /bin/bash
|
|
85
85
|
args:
|
|
86
86
|
- "-c"
|
|
87
87
|
- |
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
{%- if cookiecutter.is_a2a %}
|
|
89
|
+
AGENT_VERSION=$(cat /workspace/agent_version.txt || echo '0.0.0')
|
|
90
|
+
{%- endif %}
|
|
91
|
+
uv export --no-hashes --no-sources --no-header --no-dev --no-emit-project --no-annotate --locked > {{cookiecutter.agent_directory}}/app_utils/.requirements.txt
|
|
92
|
+
uv run python -m {{cookiecutter.agent_directory}}.app_utils.deploy \
|
|
90
93
|
--project ${_PROD_PROJECT_ID} \
|
|
91
94
|
--location ${_REGION} \
|
|
92
|
-
--
|
|
95
|
+
--source-packages=./{{cookiecutter.agent_directory}} \
|
|
96
|
+
--entrypoint-module={{cookiecutter.agent_directory}}.agent_engine_app \
|
|
97
|
+
--entrypoint-object=agent_engine \
|
|
98
|
+
--requirements-file={{cookiecutter.agent_directory}}/app_utils/.requirements.txt \
|
|
99
|
+
--service-account=${_APP_SERVICE_ACCOUNT_PROD} \
|
|
100
|
+
--set-env-vars="COMMIT_SHA=${COMMIT_SHA}{%- if cookiecutter.is_a2a %},AGENT_VERSION=$${AGENT_VERSION}{%- endif %},LOGS_BUCKET_NAME=${_LOGS_BUCKET_NAME_PROD}{%- if cookiecutter.data_ingestion %}{%- if cookiecutter.datastore_type == "vertex_ai_search" %},DATA_STORE_ID=${_DATA_STORE_ID_PROD},DATA_STORE_REGION=${_DATA_STORE_REGION}{%- elif cookiecutter.datastore_type == "vertex_ai_vector_search" %},VECTOR_SEARCH_INDEX=${_VECTOR_SEARCH_INDEX_PROD},VECTOR_SEARCH_INDEX_ENDPOINT=${_VECTOR_SEARCH_INDEX_ENDPOINT_PROD},VECTOR_SEARCH_BUCKET=${_VECTOR_SEARCH_BUCKET_PROD}{%- endif %}{%- endif %}"
|
|
93
101
|
env:
|
|
94
102
|
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
95
103
|
{%- endif %}
|
|
@@ -98,7 +106,7 @@ substitutions:
|
|
|
98
106
|
_PROD_PROJECT_ID: YOUR_PROD_PROJECT_ID
|
|
99
107
|
_REGION: us-central1
|
|
100
108
|
|
|
101
|
-
logsBucket: gs://${PROJECT_ID}-{{ cookiecutter.project_name | replace('_', '-') }}-logs
|
|
109
|
+
logsBucket: gs://${PROJECT_ID}-{{ cookiecutter.project_name | replace('_', '-') }}-logs/build-logs
|
|
102
110
|
options:
|
|
103
111
|
substitutionOption: ALLOW_LOOSE
|
|
104
112
|
defaultLogsBucketBehavior: REGIONAL_USER_OWNED_BUCKET
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
|
|
15
15
|
steps:
|
|
16
16
|
# Install uv package manager and sync dependencies
|
|
17
|
-
- name: "python:3.
|
|
17
|
+
- name: "python:3.12-slim"
|
|
18
18
|
id: install-dependencies
|
|
19
19
|
entrypoint: /bin/bash
|
|
20
20
|
args:
|
|
21
21
|
- "-c"
|
|
22
22
|
- |
|
|
23
|
-
pip install uv==0.
|
|
23
|
+
pip install uv==0.8.13 --user && uv sync --locked
|
|
24
24
|
env:
|
|
25
25
|
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
26
26
|
|
|
27
27
|
# Run unit tests using pytest
|
|
28
|
-
- name: "python:3.
|
|
28
|
+
- name: "python:3.12-slim"
|
|
29
29
|
id: unit-tests
|
|
30
30
|
entrypoint: /bin/bash
|
|
31
31
|
args:
|
|
@@ -36,7 +36,7 @@ steps:
|
|
|
36
36
|
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
37
37
|
|
|
38
38
|
# Run integration tests
|
|
39
|
-
- name: "python:3.
|
|
39
|
+
- name: "python:3.12-slim"
|
|
40
40
|
id: integration-tests
|
|
41
41
|
entrypoint: /bin/bash
|
|
42
42
|
args:
|
|
@@ -46,6 +46,6 @@ steps:
|
|
|
46
46
|
env:
|
|
47
47
|
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
48
48
|
|
|
49
|
-
logsBucket: gs://${PROJECT_ID}-{{ cookiecutter.project_name | replace('_', '-') }}-logs
|
|
49
|
+
logsBucket: gs://${PROJECT_ID}-{{ cookiecutter.project_name | replace('_', '-') }}-logs/build-logs
|
|
50
50
|
options:
|
|
51
51
|
defaultLogsBucketBehavior: REGIONAL_USER_OWNED_BUCKET
|
|
@@ -0,0 +1,322 @@
|
|
|
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
|
+
steps:
|
|
16
|
+
{%- if cookiecutter.data_ingestion %}
|
|
17
|
+
- name: "python:3.12-slim"
|
|
18
|
+
id: deploy-data-ingestion-pipeline-staging
|
|
19
|
+
entrypoint: bash
|
|
20
|
+
args:
|
|
21
|
+
- -c
|
|
22
|
+
- |
|
|
23
|
+
cd data_ingestion && pip install uv==0.8.13 --user && cd data_ingestion_pipeline && \
|
|
24
|
+
uv sync --locked && uv run python submit_pipeline.py
|
|
25
|
+
env:
|
|
26
|
+
- "PIPELINE_ROOT=${_PIPELINE_GCS_ROOT_STAGING}"
|
|
27
|
+
- "REGION=${_REGION}"
|
|
28
|
+
{%- if cookiecutter.datastore_type == "vertex_ai_search" %}
|
|
29
|
+
- "DATA_STORE_REGION=${_DATA_STORE_REGION}"
|
|
30
|
+
- "DATA_STORE_ID=${_DATA_STORE_ID_STAGING}"
|
|
31
|
+
{%- elif cookiecutter.datastore_type == "vertex_ai_vector_search" %}
|
|
32
|
+
- "VECTOR_SEARCH_INDEX=${_VECTOR_SEARCH_INDEX_STAGING}"
|
|
33
|
+
- "VECTOR_SEARCH_INDEX_ENDPOINT=${_VECTOR_SEARCH_INDEX_ENDPOINT_STAGING}"
|
|
34
|
+
- "VECTOR_SEARCH_BUCKET=${_VECTOR_SEARCH_BUCKET_STAGING}"
|
|
35
|
+
{%- endif %}
|
|
36
|
+
- "PROJECT_ID=${_STAGING_PROJECT_ID}"
|
|
37
|
+
- "SERVICE_ACCOUNT=${_PIPELINE_SA_EMAIL_STAGING}"
|
|
38
|
+
- "PIPELINE_NAME=${_PIPELINE_NAME}"
|
|
39
|
+
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
40
|
+
{%- endif %}
|
|
41
|
+
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
42
|
+
{%- if cookiecutter.is_a2a %}
|
|
43
|
+
# Extract version from pyproject.toml
|
|
44
|
+
- name: "gcr.io/cloud-builders/gcloud-slim"
|
|
45
|
+
id: extract-version
|
|
46
|
+
entrypoint: /bin/bash
|
|
47
|
+
args:
|
|
48
|
+
- "-c"
|
|
49
|
+
- |
|
|
50
|
+
VERSION=$(awk -F'"' '/^version = / {print $$2}' pyproject.toml || echo '0.0.0')
|
|
51
|
+
echo "$${VERSION}" > /workspace/agent_version.txt
|
|
52
|
+
|
|
53
|
+
{%- endif %}
|
|
54
|
+
# Build and Push
|
|
55
|
+
- name: "gcr.io/cloud-builders/docker"
|
|
56
|
+
args:
|
|
57
|
+
[
|
|
58
|
+
"build",
|
|
59
|
+
"-t",
|
|
60
|
+
"$_REGION-docker.pkg.dev/$PROJECT_ID/$_ARTIFACT_REGISTRY_REPO_NAME/$_CONTAINER_NAME",
|
|
61
|
+
"--build-arg",
|
|
62
|
+
"COMMIT_SHA=$COMMIT_SHA",
|
|
63
|
+
{%- if cookiecutter.is_a2a %}
|
|
64
|
+
"--build-arg",
|
|
65
|
+
"AGENT_VERSION=$(cat /workspace/agent_version.txt || echo '0.0.0')",
|
|
66
|
+
{%- endif %}
|
|
67
|
+
".",
|
|
68
|
+
]
|
|
69
|
+
- name: "gcr.io/cloud-builders/docker"
|
|
70
|
+
args:
|
|
71
|
+
[
|
|
72
|
+
"push",
|
|
73
|
+
"$_REGION-docker.pkg.dev/$PROJECT_ID/$_ARTIFACT_REGISTRY_REPO_NAME/$_CONTAINER_NAME",
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
# Deploy to Staging
|
|
77
|
+
- name: "gcr.io/cloud-builders/gcloud"
|
|
78
|
+
id: deploy-staging
|
|
79
|
+
entrypoint: gcloud
|
|
80
|
+
args:
|
|
81
|
+
- "run"
|
|
82
|
+
- "deploy"
|
|
83
|
+
- "{{cookiecutter.project_name}}"
|
|
84
|
+
- "--image"
|
|
85
|
+
- "$_REGION-docker.pkg.dev/$PROJECT_ID/$_ARTIFACT_REGISTRY_REPO_NAME/$_CONTAINER_NAME"
|
|
86
|
+
- "--region"
|
|
87
|
+
- "${_REGION}"
|
|
88
|
+
- "--project"
|
|
89
|
+
- "${_STAGING_PROJECT_ID}"
|
|
90
|
+
|
|
91
|
+
# Fetch Staging Service URL
|
|
92
|
+
- name: "gcr.io/cloud-builders/gcloud"
|
|
93
|
+
id: fetch-staging-url
|
|
94
|
+
entrypoint: /bin/bash
|
|
95
|
+
args:
|
|
96
|
+
- "-c"
|
|
97
|
+
- |
|
|
98
|
+
echo $(gcloud run services describe {{cookiecutter.project_name}} \
|
|
99
|
+
--region ${_REGION} --project ${_STAGING_PROJECT_ID} --format="value(status.url)") > staging_url.txt
|
|
100
|
+
|
|
101
|
+
# Fetch ID Token
|
|
102
|
+
- name: gcr.io/cloud-builders/gcloud
|
|
103
|
+
id: fetch-id-token
|
|
104
|
+
entrypoint: /bin/bash
|
|
105
|
+
args:
|
|
106
|
+
- "-c"
|
|
107
|
+
- |
|
|
108
|
+
echo $(gcloud auth print-identity-token -q) > id_token.txt
|
|
109
|
+
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
110
|
+
{%- if cookiecutter.is_a2a %}
|
|
111
|
+
# Extract version from pyproject.toml
|
|
112
|
+
- name: "gcr.io/cloud-builders/gcloud-slim"
|
|
113
|
+
id: extract-version
|
|
114
|
+
entrypoint: /bin/bash
|
|
115
|
+
args:
|
|
116
|
+
- "-c"
|
|
117
|
+
- |
|
|
118
|
+
VERSION=$(awk -F'"' '/^version = / {print $$2}' pyproject.toml || echo '0.0.0')
|
|
119
|
+
echo "$${VERSION}" > /workspace/agent_version.txt
|
|
120
|
+
|
|
121
|
+
{%- endif %}
|
|
122
|
+
- name: "python:3.12-slim"
|
|
123
|
+
id: install-dependencies
|
|
124
|
+
entrypoint: /bin/bash
|
|
125
|
+
args:
|
|
126
|
+
- "-c"
|
|
127
|
+
- |
|
|
128
|
+
pip install uv==0.8.13 --user && uv sync --locked
|
|
129
|
+
env:
|
|
130
|
+
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
131
|
+
|
|
132
|
+
- name: "python:3.12-slim"
|
|
133
|
+
id: deploy-staging
|
|
134
|
+
entrypoint: /bin/bash
|
|
135
|
+
args:
|
|
136
|
+
- "-c"
|
|
137
|
+
- |
|
|
138
|
+
{%- if cookiecutter.is_a2a %}
|
|
139
|
+
AGENT_VERSION=$(cat /workspace/agent_version.txt || echo '0.0.0')
|
|
140
|
+
{%- endif %}
|
|
141
|
+
uv export --no-hashes --no-sources --no-header --no-dev --no-emit-project --no-annotate --locked > {{cookiecutter.agent_directory}}/app_utils/.requirements.txt
|
|
142
|
+
uv run python -m {{cookiecutter.agent_directory}}.app_utils.deploy \
|
|
143
|
+
--project ${_STAGING_PROJECT_ID} \
|
|
144
|
+
--location ${_REGION} \
|
|
145
|
+
--source-packages=./{{cookiecutter.agent_directory}} \
|
|
146
|
+
--entrypoint-module={{cookiecutter.agent_directory}}.agent_engine_app \
|
|
147
|
+
--entrypoint-object=agent_engine \
|
|
148
|
+
--requirements-file={{cookiecutter.agent_directory}}/app_utils/.requirements.txt \
|
|
149
|
+
--service-account=${_APP_SERVICE_ACCOUNT_STAGING} \
|
|
150
|
+
--set-env-vars="COMMIT_SHA=${COMMIT_SHA}{%- if cookiecutter.is_a2a %},AGENT_VERSION=$${AGENT_VERSION}{%- endif %},LOGS_BUCKET_NAME=${_LOGS_BUCKET_NAME_STAGING}{%- if cookiecutter.data_ingestion %}{%- if cookiecutter.datastore_type == "vertex_ai_search" %},DATA_STORE_ID=${_DATA_STORE_ID_STAGING},DATA_STORE_REGION=${_DATA_STORE_REGION}{%- elif cookiecutter.datastore_type == "vertex_ai_vector_search" %},VECTOR_SEARCH_INDEX=${_VECTOR_SEARCH_INDEX_STAGING},VECTOR_SEARCH_INDEX_ENDPOINT=${_VECTOR_SEARCH_INDEX_ENDPOINT_STAGING},VECTOR_SEARCH_BUCKET=${_VECTOR_SEARCH_BUCKET_STAGING}{%- endif %}{%- endif %}"
|
|
151
|
+
env:
|
|
152
|
+
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
- name: gcr.io/cloud-builders/gcloud
|
|
156
|
+
id: fetch-auth-token
|
|
157
|
+
entrypoint: /bin/bash
|
|
158
|
+
args:
|
|
159
|
+
- "-c"
|
|
160
|
+
- |
|
|
161
|
+
echo $(gcloud auth print-access-token -q) > auth_token.txt
|
|
162
|
+
{%- endif %}
|
|
163
|
+
|
|
164
|
+
# Load Testing
|
|
165
|
+
{%- if cookiecutter.deployment_target == 'cloud_run' and cookiecutter.agent_name == 'adk_live' %}
|
|
166
|
+
- name: "europe-west4-docker.pkg.dev/production-ai-template/starter-pack/e2e-tests"
|
|
167
|
+
id: load_test
|
|
168
|
+
entrypoint: /bin/bash
|
|
169
|
+
args:
|
|
170
|
+
- "-c"
|
|
171
|
+
- |
|
|
172
|
+
# Install load test dependencies
|
|
173
|
+
pip install locust==2.31.1 websockets
|
|
174
|
+
|
|
175
|
+
# Install Cloud Run proxy component
|
|
176
|
+
apt-get update && apt-get install -y google-cloud-cli-cloud-run-proxy
|
|
177
|
+
|
|
178
|
+
# Start Cloud Run proxy in background
|
|
179
|
+
gcloud run services proxy {{cookiecutter.project_name}} \
|
|
180
|
+
--port=8080 \
|
|
181
|
+
--region ${_REGION} \
|
|
182
|
+
--project ${_STAGING_PROJECT_ID} \
|
|
183
|
+
--quiet &
|
|
184
|
+
_PROXY_PID=$$!
|
|
185
|
+
|
|
186
|
+
# Wait for proxy to be ready
|
|
187
|
+
echo "Waiting for proxy to start..."
|
|
188
|
+
sleep 10
|
|
189
|
+
|
|
190
|
+
# Run load test and capture exit code
|
|
191
|
+
locust -f tests/load_test/load_test.py \
|
|
192
|
+
--headless \
|
|
193
|
+
-H http://127.0.0.1:8080 \
|
|
194
|
+
-t 30s -u 2 -r 2 \
|
|
195
|
+
--csv=tests/load_test/.results/results \
|
|
196
|
+
--html=tests/load_test/.results/report.html
|
|
197
|
+
_LOAD_TEST_EXIT_CODE=$$?
|
|
198
|
+
|
|
199
|
+
# Clean up proxy
|
|
200
|
+
kill $$_PROXY_PID || true
|
|
201
|
+
|
|
202
|
+
# Exit with load test result to fail build if tests failed
|
|
203
|
+
exit $$_LOAD_TEST_EXIT_CODE
|
|
204
|
+
{%- elif cookiecutter.deployment_target == 'cloud_run' %}
|
|
205
|
+
- name: "python:3.12-slim"
|
|
206
|
+
id: load_test
|
|
207
|
+
entrypoint: /bin/bash
|
|
208
|
+
args:
|
|
209
|
+
- "-c"
|
|
210
|
+
- |
|
|
211
|
+
export _ID_TOKEN=$(cat id_token.txt)
|
|
212
|
+
export _STAGING_URL=$(cat staging_url.txt)
|
|
213
|
+
pip install locust==2.31.1{%- if cookiecutter.is_a2a %} a2a-sdk~=0.3.9{%- endif %} --user
|
|
214
|
+
locust -f tests/load_test/load_test.py \
|
|
215
|
+
--headless \
|
|
216
|
+
-H $$_STAGING_URL \
|
|
217
|
+
-t 30s -u 10 -r 0.5 \
|
|
218
|
+
--csv=tests/load_test/.results/results \
|
|
219
|
+
--html=tests/load_test/.results/report.html
|
|
220
|
+
env:
|
|
221
|
+
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
222
|
+
{%- elif cookiecutter.deployment_target == 'agent_engine' and cookiecutter.is_adk_live %}
|
|
223
|
+
- name: "python:3.12-slim"
|
|
224
|
+
id: load_test
|
|
225
|
+
entrypoint: /bin/bash
|
|
226
|
+
args:
|
|
227
|
+
- "-c"
|
|
228
|
+
- |
|
|
229
|
+
# Start expose app in remote mode (uses deployment_metadata.json by default)
|
|
230
|
+
uv run python -m {{cookiecutter.agent_directory}}.app_utils.expose_app --mode remote &
|
|
231
|
+
EXPOSE_PID=$$!
|
|
232
|
+
|
|
233
|
+
# Wait for expose app to be ready
|
|
234
|
+
sleep 10
|
|
235
|
+
|
|
236
|
+
# Run load test against local expose app
|
|
237
|
+
uv run --with locust==2.31.1 --with websockets locust -f tests/load_test/load_test.py \
|
|
238
|
+
-H http://127.0.0.1:8000 \
|
|
239
|
+
--headless \
|
|
240
|
+
-t 30s -u 2 -r 1 \
|
|
241
|
+
--csv=tests/load_test/.results/results \
|
|
242
|
+
--html=tests/load_test/.results/report.html
|
|
243
|
+
LOCUST_EXIT_CODE=$$?
|
|
244
|
+
|
|
245
|
+
# Stop expose app
|
|
246
|
+
kill $$EXPOSE_PID
|
|
247
|
+
|
|
248
|
+
# Exit with error if locust test failed
|
|
249
|
+
if [ $$LOCUST_EXIT_CODE -ne 0 ]; then
|
|
250
|
+
echo "Load test failed with exit code $$LOCUST_EXIT_CODE"
|
|
251
|
+
exit $$LOCUST_EXIT_CODE
|
|
252
|
+
fi
|
|
253
|
+
env:
|
|
254
|
+
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
255
|
+
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
256
|
+
- name: "python:3.12-slim"
|
|
257
|
+
id: load_test
|
|
258
|
+
entrypoint: /bin/bash
|
|
259
|
+
args:
|
|
260
|
+
- "-c"
|
|
261
|
+
- |
|
|
262
|
+
export _AUTH_TOKEN=$(cat auth_token.txt)
|
|
263
|
+
pip install locust==2.31.1 --user
|
|
264
|
+
locust -f tests/load_test/load_test.py \
|
|
265
|
+
--headless \
|
|
266
|
+
-t 30s -u 2 -r 0.5 \
|
|
267
|
+
--csv=tests/load_test/.results/results \
|
|
268
|
+
--html=tests/load_test/.results/report.html
|
|
269
|
+
env:
|
|
270
|
+
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
271
|
+
{%- endif %}
|
|
272
|
+
|
|
273
|
+
# Export Load Test Results to GCS
|
|
274
|
+
- name: gcr.io/cloud-builders/gcloud
|
|
275
|
+
id: export-results-to-gcs
|
|
276
|
+
entrypoint: /bin/bash
|
|
277
|
+
args:
|
|
278
|
+
- "-c"
|
|
279
|
+
- |
|
|
280
|
+
export _TIMESTAMP=$(date +%Y%m%d-%H%M%S)
|
|
281
|
+
gsutil -m cp -r tests/load_test/.results gs://${_LOGS_BUCKET_NAME_STAGING}/load-test-results/results-$${_TIMESTAMP}
|
|
282
|
+
echo "_________________________________________________________________________"
|
|
283
|
+
echo "Load test results copied to gs://${_LOGS_BUCKET_NAME_STAGING}/load-test-results/results-$${_TIMESTAMP}"
|
|
284
|
+
echo "HTTP link: https://console.cloud.google.com/storage/browser/${_LOGS_BUCKET_NAME_STAGING}/load-test-results/results-$${_TIMESTAMP}"
|
|
285
|
+
echo "_________________________________________________________________________"
|
|
286
|
+
|
|
287
|
+
# Trigger Prod Deployment
|
|
288
|
+
- name: gcr.io/cloud-builders/gcloud
|
|
289
|
+
id: trigger-prod-deployment
|
|
290
|
+
entrypoint: gcloud
|
|
291
|
+
args:
|
|
292
|
+
- "beta"
|
|
293
|
+
- "builds"
|
|
294
|
+
- "triggers"
|
|
295
|
+
- "run"
|
|
296
|
+
- "deploy-{{cookiecutter.project_name}}"
|
|
297
|
+
- "--region"
|
|
298
|
+
- "$LOCATION"
|
|
299
|
+
- "--project"
|
|
300
|
+
- "$PROJECT_ID"
|
|
301
|
+
- "--sha"
|
|
302
|
+
- $COMMIT_SHA
|
|
303
|
+
|
|
304
|
+
- name: gcr.io/cloud-builders/gcloud
|
|
305
|
+
id: echo-view-build-trigger-link
|
|
306
|
+
entrypoint: /bin/bash
|
|
307
|
+
args:
|
|
308
|
+
- "-c"
|
|
309
|
+
- |
|
|
310
|
+
echo "_________________________________________________________________________"
|
|
311
|
+
echo "Production deployment triggered. View progress and / or approve on the Cloud Build Console:"
|
|
312
|
+
echo "https://console.cloud.google.com/cloud-build/builds;region=$LOCATION"
|
|
313
|
+
echo "_________________________________________________________________________"
|
|
314
|
+
|
|
315
|
+
substitutions:
|
|
316
|
+
_STAGING_PROJECT_ID: YOUR_STAGING_PROJECT_ID
|
|
317
|
+
_REGION: us-central1
|
|
318
|
+
|
|
319
|
+
logsBucket: gs://${PROJECT_ID}-{{ cookiecutter.project_name | replace('_', '-') }}-logs/build-logs
|
|
320
|
+
options:
|
|
321
|
+
substitutionOption: ALLOW_LOOSE
|
|
322
|
+
defaultLogsBucketBehavior: REGIONAL_USER_OWNED_BUCKET
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
{%- if cookiecutter.is_adk %}
|
|
16
|
+
import logging
|
|
17
|
+
import os
|
|
18
|
+
{%- if cookiecutter.is_adk and cookiecutter.is_a2a %}
|
|
19
|
+
|
|
20
|
+
import google.auth
|
|
21
|
+
from google.adk.cli.adk_web_server import _setup_instrumentation_lib_if_installed
|
|
22
|
+
from google.adk.telemetry.google_cloud import get_gcp_exporters, get_gcp_resource
|
|
23
|
+
from google.adk.telemetry.setup import maybe_set_otel_providers
|
|
24
|
+
{%- endif %}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def setup_telemetry() -> str | None:
|
|
28
|
+
"""Configure OpenTelemetry and GenAI telemetry with GCS upload."""
|
|
29
|
+
{%- if cookiecutter.deployment_target == 'agent_engine' %}
|
|
30
|
+
os.environ.setdefault("GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY", "true")
|
|
31
|
+
{%- endif %}
|
|
32
|
+
|
|
33
|
+
bucket = os.environ.get("LOGS_BUCKET_NAME")
|
|
34
|
+
capture_content = os.environ.get(
|
|
35
|
+
"OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT", "false"
|
|
36
|
+
)
|
|
37
|
+
if bucket and capture_content != "false":
|
|
38
|
+
logging.info("Setting up GenAI telemetry with GCS upload...")
|
|
39
|
+
os.environ["OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT"] = "NO_CONTENT"
|
|
40
|
+
os.environ.setdefault("OTEL_INSTRUMENTATION_GENAI_UPLOAD_FORMAT", "jsonl")
|
|
41
|
+
os.environ.setdefault("OTEL_INSTRUMENTATION_GENAI_COMPLETION_HOOK", "upload")
|
|
42
|
+
os.environ.setdefault(
|
|
43
|
+
"OTEL_SEMCONV_STABILITY_OPT_IN", "gen_ai_latest_experimental"
|
|
44
|
+
)
|
|
45
|
+
commit_sha = os.environ.get("COMMIT_SHA", "dev")
|
|
46
|
+
os.environ.setdefault(
|
|
47
|
+
"OTEL_RESOURCE_ATTRIBUTES",
|
|
48
|
+
f"service.namespace={{cookiecutter.project_name}},service.version={commit_sha}",
|
|
49
|
+
)
|
|
50
|
+
path = os.environ.get("GENAI_TELEMETRY_PATH", "completions")
|
|
51
|
+
os.environ.setdefault(
|
|
52
|
+
"OTEL_INSTRUMENTATION_GENAI_UPLOAD_BASE_PATH",
|
|
53
|
+
f"gs://{bucket}/{path}",
|
|
54
|
+
)
|
|
55
|
+
{%- if cookiecutter.is_adk and cookiecutter.is_a2a %}
|
|
56
|
+
|
|
57
|
+
# Set up OpenTelemetry exporters for Cloud Trace and Cloud Logging
|
|
58
|
+
credentials, project_id = google.auth.default()
|
|
59
|
+
otel_hooks = get_gcp_exporters(
|
|
60
|
+
enable_cloud_tracing=True,
|
|
61
|
+
enable_cloud_metrics=False,
|
|
62
|
+
enable_cloud_logging=True,
|
|
63
|
+
google_auth=(credentials, project_id),
|
|
64
|
+
)
|
|
65
|
+
otel_resource = get_gcp_resource(project_id)
|
|
66
|
+
maybe_set_otel_providers(
|
|
67
|
+
otel_hooks_to_setup=[otel_hooks],
|
|
68
|
+
otel_resource=otel_resource,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Set up GenAI SDK instrumentation
|
|
72
|
+
_setup_instrumentation_lib_if_installed()
|
|
73
|
+
{%- endif %}
|
|
74
|
+
|
|
75
|
+
return bucket
|
|
76
|
+
{%- else %}
|
|
77
|
+
import logging
|
|
78
|
+
|
|
79
|
+
from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def setup_telemetry() -> None:
|
|
83
|
+
"""Initialize Traceloop telemetry for LangGraph agents."""
|
|
84
|
+
try:
|
|
85
|
+
from traceloop.sdk import Instruments, Traceloop
|
|
86
|
+
|
|
87
|
+
Traceloop.init(
|
|
88
|
+
app_name="{{cookiecutter.project_name}}",
|
|
89
|
+
disable_batch=False,
|
|
90
|
+
telemetry_enabled=False,
|
|
91
|
+
exporter=CloudTraceSpanExporter(),
|
|
92
|
+
instruments={Instruments.LANGCHAIN},
|
|
93
|
+
)
|
|
94
|
+
except Exception as e:
|
|
95
|
+
logging.error("Failed to initialize Telemetry: %s", str(e))
|
|
96
|
+
{%- endif %}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
{%- if
|
|
15
|
+
{%- if cookiecutter.is_adk %}
|
|
16
16
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
17
17
|
import uuid
|
|
18
18
|
from typing import (
|
|
@@ -26,12 +26,14 @@ from pydantic import (
|
|
|
26
26
|
Field,
|
|
27
27
|
)
|
|
28
28
|
{%- else %}
|
|
29
|
+
import uuid
|
|
29
30
|
from typing import (
|
|
30
31
|
Literal,
|
|
31
32
|
)
|
|
32
33
|
|
|
33
34
|
from pydantic import (
|
|
34
35
|
BaseModel,
|
|
36
|
+
Field,
|
|
35
37
|
)
|
|
36
38
|
{%- endif %}
|
|
37
39
|
{%- else %}
|
|
@@ -57,7 +59,7 @@ from pydantic import (
|
|
|
57
59
|
{%- endif %}
|
|
58
60
|
|
|
59
61
|
|
|
60
|
-
{%- if
|
|
62
|
+
{%- if cookiecutter.is_adk %}
|
|
61
63
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
62
64
|
|
|
63
65
|
|
|
@@ -103,15 +105,11 @@ class Feedback(BaseModel):
|
|
|
103
105
|
|
|
104
106
|
score: int | float
|
|
105
107
|
text: str | None = ""
|
|
106
|
-
{%- if "adk" in cookiecutter.tags %}
|
|
107
|
-
invocation_id: str
|
|
108
|
-
{%- else %}
|
|
109
|
-
run_id: str
|
|
110
|
-
{%- endif %}
|
|
111
108
|
log_type: Literal["feedback"] = "feedback"
|
|
112
109
|
service_name: Literal["{{cookiecutter.project_name}}"] = "{{cookiecutter.project_name}}"
|
|
113
|
-
user_id: str =
|
|
114
|
-
|
|
110
|
+
user_id: str = Field(default_factory=lambda: str(uuid.uuid4()))
|
|
111
|
+
session_id: str = Field(default_factory=lambda: str(uuid.uuid4()))
|
|
112
|
+
{% if not cookiecutter.is_adk %}
|
|
115
113
|
|
|
116
114
|
def ensure_valid_config(config: RunnableConfig | None) -> RunnableConfig:
|
|
117
115
|
"""Ensures a valid RunnableConfig by setting defaults for missing fields."""
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
"""Converters for A2A and LangChain types."""
|
|
16
|
+
|
|
17
|
+
from .part_converter import (
|
|
18
|
+
convert_a2a_parts_to_langchain_content,
|
|
19
|
+
convert_langchain_content_to_a2a_parts,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
__all__ = [
|
|
23
|
+
"convert_a2a_parts_to_langchain_content",
|
|
24
|
+
"convert_langchain_content_to_a2a_parts",
|
|
25
|
+
]
|