agent-starter-pack 0.3.3__py3-none-any.whl → 0.3.5__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-0.3.3.dist-info → agent_starter_pack-0.3.5.dist-info}/METADATA +2 -2
- {agent_starter_pack-0.3.3.dist-info → agent_starter_pack-0.3.5.dist-info}/RECORD +25 -23
- agents/adk_base/notebooks/evaluating_adk_agent.ipynb +1528 -0
- agents/adk_base/template/.templateconfig.yaml +1 -1
- agents/agentic_rag/notebooks/evaluating_adk_agent.ipynb +1528 -0
- agents/crewai_coding_crew/notebooks/evaluating_langgraph_agent.ipynb +30 -17
- agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb +30 -17
- src/base_template/Makefile +30 -17
- src/base_template/README.md +10 -18
- src/base_template/deployment/cd/deploy-to-prod.yaml +3 -0
- src/base_template/deployment/cd/staging.yaml +3 -0
- src/frontends/live_api_react/frontend/package-lock.json +3 -3
- src/resources/idx/idx-template.json +1 -1
- src/resources/locks/uv-adk_base-agent_engine.lock +287 -280
- src/resources/locks/uv-adk_base-cloud_run.lock +407 -364
- src/resources/locks/uv-agentic_rag-agent_engine.lock +295 -288
- src/resources/locks/uv-agentic_rag-cloud_run.lock +415 -372
- src/resources/locks/uv-crewai_coding_crew-agent_engine.lock +336 -329
- src/resources/locks/uv-crewai_coding_crew-cloud_run.lock +481 -421
- src/resources/locks/uv-langgraph_base_react-agent_engine.lock +289 -282
- src/resources/locks/uv-langgraph_base_react-cloud_run.lock +412 -369
- src/resources/locks/uv-live_api-cloud_run.lock +403 -360
- {agent_starter_pack-0.3.3.dist-info → agent_starter_pack-0.3.5.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.3.3.dist-info → agent_starter_pack-0.3.5.dist-info}/entry_points.txt +0 -0
- {agent_starter_pack-0.3.3.dist-info → agent_starter_pack-0.3.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -143,12 +143,8 @@
|
|
|
143
143
|
},
|
|
144
144
|
"outputs": [],
|
|
145
145
|
"source": [
|
|
146
|
-
"%pip install
|
|
147
|
-
"
|
|
148
|
-
" \"langgraph\" \\\n",
|
|
149
|
-
" \"cloudpickle==3.0.0\" \\\n",
|
|
150
|
-
" \"pydantic==2.7.4\" \\\n",
|
|
151
|
-
" \"requests\""
|
|
146
|
+
"%pip install \"langchain_google_vertexai\" \"langgraph\"\n",
|
|
147
|
+
"%pip install --upgrade --user --quiet \"google-cloud-aiplatform[evaluation]\""
|
|
152
148
|
]
|
|
153
149
|
},
|
|
154
150
|
{
|
|
@@ -273,6 +269,8 @@
|
|
|
273
269
|
},
|
|
274
270
|
"outputs": [],
|
|
275
271
|
"source": [
|
|
272
|
+
"import json\n",
|
|
273
|
+
"\n",
|
|
276
274
|
"# General\n",
|
|
277
275
|
"import random\n",
|
|
278
276
|
"import string\n",
|
|
@@ -355,7 +353,7 @@
|
|
|
355
353
|
" }\n",
|
|
356
354
|
" )\n",
|
|
357
355
|
"\n",
|
|
358
|
-
" final_output[\"predicted_trajectory\"] = function_calls\n",
|
|
356
|
+
" final_output[\"predicted_trajectory\"] = json.dumps(function_calls)\n",
|
|
359
357
|
" return final_output\n",
|
|
360
358
|
"\n",
|
|
361
359
|
"\n",
|
|
@@ -365,6 +363,7 @@
|
|
|
365
363
|
" markdown += f\"{output['response']}\\n\\n\"\n",
|
|
366
364
|
"\n",
|
|
367
365
|
" if output[\"predicted_trajectory\"]:\n",
|
|
366
|
+
" output[\"predicted_trajectory\"] = json.loads(output[\"predicted_trajectory\"])\n",
|
|
368
367
|
" markdown += \"### Function Calls\\n\"\n",
|
|
369
368
|
" for call in output[\"predicted_trajectory\"]:\n",
|
|
370
369
|
" markdown += f\"- **Function**: `{call['tool_name']}`\\n\"\n",
|
|
@@ -381,7 +380,7 @@
|
|
|
381
380
|
" display(Markdown(\"### Summary Metrics\"))\n",
|
|
382
381
|
" display(metrics_df)\n",
|
|
383
382
|
"\n",
|
|
384
|
-
" display(Markdown(
|
|
383
|
+
" display(Markdown(\"### Row-wise Metrics\"))\n",
|
|
385
384
|
" display(eval_result.metrics_table)\n",
|
|
386
385
|
"\n",
|
|
387
386
|
"\n",
|
|
@@ -599,7 +598,7 @@
|
|
|
599
598
|
"source": [
|
|
600
599
|
"def router(\n",
|
|
601
600
|
" state: list[BaseMessage],\n",
|
|
602
|
-
") -> Literal[\"get_product_details\", \"get_product_price\",
|
|
601
|
+
") -> Literal[\"get_product_details\", \"get_product_price\", END]:\n",
|
|
603
602
|
" \"\"\"Initiates product details or price retrieval if the user asks for a product.\"\"\"\n",
|
|
604
603
|
" # Get the tool_calls from the last message in the conversation history.\n",
|
|
605
604
|
" tool_calls = state[-1].tool_calls\n",
|
|
@@ -614,7 +613,7 @@
|
|
|
614
613
|
" return \"get_product_details\"\n",
|
|
615
614
|
" else:\n",
|
|
616
615
|
" # End the conversation flow.\n",
|
|
617
|
-
" return
|
|
616
|
+
" return END"
|
|
618
617
|
]
|
|
619
618
|
},
|
|
620
619
|
{
|
|
@@ -636,7 +635,7 @@
|
|
|
636
635
|
},
|
|
637
636
|
"outputs": [],
|
|
638
637
|
"source": [
|
|
639
|
-
"llm = \"gemini-
|
|
638
|
+
"llm = \"gemini-2.0-flash\""
|
|
640
639
|
]
|
|
641
640
|
},
|
|
642
641
|
{
|
|
@@ -899,6 +898,7 @@
|
|
|
899
898
|
" dataset=eval_sample_dataset,\n",
|
|
900
899
|
" metrics=single_tool_usage_metrics,\n",
|
|
901
900
|
" experiment=EXPERIMENT_NAME,\n",
|
|
901
|
+
" output_uri_prefix=BUCKET_URI + \"/single-metric-eval\",\n",
|
|
902
902
|
")\n",
|
|
903
903
|
"\n",
|
|
904
904
|
"single_tool_call_eval_result = single_tool_call_eval_task.evaluate(\n",
|
|
@@ -1003,7 +1003,10 @@
|
|
|
1003
1003
|
"EXPERIMENT_RUN = f\"trajectory-{get_id()}\"\n",
|
|
1004
1004
|
"\n",
|
|
1005
1005
|
"trajectory_eval_task = EvalTask(\n",
|
|
1006
|
-
" dataset=eval_sample_dataset
|
|
1006
|
+
" dataset=eval_sample_dataset,\n",
|
|
1007
|
+
" metrics=trajectory_metrics,\n",
|
|
1008
|
+
" experiment=EXPERIMENT_NAME,\n",
|
|
1009
|
+
" output_uri_prefix=BUCKET_URI + \"/multiple-metric-eval\",\n",
|
|
1007
1010
|
")\n",
|
|
1008
1011
|
"\n",
|
|
1009
1012
|
"trajectory_eval_result = trajectory_eval_task.evaluate(\n",
|
|
@@ -1107,7 +1110,10 @@
|
|
|
1107
1110
|
"EXPERIMENT_RUN = f\"response-{get_id()}\"\n",
|
|
1108
1111
|
"\n",
|
|
1109
1112
|
"response_eval_task = EvalTask(\n",
|
|
1110
|
-
" dataset=eval_sample_dataset
|
|
1113
|
+
" dataset=eval_sample_dataset,\n",
|
|
1114
|
+
" metrics=response_metrics,\n",
|
|
1115
|
+
" experiment=EXPERIMENT_NAME,\n",
|
|
1116
|
+
" output_uri_prefix=BUCKET_URI + \"/response-metric-eval\",\n",
|
|
1111
1117
|
")\n",
|
|
1112
1118
|
"\n",
|
|
1113
1119
|
"response_eval_result = response_eval_task.evaluate(\n",
|
|
@@ -1292,6 +1298,7 @@
|
|
|
1292
1298
|
" dataset=eval_sample_dataset,\n",
|
|
1293
1299
|
" metrics=response_tool_metrics,\n",
|
|
1294
1300
|
" experiment=EXPERIMENT_NAME,\n",
|
|
1301
|
+
" output_uri_prefix=BUCKET_URI + \"/reasoning-metric-eval\",\n",
|
|
1295
1302
|
")\n",
|
|
1296
1303
|
"\n",
|
|
1297
1304
|
"response_eval_tool_result = response_eval_tool_task.evaluate(\n",
|
|
@@ -1436,15 +1443,21 @@
|
|
|
1436
1443
|
" ],\n",
|
|
1437
1444
|
" ],\n",
|
|
1438
1445
|
" \"response\": [\n",
|
|
1439
|
-
" 500,\n",
|
|
1440
|
-
" 50,\n",
|
|
1446
|
+
" \"500\",\n",
|
|
1447
|
+
" \"50\",\n",
|
|
1441
1448
|
" \"A super fast and light usb charger\",\n",
|
|
1442
|
-
" 100,\n",
|
|
1449
|
+
" \"100\",\n",
|
|
1443
1450
|
" \"A voice-controlled smart speaker that plays music, sets alarms, and controls smart home devices.\",\n",
|
|
1444
1451
|
" ],\n",
|
|
1445
1452
|
"}\n",
|
|
1446
1453
|
"\n",
|
|
1447
|
-
"byod_eval_sample_dataset = pd.DataFrame(byod_eval_data)"
|
|
1454
|
+
"byod_eval_sample_dataset = pd.DataFrame(byod_eval_data)\n",
|
|
1455
|
+
"byod_eval_sample_dataset[\"predicted_trajectory\"] = byod_eval_sample_dataset[\n",
|
|
1456
|
+
" \"predicted_trajectory\"\n",
|
|
1457
|
+
"].apply(json.dumps)\n",
|
|
1458
|
+
"byod_eval_sample_dataset[\"reference_trajectory\"] = byod_eval_sample_dataset[\n",
|
|
1459
|
+
" \"reference_trajectory\"\n",
|
|
1460
|
+
"].apply(json.dumps)"
|
|
1448
1461
|
]
|
|
1449
1462
|
},
|
|
1450
1463
|
{
|
|
@@ -143,12 +143,8 @@
|
|
|
143
143
|
},
|
|
144
144
|
"outputs": [],
|
|
145
145
|
"source": [
|
|
146
|
-
"%pip install
|
|
147
|
-
"
|
|
148
|
-
" \"langgraph\" \\\n",
|
|
149
|
-
" \"cloudpickle==3.0.0\" \\\n",
|
|
150
|
-
" \"pydantic==2.7.4\" \\\n",
|
|
151
|
-
" \"requests\""
|
|
146
|
+
"%pip install \"langchain_google_vertexai\" \"langgraph\"\n",
|
|
147
|
+
"%pip install --upgrade --user --quiet \"google-cloud-aiplatform[evaluation]\""
|
|
152
148
|
]
|
|
153
149
|
},
|
|
154
150
|
{
|
|
@@ -273,6 +269,8 @@
|
|
|
273
269
|
},
|
|
274
270
|
"outputs": [],
|
|
275
271
|
"source": [
|
|
272
|
+
"import json\n",
|
|
273
|
+
"\n",
|
|
276
274
|
"# General\n",
|
|
277
275
|
"import random\n",
|
|
278
276
|
"import string\n",
|
|
@@ -355,7 +353,7 @@
|
|
|
355
353
|
" }\n",
|
|
356
354
|
" )\n",
|
|
357
355
|
"\n",
|
|
358
|
-
" final_output[\"predicted_trajectory\"] = function_calls\n",
|
|
356
|
+
" final_output[\"predicted_trajectory\"] = json.dumps(function_calls)\n",
|
|
359
357
|
" return final_output\n",
|
|
360
358
|
"\n",
|
|
361
359
|
"\n",
|
|
@@ -365,6 +363,7 @@
|
|
|
365
363
|
" markdown += f\"{output['response']}\\n\\n\"\n",
|
|
366
364
|
"\n",
|
|
367
365
|
" if output[\"predicted_trajectory\"]:\n",
|
|
366
|
+
" output[\"predicted_trajectory\"] = json.loads(output[\"predicted_trajectory\"])\n",
|
|
368
367
|
" markdown += \"### Function Calls\\n\"\n",
|
|
369
368
|
" for call in output[\"predicted_trajectory\"]:\n",
|
|
370
369
|
" markdown += f\"- **Function**: `{call['tool_name']}`\\n\"\n",
|
|
@@ -381,7 +380,7 @@
|
|
|
381
380
|
" display(Markdown(\"### Summary Metrics\"))\n",
|
|
382
381
|
" display(metrics_df)\n",
|
|
383
382
|
"\n",
|
|
384
|
-
" display(Markdown(
|
|
383
|
+
" display(Markdown(\"### Row-wise Metrics\"))\n",
|
|
385
384
|
" display(eval_result.metrics_table)\n",
|
|
386
385
|
"\n",
|
|
387
386
|
"\n",
|
|
@@ -599,7 +598,7 @@
|
|
|
599
598
|
"source": [
|
|
600
599
|
"def router(\n",
|
|
601
600
|
" state: list[BaseMessage],\n",
|
|
602
|
-
") -> Literal[\"get_product_details\", \"get_product_price\",
|
|
601
|
+
") -> Literal[\"get_product_details\", \"get_product_price\", END]:\n",
|
|
603
602
|
" \"\"\"Initiates product details or price retrieval if the user asks for a product.\"\"\"\n",
|
|
604
603
|
" # Get the tool_calls from the last message in the conversation history.\n",
|
|
605
604
|
" tool_calls = state[-1].tool_calls\n",
|
|
@@ -614,7 +613,7 @@
|
|
|
614
613
|
" return \"get_product_details\"\n",
|
|
615
614
|
" else:\n",
|
|
616
615
|
" # End the conversation flow.\n",
|
|
617
|
-
" return
|
|
616
|
+
" return END"
|
|
618
617
|
]
|
|
619
618
|
},
|
|
620
619
|
{
|
|
@@ -636,7 +635,7 @@
|
|
|
636
635
|
},
|
|
637
636
|
"outputs": [],
|
|
638
637
|
"source": [
|
|
639
|
-
"llm = \"gemini-
|
|
638
|
+
"llm = \"gemini-2.0-flash\""
|
|
640
639
|
]
|
|
641
640
|
},
|
|
642
641
|
{
|
|
@@ -899,6 +898,7 @@
|
|
|
899
898
|
" dataset=eval_sample_dataset,\n",
|
|
900
899
|
" metrics=single_tool_usage_metrics,\n",
|
|
901
900
|
" experiment=EXPERIMENT_NAME,\n",
|
|
901
|
+
" output_uri_prefix=BUCKET_URI + \"/single-metric-eval\",\n",
|
|
902
902
|
")\n",
|
|
903
903
|
"\n",
|
|
904
904
|
"single_tool_call_eval_result = single_tool_call_eval_task.evaluate(\n",
|
|
@@ -1003,7 +1003,10 @@
|
|
|
1003
1003
|
"EXPERIMENT_RUN = f\"trajectory-{get_id()}\"\n",
|
|
1004
1004
|
"\n",
|
|
1005
1005
|
"trajectory_eval_task = EvalTask(\n",
|
|
1006
|
-
" dataset=eval_sample_dataset
|
|
1006
|
+
" dataset=eval_sample_dataset,\n",
|
|
1007
|
+
" metrics=trajectory_metrics,\n",
|
|
1008
|
+
" experiment=EXPERIMENT_NAME,\n",
|
|
1009
|
+
" output_uri_prefix=BUCKET_URI + \"/multiple-metric-eval\",\n",
|
|
1007
1010
|
")\n",
|
|
1008
1011
|
"\n",
|
|
1009
1012
|
"trajectory_eval_result = trajectory_eval_task.evaluate(\n",
|
|
@@ -1107,7 +1110,10 @@
|
|
|
1107
1110
|
"EXPERIMENT_RUN = f\"response-{get_id()}\"\n",
|
|
1108
1111
|
"\n",
|
|
1109
1112
|
"response_eval_task = EvalTask(\n",
|
|
1110
|
-
" dataset=eval_sample_dataset
|
|
1113
|
+
" dataset=eval_sample_dataset,\n",
|
|
1114
|
+
" metrics=response_metrics,\n",
|
|
1115
|
+
" experiment=EXPERIMENT_NAME,\n",
|
|
1116
|
+
" output_uri_prefix=BUCKET_URI + \"/response-metric-eval\",\n",
|
|
1111
1117
|
")\n",
|
|
1112
1118
|
"\n",
|
|
1113
1119
|
"response_eval_result = response_eval_task.evaluate(\n",
|
|
@@ -1292,6 +1298,7 @@
|
|
|
1292
1298
|
" dataset=eval_sample_dataset,\n",
|
|
1293
1299
|
" metrics=response_tool_metrics,\n",
|
|
1294
1300
|
" experiment=EXPERIMENT_NAME,\n",
|
|
1301
|
+
" output_uri_prefix=BUCKET_URI + \"/reasoning-metric-eval\",\n",
|
|
1295
1302
|
")\n",
|
|
1296
1303
|
"\n",
|
|
1297
1304
|
"response_eval_tool_result = response_eval_tool_task.evaluate(\n",
|
|
@@ -1436,15 +1443,21 @@
|
|
|
1436
1443
|
" ],\n",
|
|
1437
1444
|
" ],\n",
|
|
1438
1445
|
" \"response\": [\n",
|
|
1439
|
-
" 500,\n",
|
|
1440
|
-
" 50,\n",
|
|
1446
|
+
" \"500\",\n",
|
|
1447
|
+
" \"50\",\n",
|
|
1441
1448
|
" \"A super fast and light usb charger\",\n",
|
|
1442
|
-
" 100,\n",
|
|
1449
|
+
" \"100\",\n",
|
|
1443
1450
|
" \"A voice-controlled smart speaker that plays music, sets alarms, and controls smart home devices.\",\n",
|
|
1444
1451
|
" ],\n",
|
|
1445
1452
|
"}\n",
|
|
1446
1453
|
"\n",
|
|
1447
|
-
"byod_eval_sample_dataset = pd.DataFrame(byod_eval_data)"
|
|
1454
|
+
"byod_eval_sample_dataset = pd.DataFrame(byod_eval_data)\n",
|
|
1455
|
+
"byod_eval_sample_dataset[\"predicted_trajectory\"] = byod_eval_sample_dataset[\n",
|
|
1456
|
+
" \"predicted_trajectory\"\n",
|
|
1457
|
+
"].apply(json.dumps)\n",
|
|
1458
|
+
"byod_eval_sample_dataset[\"reference_trajectory\"] = byod_eval_sample_dataset[\n",
|
|
1459
|
+
" \"reference_trajectory\"\n",
|
|
1460
|
+
"].apply(json.dumps)"
|
|
1448
1461
|
]
|
|
1449
1462
|
},
|
|
1450
1463
|
{
|
src/base_template/Makefile
CHANGED
|
@@ -7,12 +7,12 @@ test:
|
|
|
7
7
|
|
|
8
8
|
playground:
|
|
9
9
|
{%- if "adk" in cookiecutter.tags %}
|
|
10
|
-
@echo "
|
|
11
|
-
@echo "| Starting ADK Web Server via 'adk web' command.
|
|
12
|
-
@echo "|
|
|
13
|
-
@echo "|
|
|
14
|
-
@echo "
|
|
15
|
-
uv run adk web
|
|
10
|
+
@echo "\033[1;32m===============================================================================\033[0m"
|
|
11
|
+
@echo "\033[1;32m| Starting ADK Web Server via 'adk web' command. |\033[0m"
|
|
12
|
+
@echo "\033[1;32m| |\033[0m"
|
|
13
|
+
@echo "\033[1;32m| IMPORTANT: Select the 'app' folder to interact with your agent. |\033[0m"
|
|
14
|
+
@echo "\033[1;32m===============================================================================\033[0m"
|
|
15
|
+
uv run adk web --port 8501
|
|
16
16
|
{%- else %}
|
|
17
17
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
18
18
|
uv run uvicorn app.server:app --host 0.0.0.0 --port 8000 --reload &
|
|
@@ -26,29 +26,42 @@ playground:
|
|
|
26
26
|
|
|
27
27
|
backend:
|
|
28
28
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
29
|
-
|
|
29
|
+
PROJECT_ID=$$(gcloud config get-value project) && \
|
|
30
|
+
gcloud run deploy {{cookiecutter.project_name}} \
|
|
31
|
+
--source . \
|
|
32
|
+
--memory "4Gi" \
|
|
33
|
+
--project $$PROJECT_ID \
|
|
34
|
+
--region "us-central1" \
|
|
35
|
+
--no-allow-unauthenticated \
|
|
36
|
+
--labels "created-by=adk" \
|
|
37
|
+
--set-env-vars \
|
|
38
|
+
"COMMIT_SHA=$(shell git rev-parse HEAD){%- if cookiecutter.data_ingestion %}{%- if cookiecutter.datastore_type == "vertex_ai_search" %},DATA_STORE_ID={{cookiecutter.project_name}}-datastore,DATA_STORE_REGION=us{%- elif cookiecutter.datastore_type == "vertex_ai_vector_search" %},VECTOR_SEARCH_INDEX={{cookiecutter.project_name}}-vector-search,VECTOR_SEARCH_INDEX_ENDPOINT={{cookiecutter.project_name}}-vector-search-endpoint,VECTOR_SEARCH_BUCKET=$$PROJECT_ID-{{cookiecutter.project_name}}-vs{%- endif %}{%- endif %}"
|
|
30
39
|
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
31
|
-
# Export dependencies to requirements file using uv export
|
|
40
|
+
# Export dependencies to requirements file using uv export.
|
|
32
41
|
uv export --no-hashes --no-sources --no-header --no-dev --no-emit-project --no-annotate --frozen > .requirements.txt 2>/dev/null || \
|
|
33
|
-
uv
|
|
42
|
+
uv export --no-hashes --no-sources --no-header --no-dev --no-emit-project --frozen > .requirements.txt && uv run app/agent_engine_app.py
|
|
34
43
|
{%- endif %}
|
|
44
|
+
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
35
45
|
|
|
36
|
-
|
|
37
|
-
|
|
46
|
+
local-backend:
|
|
47
|
+
uv run uvicorn app.server:app --host 0.0.0.0 --port 8000 --reload
|
|
48
|
+
{%- endif %}
|
|
49
|
+
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
38
50
|
{%- if cookiecutter.agent_name == 'live_api' %}
|
|
51
|
+
|
|
52
|
+
ui:
|
|
39
53
|
npm --prefix frontend start
|
|
40
|
-
{%- else %}
|
|
41
|
-
uv run streamlit run streamlit/streamlit_app.py --browser.serverAddress=localhost --server.enableCORS=false --server.enableXsrfProtection=false
|
|
42
54
|
{%- endif %}
|
|
43
55
|
{%- endif %}
|
|
44
56
|
|
|
45
57
|
setup-dev-env:
|
|
46
|
-
|
|
58
|
+
PROJECT_ID=$$(gcloud config get-value project) && \
|
|
47
59
|
(cd deployment/terraform/dev && terraform init && terraform apply --var-file vars/env.tfvars --var dev_project_id=$$PROJECT_ID --auto-approve)
|
|
48
|
-
|
|
60
|
+
|
|
61
|
+
{%- if cookiecutter.data_ingestion %}
|
|
62
|
+
|
|
49
63
|
data-ingestion:
|
|
50
|
-
|
|
51
|
-
$(MAKE) install
|
|
64
|
+
PROJECT_ID=$$(gcloud config get-value project) && \
|
|
52
65
|
(cd data_ingestion && uv run data_ingestion_pipeline/submit_pipeline.py \
|
|
53
66
|
--project-id=$$PROJECT_ID \
|
|
54
67
|
--region="us-central1" \
|
src/base_template/README.md
CHANGED
|
@@ -48,11 +48,16 @@ make install && make playground
|
|
|
48
48
|
| `make install` | Install all required dependencies using uv |
|
|
49
49
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
50
50
|
| `make playground` | Launch local development environment with backend and frontend{%- if "adk" in cookiecutter.tags %} - leveraging `adk web` command. {%- endif %}|
|
|
51
|
-
| `make backend` |
|
|
52
|
-
| `make
|
|
51
|
+
| `make backend` | Deploy agent to Cloud Run |
|
|
52
|
+
| `make local-backend` | Deploy agent to Cloud Run |
|
|
53
|
+
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
54
|
+
{%- if cookiecutter.agent_name == 'live_api' %}
|
|
55
|
+
| `make ui` | Launch Agent Playground front-end only |
|
|
56
|
+
{%- endif %}
|
|
57
|
+
{%- endif %}
|
|
53
58
|
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
54
59
|
| `make playground` | Launch Streamlit interface for testing agent locally and remotely |
|
|
55
|
-
| `make backend` | Deploy agent to Agent Engine
|
|
60
|
+
| `make backend` | Deploy agent to Agent Engine |
|
|
56
61
|
{%- endif %}
|
|
57
62
|
| `make test` | Run unit and integration tests |
|
|
58
63
|
| `make lint` | Run code quality checks (codespell, ruff, mypy) |
|
|
@@ -158,24 +163,12 @@ This template follows a "bring your own agent" approach - you focus on your busi
|
|
|
158
163
|
|
|
159
164
|
### Dev Environment
|
|
160
165
|
|
|
161
|
-
{%- if cookiecutter.deployment_target == 'agent_engine' %}
|
|
162
166
|
You can test deployment towards a Dev Environment using the following command:
|
|
163
167
|
|
|
164
168
|
```bash
|
|
165
169
|
gcloud config set project <your-dev-project-id>
|
|
166
170
|
make backend
|
|
167
171
|
```
|
|
168
|
-
{%- elif cookiecutter.deployment_target == 'cloud_run' %}
|
|
169
|
-
Deploy the application directly to Cloud Run from your source code using the following `gcloud` command:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
gcloud run deploy genai-app-sample \
|
|
173
|
-
--source . \
|
|
174
|
-
--project YOUR_PROJECT_ID \
|
|
175
|
-
--region YOUR_GCP_REGION \
|
|
176
|
-
--memory "4Gi" \
|
|
177
|
-
```
|
|
178
|
-
Replace `YOUR_PROJECT_ID` with your Google Cloud project ID and `YOUR_GCP_REGION` with the desired region (e.g., `us-central1`). Adjust memory and other flags as needed for your environment.
|
|
179
172
|
{% if cookiecutter.agent_name == 'live_api' %}
|
|
180
173
|
**Accessing the Deployed Backend Locally:**
|
|
181
174
|
|
|
@@ -190,7 +183,6 @@ To connect your local frontend (`make ui`) to the backend deployed on Cloud Run,
|
|
|
190
183
|
|
|
191
184
|
2. **Connect Frontend:** Your deployed backend is now accessible locally at `http://localhost:8000`. Point your Streamlit UI to this address.
|
|
192
185
|
{%- endif %}
|
|
193
|
-
{%- endif %}
|
|
194
186
|
|
|
195
187
|
The repository includes a Terraform configuration for the setup of the Dev Google Cloud project.
|
|
196
188
|
See [deployment/README.md](deployment/README.md) for instructions.
|
|
@@ -201,8 +193,8 @@ The repository includes a Terraform configuration for the setup of a production
|
|
|
201
193
|
|
|
202
194
|
{% if cookiecutter.agent_name != 'live_api' %}
|
|
203
195
|
## Monitoring and Observability
|
|
204
|
-
|
|
205
|
-
|
|
196
|
+
> You can use [this Looker Studio dashboard]({%- if "adk" in cookiecutter.tags %}https://lookerstudio.google.com/reporting/46b35167-b38b-4e44-bd37-701ef4307418/page/tEnnC{%- else %}https://lookerstudio.google.com/c/reporting/fa742264-4b4b-4c56-81e6-a667dd0f853f/page/tEnnC{%- endif %}
|
|
197
|
+
) template for visualizing events being logged in BigQuery. See the "Setup Instructions" tab to getting started.
|
|
206
198
|
|
|
207
199
|
The application uses OpenTelemetry for comprehensive observability with all events being sent to Google Cloud Trace and Logging for monitoring and to BigQuery for long term storage.
|
|
208
200
|
{%- endif %}
|
|
@@ -66,6 +66,9 @@ steps:
|
|
|
66
66
|
- "40"
|
|
67
67
|
- "--service-account"
|
|
68
68
|
- "${_CLOUD_RUN_APP_SA_EMAIL}"
|
|
69
|
+
- "--session-affinity"
|
|
70
|
+
- "--labels"
|
|
71
|
+
- "created-by=adk"
|
|
69
72
|
- "--set-env-vars"
|
|
70
73
|
- "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 %}"
|
|
71
74
|
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
@@ -80,6 +80,9 @@ steps:
|
|
|
80
80
|
- "40"
|
|
81
81
|
- "--service-account"
|
|
82
82
|
- "${_CLOUD_RUN_APP_SA_EMAIL}"
|
|
83
|
+
- "--session-affinity"
|
|
84
|
+
- "--labels"
|
|
85
|
+
- "created-by=adk"
|
|
83
86
|
- "--set-env-vars"
|
|
84
87
|
- "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 %}"
|
|
85
88
|
|
|
@@ -10046,9 +10046,9 @@
|
|
|
10046
10046
|
}
|
|
10047
10047
|
},
|
|
10048
10048
|
"node_modules/http-proxy-middleware": {
|
|
10049
|
-
"version": "2.0.
|
|
10050
|
-
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.
|
|
10051
|
-
"integrity": "sha512-
|
|
10049
|
+
"version": "2.0.9",
|
|
10050
|
+
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz",
|
|
10051
|
+
"integrity": "sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==",
|
|
10052
10052
|
"license": "MIT",
|
|
10053
10053
|
"dependencies": {
|
|
10054
10054
|
"@types/http-proxy": "^1.17.8",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"id": "google_cloud_project_id",
|
|
15
|
-
"name": "Your
|
|
15
|
+
"name": "Your Google Cloud Project ID",
|
|
16
16
|
"description": "The Google Cloud Platform Project ID where resources will be managed.",
|
|
17
17
|
"type": "string",
|
|
18
18
|
"required": true
|