agent-starter-pack 0.15.7__py3-none-any.whl → 0.17.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.
Potentially problematic release.
This version of agent-starter-pack might be problematic. Click here for more details.
- {agents → agent_starter_pack/agents}/adk_base/.template/templateconfig.yaml +1 -1
- {agents/live_api → agent_starter_pack/agents/adk_live}/.template/templateconfig.yaml +5 -7
- agent_starter_pack/agents/adk_live/README.md +32 -0
- agent_starter_pack/agents/adk_live/app/agent.py +48 -0
- agent_starter_pack/agents/adk_live/tests/unit/test_dummy.py +38 -0
- {agents → agent_starter_pack/agents}/agentic_rag/.template/templateconfig.yaml +1 -1
- agent_starter_pack/agents/crewai_coding_crew/app/agent.py +47 -0
- agent_starter_pack/agents/langgraph_base_react/app/agent.py +34 -0
- {src → agent_starter_pack}/base_template/GEMINI.md +1 -1
- {src → agent_starter_pack}/base_template/Makefile +130 -61
- {src → agent_starter_pack}/base_template/README.md +6 -6
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/apis.tf +1 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/log_sinks.tf +31 -25
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/providers.tf +1 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/variables.tf +1 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/github.tf +14 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/locals.tf +1 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/log_sinks.tf +37 -28
- {src → agent_starter_pack}/base_template/deployment/terraform/providers.tf +1 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/variables.tf +1 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}build_triggers.tf{% else %}unused_build_triggers.tf{% endif %} +4 -2
- {src → agent_starter_pack}/base_template/pyproject.toml +22 -21
- {src → agent_starter_pack}/base_template/{% if cookiecutter.cicd_runner == 'github_actions' %}.github{% else %}unused_github{% endif %}/workflows/deploy-to-prod.yaml +5 -5
- {src → agent_starter_pack}/base_template/{% if cookiecutter.cicd_runner == 'github_actions' %}.github{% else %}unused_github{% endif %}/workflows/pr_checks.yaml +3 -3
- {src → agent_starter_pack}/base_template/{% if cookiecutter.cicd_runner == 'github_actions' %}.github{% else %}unused_github{% endif %}/workflows/staging.yaml +74 -11
- {src → agent_starter_pack}/base_template/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}.cloudbuild{% else %}unused_.cloudbuild{% endif %}/deploy-to-prod.yaml +6 -6
- {src → agent_starter_pack}/base_template/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}.cloudbuild{% else %}unused_.cloudbuild{% endif %}/pr_checks.yaml +4 -4
- {src → agent_starter_pack}/base_template/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}.cloudbuild{% else %}unused_.cloudbuild{% endif %}/staging.yaml +95 -13
- {src → agent_starter_pack}/base_template/{{cookiecutter.agent_directory}}/utils/tracing.py +1 -1
- {src → agent_starter_pack}/base_template/{{cookiecutter.agent_directory}}/utils/typing.py +4 -4
- {src → agent_starter_pack}/cli/commands/setup_cicd.py +1 -1
- {src → agent_starter_pack}/cli/main.py +2 -2
- {src → agent_starter_pack}/cli/utils/gcp.py +1 -1
- {src → agent_starter_pack}/cli/utils/remote_template.py +12 -9
- {src → agent_starter_pack}/cli/utils/template.py +19 -15
- agent_starter_pack/deployment_targets/agent_engine/deployment/terraform/{% if not cookiecutter.is_adk_live %}service.tf{% else %}unused_service.tf{% endif %} +82 -0
- agent_starter_pack/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py +387 -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 +255 -0
- {src → agent_starter_pack}/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/agent_engine_app.py +40 -14
- {src → agent_starter_pack}/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/utils/deployment.py +13 -4
- agent_starter_pack/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/utils/{% if cookiecutter.is_adk_live %}expose_app.py{% else %}unused_expose_app.py{% endif %} +520 -0
- {src → agent_starter_pack}/deployment_targets/cloud_run/Dockerfile +3 -3
- {src → agent_starter_pack}/deployment_targets/cloud_run/deployment/terraform/dev/service.tf +4 -4
- {src → agent_starter_pack}/deployment_targets/cloud_run/deployment/terraform/service.tf +7 -7
- {src → agent_starter_pack}/deployment_targets/cloud_run/tests/integration/test_server_e2e.py +207 -5
- {src → agent_starter_pack}/deployment_targets/cloud_run/tests/load_test/README.md +82 -0
- agent_starter_pack/deployment_targets/cloud_run/tests/load_test/load_test.py +249 -0
- {src → agent_starter_pack}/deployment_targets/cloud_run/{{cookiecutter.agent_directory}}/server.py +190 -146
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/package-lock.json +39 -1007
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/package.json +1 -9
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/App.tsx +1 -1
- {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
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/side-panel/SidePanel.tsx +11 -5
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/side-panel/side-panel.scss +146 -115
- 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 +38 -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 +204 -23
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/utils.ts +27 -5
- {src → agent_starter_pack}/frontends/streamlit/frontend/utils/local_chat_history.py +2 -0
- {src → agent_starter_pack}/resources/docs/adk-cheatsheet.md +5 -5
- agent_starter_pack/resources/idx/.idx/dev.nix +64 -0
- agent_starter_pack/resources/idx/idx-template.json +6 -0
- {src → agent_starter_pack}/resources/idx/idx-template.nix +2 -3
- {src → agent_starter_pack}/resources/locks/uv-adk_base-agent_engine.lock +1079 -954
- {src → agent_starter_pack}/resources/locks/uv-adk_base-cloud_run.lock +1441 -1309
- agent_starter_pack/resources/locks/uv-adk_live-agent_engine.lock +4229 -0
- agent_starter_pack/resources/locks/uv-adk_live-cloud_run.lock +4822 -0
- {src → agent_starter_pack}/resources/locks/uv-agentic_rag-agent_engine.lock +1107 -997
- {src → agent_starter_pack}/resources/locks/uv-agentic_rag-cloud_run.lock +1485 -1368
- {src → agent_starter_pack}/resources/locks/uv-crewai_coding_crew-agent_engine.lock +1294 -1297
- {src → agent_starter_pack}/resources/locks/uv-crewai_coding_crew-cloud_run.lock +2028 -1807
- {src → agent_starter_pack}/resources/locks/uv-langgraph_base_react-agent_engine.lock +1176 -1197
- {src → agent_starter_pack}/resources/locks/uv-langgraph_base_react-cloud_run.lock +1947 -1679
- {src → agent_starter_pack}/utils/generate_locks.py +12 -7
- {src → agent_starter_pack}/utils/lock_utils.py +2 -2
- {src → agent_starter_pack}/utils/watch_and_rebuild.py +1 -1
- {agent_starter_pack-0.15.7.dist-info → agent_starter_pack-0.17.0.dist-info}/METADATA +17 -18
- agent_starter_pack-0.17.0.dist-info/RECORD +179 -0
- agent_starter_pack-0.17.0.dist-info/entry_points.txt +2 -0
- llm.txt +1 -1
- agent_starter_pack-0.15.7.dist-info/RECORD +0 -176
- agent_starter_pack-0.15.7.dist-info/entry_points.txt +0 -2
- agents/crewai_coding_crew/app/agent.py +0 -86
- agents/langgraph_base_react/app/agent.py +0 -73
- agents/live_api/README.md +0 -37
- agents/live_api/app/agent.py +0 -72
- agents/live_api/tests/integration/test_server_e2e.py +0 -260
- agents/live_api/tests/load_test/load_test.py +0 -40
- agents/live_api/tests/unit/test_server.py +0 -144
- src/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py +0 -186
- src/deployment_targets/agent_engine/tests/load_test/README.md +0 -37
- src/deployment_targets/agent_engine/tests/load_test/load_test.py +0 -126
- src/deployment_targets/cloud_run/tests/load_test/load_test.py +0 -122
- src/resources/idx/.idx/dev.nix +0 -50
- src/resources/idx/idx-template.json +0 -21
- src/resources/locks/uv-live_api-cloud_run.lock +0 -6118
- {agents → agent_starter_pack/agents}/README.md +0 -0
- {agents → agent_starter_pack/agents}/adk_base/README.md +0 -0
- {agents → agent_starter_pack/agents}/adk_base/app/__init__.py +0 -0
- {agents → agent_starter_pack/agents}/adk_base/app/agent.py +0 -0
- {agents → agent_starter_pack/agents}/adk_base/notebooks/adk_app_testing.ipynb +0 -0
- {agents → agent_starter_pack/agents}/adk_base/notebooks/evaluating_adk_agent.ipynb +0 -0
- {agents → agent_starter_pack/agents}/adk_base/tests/integration/test_agent.py +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/README.md +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/app/__init__.py +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/app/agent.py +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/app/retrievers.py +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/app/templates.py +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/notebooks/adk_app_testing.ipynb +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/notebooks/evaluating_adk_agent.ipynb +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/tests/integration/test_agent.py +0 -0
- {agents → agent_starter_pack/agents}/crewai_coding_crew/.template/templateconfig.yaml +0 -0
- {agents → agent_starter_pack/agents}/crewai_coding_crew/README.md +0 -0
- {agents → agent_starter_pack/agents}/crewai_coding_crew/app/crew/config/agents.yaml +0 -0
- {agents → agent_starter_pack/agents}/crewai_coding_crew/app/crew/config/tasks.yaml +0 -0
- {agents → agent_starter_pack/agents}/crewai_coding_crew/app/crew/crew.py +0 -0
- {agents → agent_starter_pack/agents}/crewai_coding_crew/notebooks/evaluating_crewai_agent.ipynb +0 -0
- {agents → agent_starter_pack/agents}/crewai_coding_crew/notebooks/evaluating_langgraph_agent.ipynb +0 -0
- {agents → agent_starter_pack/agents}/crewai_coding_crew/tests/integration/test_agent.py +0 -0
- {agents → agent_starter_pack/agents}/langgraph_base_react/.template/templateconfig.yaml +0 -0
- {agents → agent_starter_pack/agents}/langgraph_base_react/README.md +0 -0
- {agents → agent_starter_pack/agents}/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb +0 -0
- {agents → agent_starter_pack/agents}/langgraph_base_react/tests/integration/test_agent.py +0 -0
- {src → agent_starter_pack}/base_template/.gitignore +0 -0
- {src → agent_starter_pack}/base_template/deployment/README.md +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/apis.tf +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/iam.tf +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/storage.tf +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/vars/env.tfvars +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/iam.tf +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/service_accounts.tf +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/storage.tf +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/vars/env.tfvars +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/{% if cookiecutter.cicd_runner == 'github_actions' %}wif.tf{% else %}unused_wif.tf{% endif %} +0 -0
- {src → agent_starter_pack}/base_template/tests/unit/test_dummy.py +0 -0
- {src → agent_starter_pack}/base_template/{{cookiecutter.agent_directory}}/utils/gcs.py +0 -0
- {src → agent_starter_pack}/cli/commands/create.py +0 -0
- {src → agent_starter_pack}/cli/commands/enhance.py +0 -0
- {src → agent_starter_pack}/cli/commands/list.py +0 -0
- {src → agent_starter_pack}/cli/utils/__init__.py +0 -0
- {src → agent_starter_pack}/cli/utils/cicd.py +0 -0
- {src → agent_starter_pack}/cli/utils/datastores.py +0 -0
- {src → agent_starter_pack}/cli/utils/logging.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/components/process_data.py +0 -0
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/pipeline.py +0 -0
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/submit_pipeline.py +0 -0
- {src → agent_starter_pack}/data_ingestion/pyproject.toml +0 -0
- {src → agent_starter_pack}/data_ingestion/uv.lock +0 -0
- {src → agent_starter_pack}/deployment_targets/agent_engine/deployment_metadata.json +0 -0
- {src → agent_starter_pack}/deployment_targets/agent_engine/notebooks/intro_agent_engine.ipynb +0 -0
- {src → agent_starter_pack}/deployment_targets/agent_engine/tests/load_test/.results/.placeholder +0 -0
- {src → agent_starter_pack}/deployment_targets/cloud_run/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
- {src → agent_starter_pack}/frontends/streamlit/frontend/side_bar.py +0 -0
- {src → agent_starter_pack}/frontends/streamlit/frontend/streamlit_app.py +0 -0
- {src → agent_starter_pack}/frontends/streamlit/frontend/style/app_markdown.py +0 -0
- {src → agent_starter_pack}/frontends/streamlit/frontend/utils/chat_utils.py +0 -0
- {src → agent_starter_pack}/frontends/streamlit/frontend/utils/message_editing.py +0 -0
- {src → agent_starter_pack}/frontends/streamlit/frontend/utils/multimodal_utils.py +0 -0
- {src → agent_starter_pack}/frontends/streamlit/frontend/utils/stream_handler.py +0 -0
- {src → agent_starter_pack}/frontends/streamlit/frontend/utils/title_summary.py +0 -0
- {src → agent_starter_pack}/resources/containers/data_processing/Dockerfile +0 -0
- {src → agent_starter_pack}/resources/containers/e2e-tests/Dockerfile +0 -0
- {agent_starter_pack-0.15.7.dist-info → agent_starter_pack-0.17.0.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.15.7.dist-info → agent_starter_pack-0.17.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -14,13 +14,13 @@
|
|
|
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-staging
|
|
19
19
|
entrypoint: bash
|
|
20
20
|
args:
|
|
21
21
|
- -c
|
|
22
22
|
- |
|
|
23
|
-
cd data_ingestion && pip install uv==0.
|
|
23
|
+
cd data_ingestion && pip install uv==0.8.13 --user && cd data_ingestion_pipeline && \
|
|
24
24
|
uv sync --locked && uv run python submit_pipeline.py
|
|
25
25
|
env:
|
|
26
26
|
- "PIPELINE_ROOT=${_PIPELINE_GCS_ROOT_STAGING}"
|
|
@@ -91,17 +91,17 @@ steps:
|
|
|
91
91
|
- |
|
|
92
92
|
echo $(gcloud auth print-identity-token -q) > id_token.txt
|
|
93
93
|
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
94
|
-
- name: "python:3.
|
|
94
|
+
- name: "python:3.12-slim"
|
|
95
95
|
id: install-dependencies
|
|
96
96
|
entrypoint: /bin/bash
|
|
97
97
|
args:
|
|
98
98
|
- "-c"
|
|
99
99
|
- |
|
|
100
|
-
pip install uv==0.
|
|
100
|
+
pip install uv==0.8.13 --user && uv sync --locked
|
|
101
101
|
env:
|
|
102
102
|
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
103
103
|
|
|
104
|
-
- name: "python:3.
|
|
104
|
+
- name: "python:3.12-slim"
|
|
105
105
|
id: deploy-staging
|
|
106
106
|
entrypoint: /bin/bash
|
|
107
107
|
args:
|
|
@@ -111,7 +111,7 @@ steps:
|
|
|
111
111
|
uv run {{cookiecutter.agent_directory}}/agent_engine_app.py \
|
|
112
112
|
--project ${_STAGING_PROJECT_ID} \
|
|
113
113
|
--location ${_REGION} \
|
|
114
|
-
--
|
|
114
|
+
--artifacts-bucket-name ${_LOGS_BUCKET_NAME_STAGING} \
|
|
115
115
|
--set-env-vars="COMMIT_SHA=${COMMIT_SHA}{%- 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 %}"
|
|
116
116
|
env:
|
|
117
117
|
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
@@ -127,31 +127,113 @@ steps:
|
|
|
127
127
|
{%- endif %}
|
|
128
128
|
|
|
129
129
|
# Load Testing
|
|
130
|
-
|
|
130
|
+
{%- if cookiecutter.deployment_target == 'cloud_run' and cookiecutter.agent_name == 'adk_live' %}
|
|
131
|
+
- name: "europe-west4-docker.pkg.dev/production-ai-template/starter-pack/e2e-tests"
|
|
132
|
+
id: load_test
|
|
133
|
+
entrypoint: /bin/bash
|
|
134
|
+
args:
|
|
135
|
+
- "-c"
|
|
136
|
+
- |
|
|
137
|
+
# Install load test dependencies
|
|
138
|
+
pip install locust==2.31.1 websockets
|
|
139
|
+
|
|
140
|
+
# Install Cloud Run proxy component
|
|
141
|
+
apt-get update && apt-get install -y google-cloud-cli-cloud-run-proxy
|
|
142
|
+
|
|
143
|
+
# Start Cloud Run proxy in background
|
|
144
|
+
gcloud run services proxy {{cookiecutter.project_name}} \
|
|
145
|
+
--port=8080 \
|
|
146
|
+
--region ${_REGION} \
|
|
147
|
+
--project ${_STAGING_PROJECT_ID} \
|
|
148
|
+
--quiet &
|
|
149
|
+
_PROXY_PID=$$!
|
|
150
|
+
|
|
151
|
+
# Wait for proxy to be ready
|
|
152
|
+
echo "Waiting for proxy to start..."
|
|
153
|
+
sleep 10
|
|
154
|
+
|
|
155
|
+
# Run load test and capture exit code
|
|
156
|
+
locust -f tests/load_test/load_test.py \
|
|
157
|
+
--headless \
|
|
158
|
+
-H http://127.0.0.1:8080 \
|
|
159
|
+
-t 30s -u 2 -r 2 \
|
|
160
|
+
--csv=tests/load_test/.results/results \
|
|
161
|
+
--html=tests/load_test/.results/report.html
|
|
162
|
+
_LOAD_TEST_EXIT_CODE=$$?
|
|
163
|
+
|
|
164
|
+
# Clean up proxy
|
|
165
|
+
kill $$_PROXY_PID || true
|
|
166
|
+
|
|
167
|
+
# Exit with load test result to fail build if tests failed
|
|
168
|
+
exit $$_LOAD_TEST_EXIT_CODE
|
|
169
|
+
{%- elif cookiecutter.deployment_target == 'cloud_run' %}
|
|
170
|
+
- name: "python:3.12-slim"
|
|
131
171
|
id: load_test
|
|
132
172
|
entrypoint: /bin/bash
|
|
133
173
|
args:
|
|
134
174
|
- "-c"
|
|
135
175
|
- |
|
|
136
|
-
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
137
176
|
export _ID_TOKEN=$(cat id_token.txt)
|
|
138
177
|
export _STAGING_URL=$(cat staging_url.txt)
|
|
139
|
-
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
140
|
-
export _AUTH_TOKEN=$(cat auth_token.txt)
|
|
141
|
-
{%- endif %}
|
|
142
178
|
pip install locust==2.31.1 --user
|
|
143
179
|
locust -f tests/load_test/load_test.py \
|
|
144
180
|
--headless \
|
|
145
|
-
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
146
181
|
-H $$_STAGING_URL \
|
|
147
182
|
-t 30s -u 10 -r 0.5 \
|
|
183
|
+
--csv=tests/load_test/.results/results \
|
|
184
|
+
--html=tests/load_test/.results/report.html
|
|
185
|
+
env:
|
|
186
|
+
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
187
|
+
{%- elif cookiecutter.deployment_target == 'agent_engine' and cookiecutter.is_adk_live %}
|
|
188
|
+
- name: "python:3.12-slim"
|
|
189
|
+
id: load_test
|
|
190
|
+
entrypoint: /bin/bash
|
|
191
|
+
args:
|
|
192
|
+
- "-c"
|
|
193
|
+
- |
|
|
194
|
+
# Start expose app in remote mode (uses deployment_metadata.json by default)
|
|
195
|
+
uv run python -m {{cookiecutter.agent_directory}}.utils.expose_app --mode remote &
|
|
196
|
+
EXPOSE_PID=$$!
|
|
197
|
+
|
|
198
|
+
# Wait for expose app to be ready
|
|
199
|
+
sleep 10
|
|
200
|
+
|
|
201
|
+
# Run load test against local expose app
|
|
202
|
+
uv run --with locust==2.31.1 --with websockets locust -f tests/load_test/load_test.py \
|
|
203
|
+
-H http://127.0.0.1:8000 \
|
|
204
|
+
--headless \
|
|
205
|
+
-t 30s -u 2 -r 1 \
|
|
206
|
+
--csv=tests/load_test/.results/results \
|
|
207
|
+
--html=tests/load_test/.results/report.html
|
|
208
|
+
LOCUST_EXIT_CODE=$$?
|
|
209
|
+
|
|
210
|
+
# Stop expose app
|
|
211
|
+
kill $$EXPOSE_PID
|
|
212
|
+
|
|
213
|
+
# Exit with error if locust test failed
|
|
214
|
+
if [ $$LOCUST_EXIT_CODE -ne 0 ]; then
|
|
215
|
+
echo "Load test failed with exit code $$LOCUST_EXIT_CODE"
|
|
216
|
+
exit $$LOCUST_EXIT_CODE
|
|
217
|
+
fi
|
|
218
|
+
env:
|
|
219
|
+
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
148
220
|
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
221
|
+
- name: "python:3.12-slim"
|
|
222
|
+
id: load_test
|
|
223
|
+
entrypoint: /bin/bash
|
|
224
|
+
args:
|
|
225
|
+
- "-c"
|
|
226
|
+
- |
|
|
227
|
+
export _AUTH_TOKEN=$(cat auth_token.txt)
|
|
228
|
+
pip install locust==2.31.1 --user
|
|
229
|
+
locust -f tests/load_test/load_test.py \
|
|
230
|
+
--headless \
|
|
149
231
|
-t 30s -u 2 -r 0.5 \
|
|
150
|
-
{%- endif %}
|
|
151
232
|
--csv=tests/load_test/.results/results \
|
|
152
233
|
--html=tests/load_test/.results/report.html
|
|
153
234
|
env:
|
|
154
235
|
- 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
|
|
236
|
+
{%- endif %}
|
|
155
237
|
|
|
156
238
|
# Export Load Test Results to GCS
|
|
157
239
|
- name: gcr.io/cloud-builders/gcloud
|
|
@@ -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 (
|
|
@@ -57,7 +57,7 @@ from pydantic import (
|
|
|
57
57
|
{%- endif %}
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
{%- if
|
|
60
|
+
{%- if cookiecutter.is_adk %}
|
|
61
61
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
62
62
|
|
|
63
63
|
|
|
@@ -103,7 +103,7 @@ class Feedback(BaseModel):
|
|
|
103
103
|
|
|
104
104
|
score: int | float
|
|
105
105
|
text: str | None = ""
|
|
106
|
-
{%- if
|
|
106
|
+
{%- if cookiecutter.is_adk %}
|
|
107
107
|
invocation_id: str
|
|
108
108
|
{%- else %}
|
|
109
109
|
run_id: str
|
|
@@ -111,7 +111,7 @@ class Feedback(BaseModel):
|
|
|
111
111
|
log_type: Literal["feedback"] = "feedback"
|
|
112
112
|
service_name: Literal["{{cookiecutter.project_name}}"] = "{{cookiecutter.project_name}}"
|
|
113
113
|
user_id: str = ""
|
|
114
|
-
{% if
|
|
114
|
+
{% if not cookiecutter.is_adk %}
|
|
115
115
|
|
|
116
116
|
def ensure_valid_config(config: RunnableConfig | None) -> RunnableConfig:
|
|
117
117
|
"""Ensures a valid RunnableConfig by setting defaults for missing fields."""
|
|
@@ -49,8 +49,8 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
|
|
|
49
49
|
help="Show the version and exit.",
|
|
50
50
|
)
|
|
51
51
|
def cli() -> None:
|
|
52
|
-
# Check for updates at startup (skip if --agent-garden
|
|
53
|
-
if
|
|
52
|
+
# Check for updates at startup (skip if --agent-garden, -ag, or --locked is used)
|
|
53
|
+
if not any(flag in sys.argv for flag in ("--agent-garden", "-ag", "--locked")):
|
|
54
54
|
display_update_message()
|
|
55
55
|
|
|
56
56
|
|
|
@@ -34,7 +34,7 @@ from google.cloud.aiplatform_v1beta1.types.prediction_service import (
|
|
|
34
34
|
from rich.console import Console
|
|
35
35
|
from rich.prompt import Confirm
|
|
36
36
|
|
|
37
|
-
from
|
|
37
|
+
from agent_starter_pack.cli.utils.version import PACKAGE_NAME, get_current_version
|
|
38
38
|
|
|
39
39
|
console = Console()
|
|
40
40
|
|
|
@@ -167,15 +167,18 @@ def check_and_execute_with_version_lock(
|
|
|
167
167
|
|
|
168
168
|
# Add version lock specific parameters and handle remote URL replacement
|
|
169
169
|
if original_agent_spec:
|
|
170
|
-
#
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
170
|
+
# Check if --agent flag exists in original args
|
|
171
|
+
agent_flag_exists = "--agent" in original_args or "-a" in original_args
|
|
172
|
+
|
|
173
|
+
if agent_flag_exists:
|
|
174
|
+
# Replace remote agent spec with local path
|
|
175
|
+
original_args = [
|
|
176
|
+
f"local@{template_dir}" if arg == original_agent_spec else arg
|
|
177
|
+
for arg in original_args
|
|
178
|
+
]
|
|
179
|
+
else:
|
|
180
|
+
# Agent was selected interactively, add --agent flag
|
|
181
|
+
original_args.extend(["--agent", f"local@{template_dir}"])
|
|
179
182
|
|
|
180
183
|
# Add version lock flags only for ASP versions 0.14.1 and above
|
|
181
184
|
if pkg_version.parse(version) > pkg_version.parse("0.14.1"):
|
|
@@ -26,7 +26,7 @@ from cookiecutter.main import cookiecutter
|
|
|
26
26
|
from rich.console import Console
|
|
27
27
|
from rich.prompt import IntPrompt, Prompt
|
|
28
28
|
|
|
29
|
-
from
|
|
29
|
+
from agent_starter_pack.cli.utils.version import get_current_version
|
|
30
30
|
|
|
31
31
|
from .datastores import DATASTORES
|
|
32
32
|
from .remote_template import (
|
|
@@ -112,14 +112,14 @@ def get_available_agents(deployment_target: str | None = None) -> dict:
|
|
|
112
112
|
# Define priority agents that should appear first
|
|
113
113
|
PRIORITY_AGENTS = [
|
|
114
114
|
"adk_base",
|
|
115
|
-
"
|
|
115
|
+
"adk_live",
|
|
116
116
|
"agentic_rag",
|
|
117
117
|
"langgraph_base_react",
|
|
118
118
|
]
|
|
119
119
|
|
|
120
120
|
agents_list = []
|
|
121
121
|
priority_agents_dict = dict.fromkeys(PRIORITY_AGENTS) # Track priority agents
|
|
122
|
-
agents_dir = pathlib.Path(__file__).parent.parent.parent
|
|
122
|
+
agents_dir = pathlib.Path(__file__).parent.parent.parent / "agents"
|
|
123
123
|
|
|
124
124
|
for agent_dir in agents_dir.iterdir():
|
|
125
125
|
if agent_dir.is_dir() and not agent_dir.name.startswith("__"):
|
|
@@ -191,7 +191,7 @@ def get_deployment_targets(
|
|
|
191
191
|
config = remote_config
|
|
192
192
|
else:
|
|
193
193
|
template_path = (
|
|
194
|
-
pathlib.Path(__file__).parent.parent.parent
|
|
194
|
+
pathlib.Path(__file__).parent.parent.parent
|
|
195
195
|
/ "agents"
|
|
196
196
|
/ agent_name
|
|
197
197
|
/ ".template"
|
|
@@ -309,7 +309,7 @@ def prompt_datastore_selection(
|
|
|
309
309
|
|
|
310
310
|
# Otherwise, proceed with normal flow
|
|
311
311
|
template_path = (
|
|
312
|
-
pathlib.Path(__file__).parent.parent.parent
|
|
312
|
+
pathlib.Path(__file__).parent.parent.parent
|
|
313
313
|
/ "agents"
|
|
314
314
|
/ agent_name
|
|
315
315
|
/ ".template"
|
|
@@ -418,7 +418,7 @@ def prompt_cicd_runner_selection() -> str:
|
|
|
418
418
|
|
|
419
419
|
def get_template_path(agent_name: str, debug: bool = False) -> pathlib.Path:
|
|
420
420
|
"""Get the absolute path to the agent template directory."""
|
|
421
|
-
current_dir = pathlib.Path(__file__).parent.parent.parent
|
|
421
|
+
current_dir = pathlib.Path(__file__).parent.parent.parent
|
|
422
422
|
template_path = current_dir / "agents" / agent_name / ".template"
|
|
423
423
|
if debug:
|
|
424
424
|
logging.debug(f"Looking for template in: {template_path}")
|
|
@@ -526,9 +526,7 @@ def process_template(
|
|
|
526
526
|
# For remote templates, determine the base template
|
|
527
527
|
base_template_name = get_base_template_name(remote_config or {})
|
|
528
528
|
agent_path = (
|
|
529
|
-
pathlib.Path(__file__).parent.parent.parent
|
|
530
|
-
/ "agents"
|
|
531
|
-
/ base_template_name
|
|
529
|
+
pathlib.Path(__file__).parent.parent.parent / "agents" / base_template_name
|
|
532
530
|
)
|
|
533
531
|
logging.debug(f"Remote template using base: {base_template_name}")
|
|
534
532
|
else:
|
|
@@ -740,6 +738,8 @@ def process_template(
|
|
|
740
738
|
),
|
|
741
739
|
"settings": settings,
|
|
742
740
|
"tags": tags,
|
|
741
|
+
"is_adk": "adk" in tags,
|
|
742
|
+
"is_adk_live": "adk_live" in tags,
|
|
743
743
|
"deployment_target": deployment_target or "",
|
|
744
744
|
"cicd_runner": cicd_runner or "google_cloud_build",
|
|
745
745
|
"session_type": session_type or "",
|
|
@@ -756,7 +756,12 @@ def process_template(
|
|
|
756
756
|
"_copy_without_render": [
|
|
757
757
|
"*.ipynb", # Don't render notebooks
|
|
758
758
|
"*.json", # Don't render JSON files
|
|
759
|
-
"
|
|
759
|
+
"*.tsx", # Don't render TypeScript React files
|
|
760
|
+
"*.ts", # Don't render TypeScript files
|
|
761
|
+
"*.jsx", # Don't render JavaScript React files
|
|
762
|
+
"*.js", # Don't render JavaScript files
|
|
763
|
+
"*.css", # Don't render CSS files
|
|
764
|
+
"frontend/**/*", # Don't render frontend directory recursively
|
|
760
765
|
"notebooks/*", # Don't render notebooks directory
|
|
761
766
|
".git/*", # Don't render git directory
|
|
762
767
|
"__pycache__/*", # Don't render cache
|
|
@@ -1069,8 +1074,7 @@ def process_template(
|
|
|
1069
1074
|
elif deployment_target:
|
|
1070
1075
|
# For local templates, use the existing logic
|
|
1071
1076
|
lock_path = (
|
|
1072
|
-
pathlib.Path(__file__).parent.parent.parent
|
|
1073
|
-
/ "src"
|
|
1077
|
+
pathlib.Path(__file__).parent.parent.parent
|
|
1074
1078
|
/ "resources"
|
|
1075
1079
|
/ "locks"
|
|
1076
1080
|
/ f"uv-{agent_name}-{deployment_target}.lock"
|
|
@@ -1109,12 +1113,12 @@ def should_exclude_path(
|
|
|
1109
1113
|
path: pathlib.Path, agent_name: str, agent_directory: str = "app"
|
|
1110
1114
|
) -> bool:
|
|
1111
1115
|
"""Determine if a path should be excluded based on the agent type."""
|
|
1112
|
-
if agent_name == "
|
|
1113
|
-
# Exclude the unit test utils folder and agent utils folder for
|
|
1116
|
+
if agent_name == "adk_live":
|
|
1117
|
+
# Exclude the unit test utils folder and agent utils folder for adk_live
|
|
1114
1118
|
if "tests/unit/test_utils" in str(path) or f"{agent_directory}/utils" in str(
|
|
1115
1119
|
path
|
|
1116
1120
|
):
|
|
1117
|
-
logging.debug(f"Excluding path for
|
|
1121
|
+
logging.debug(f"Excluding path for adk_live: {path}")
|
|
1118
1122
|
return True
|
|
1119
1123
|
return False
|
|
1120
1124
|
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
# Get project information to access the project number
|
|
16
|
+
data "google_project" "project" {
|
|
17
|
+
for_each = local.deploy_project_ids
|
|
18
|
+
|
|
19
|
+
project_id = local.deploy_project_ids[each.key]
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
resource "google_vertex_ai_reasoning_engine" "app_staging" {
|
|
23
|
+
display_name = var.project_name
|
|
24
|
+
description = "Agent deployed via Terraform"
|
|
25
|
+
region = var.region
|
|
26
|
+
project = var.staging_project_id
|
|
27
|
+
|
|
28
|
+
spec {
|
|
29
|
+
service_account = google_service_account.app_sa["staging"].email
|
|
30
|
+
|
|
31
|
+
package_spec {
|
|
32
|
+
# IMPORTANT: This Python version must match the version used in CI/CD pipelines
|
|
33
|
+
# for pickling compatibility. Mismatched versions will cause deserialization errors.
|
|
34
|
+
python_version = "3.12"
|
|
35
|
+
pickle_object_gcs_uri = "gs://agent-starter-pack/dummy/agent_engine.pkl"
|
|
36
|
+
dependency_files_gcs_uri = "gs://agent-starter-pack/dummy/dependencies.tar.gz"
|
|
37
|
+
requirements_gcs_uri = "gs://agent-starter-pack/dummy/requirements.txt"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
# This lifecycle block prevents Terraform from overwriting the spec when it's
|
|
42
|
+
# updated by Agent Engine deployments outside of Terraform (e.g., via CI/CD pipelines)
|
|
43
|
+
lifecycle {
|
|
44
|
+
ignore_changes = [
|
|
45
|
+
spec,
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
# Make dependencies conditional to avoid errors.
|
|
50
|
+
depends_on = [google_project_service.deploy_project_services]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
resource "google_vertex_ai_reasoning_engine" "app_prod" {
|
|
54
|
+
display_name = var.project_name
|
|
55
|
+
description = "Agent deployed via Terraform"
|
|
56
|
+
region = var.region
|
|
57
|
+
project = var.prod_project_id
|
|
58
|
+
|
|
59
|
+
spec {
|
|
60
|
+
service_account = google_service_account.app_sa["prod"].email
|
|
61
|
+
|
|
62
|
+
package_spec {
|
|
63
|
+
# IMPORTANT: This Python version must match the version used in CI/CD pipelines
|
|
64
|
+
# for pickling compatibility. Mismatched versions will cause deserialization errors.
|
|
65
|
+
python_version = "3.12"
|
|
66
|
+
pickle_object_gcs_uri = "gs://agent-starter-pack/dummy/agent_engine.pkl"
|
|
67
|
+
dependency_files_gcs_uri = "gs://agent-starter-pack/dummy/dependencies.tar.gz"
|
|
68
|
+
requirements_gcs_uri = "gs://agent-starter-pack/dummy/requirements.txt"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
# This lifecycle block prevents Terraform from overwriting the spec when it's
|
|
73
|
+
# updated by Agent Engine deployments outside of Terraform (e.g., via CI/CD pipelines)
|
|
74
|
+
lifecycle {
|
|
75
|
+
ignore_changes = [
|
|
76
|
+
spec,
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
# Make dependencies conditional to avoid errors.
|
|
81
|
+
depends_on = [google_project_service.deploy_project_services]
|
|
82
|
+
}
|