agent-starter-pack 0.15.1__py3-none-any.whl → 0.15.3__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.
- {agent_starter_pack-0.15.1.dist-info → agent_starter_pack-0.15.3.dist-info}/METADATA +1 -1
- {agent_starter_pack-0.15.1.dist-info → agent_starter_pack-0.15.3.dist-info}/RECORD +24 -23
- agents/adk_base/.template/templateconfig.yaml +1 -1
- agents/adk_base/notebooks/adk_app_testing.ipynb +16 -10
- agents/agentic_rag/.template/templateconfig.yaml +1 -1
- agents/agentic_rag/notebooks/adk_app_testing.ipynb +16 -10
- agents/live_api/.template/templateconfig.yaml +1 -1
- src/base_template/pyproject.toml +2 -2
- src/cli/commands/create.py +19 -9
- src/cli/utils/gcp.py +1 -1
- src/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/agent_engine_app.py +86 -90
- src/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/utils/deployment.py +85 -0
- src/resources/locks/uv-adk_base-agent_engine.lock +385 -271
- src/resources/locks/uv-adk_base-cloud_run.lock +439 -310
- src/resources/locks/uv-agentic_rag-agent_engine.lock +418 -304
- src/resources/locks/uv-agentic_rag-cloud_run.lock +488 -359
- src/resources/locks/uv-crewai_coding_crew-agent_engine.lock +412 -404
- src/resources/locks/uv-crewai_coding_crew-cloud_run.lock +511 -488
- src/resources/locks/uv-langgraph_base_react-agent_engine.lock +343 -334
- src/resources/locks/uv-langgraph_base_react-cloud_run.lock +445 -421
- src/resources/locks/uv-live_api-cloud_run.lock +398 -373
- {agent_starter_pack-0.15.1.dist-info → agent_starter_pack-0.15.3.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.15.1.dist-info → agent_starter_pack-0.15.3.dist-info}/entry_points.txt +0 -0
- {agent_starter_pack-0.15.1.dist-info → agent_starter_pack-0.15.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
agents/README.md,sha256=L8__lIXXjxLTZbkCmTC4taTFUMRVrO3QI2mCKZTdhJM,462
|
|
2
2
|
agents/adk_base/README.md,sha256=_rnoIkHupZ4afDZEAtrDZzeYSS4WqtJWnvtX2H-RrCM,894
|
|
3
|
-
agents/adk_base/.template/templateconfig.yaml,sha256=
|
|
3
|
+
agents/adk_base/.template/templateconfig.yaml,sha256=OwPdd3NoOpT4WpnlOHM5tk_PFdptDdqnS3v7UdwjeOQ,924
|
|
4
4
|
agents/adk_base/app/__init__.py,sha256=wT1TtenBOdA4LTtf6mQjvAT5aRR1N2PCx_A-MrDLGsg,631
|
|
5
5
|
agents/adk_base/app/agent.py,sha256=6Q6QegQDxEaAck989DPIb3ArHMZtw_YJBqhHFqg-UjQ,2182
|
|
6
|
-
agents/adk_base/notebooks/adk_app_testing.ipynb,sha256=
|
|
6
|
+
agents/adk_base/notebooks/adk_app_testing.ipynb,sha256=hyPBwXOmZBWu1Dte6lUU0LDW_vV2VA57yQZ3AjBMzDU,10729
|
|
7
7
|
agents/adk_base/notebooks/evaluating_adk_agent.ipynb,sha256=SdZC1htgXtXw3oyi8d70dNVpDgUmV9T5hqiwGxM9plk,57034
|
|
8
8
|
agents/adk_base/tests/integration/test_agent.py,sha256=_zb3GMWMtMRq2rOyYC-uL1eNhpg2XBkm8Noj0O_UOng,1998
|
|
9
9
|
agents/agentic_rag/README.md,sha256=cPeY_XGt79ava22PIM0x92oi67R-TnlEKBQGpK1MOkA,2262
|
|
10
|
-
agents/agentic_rag/.template/templateconfig.yaml,sha256=
|
|
10
|
+
agents/agentic_rag/.template/templateconfig.yaml,sha256=o8D1Yx7zWsIgI1zVOS3K1pDgc_Lczevw6cveaj2T7HQ,1249
|
|
11
11
|
agents/agentic_rag/app/__init__.py,sha256=wT1TtenBOdA4LTtf6mQjvAT5aRR1N2PCx_A-MrDLGsg,631
|
|
12
12
|
agents/agentic_rag/app/agent.py,sha256=joSAfrVcS9eRtOT3MXPSoiwElpwVq-hjpCHkqTj6vuM,4041
|
|
13
13
|
agents/agentic_rag/app/retrievers.py,sha256=qfxwSEixMddvAu4FvUTZAFh1Gdp3RPY65s0Wp6gEFVk,4561
|
|
14
14
|
agents/agentic_rag/app/templates.py,sha256=8N_uRchwiN7hlH9Y8rdJ1CAtOhpHUWZkXZZ7IU-YJJk,867
|
|
15
|
-
agents/agentic_rag/notebooks/adk_app_testing.ipynb,sha256=
|
|
15
|
+
agents/agentic_rag/notebooks/adk_app_testing.ipynb,sha256=hyPBwXOmZBWu1Dte6lUU0LDW_vV2VA57yQZ3AjBMzDU,10729
|
|
16
16
|
agents/agentic_rag/notebooks/evaluating_adk_agent.ipynb,sha256=SdZC1htgXtXw3oyi8d70dNVpDgUmV9T5hqiwGxM9plk,57034
|
|
17
17
|
agents/agentic_rag/tests/integration/test_agent.py,sha256=YcwOZXa9uJqcqZN8UPikNm_dlSh9XduEfcuQa0wkby8,2170
|
|
18
18
|
agents/crewai_coding_crew/README.md,sha256=4No7sfHQVHELARGiT3fWANJzDR0NP48ow4ct3FoPwlA,1672
|
|
@@ -30,7 +30,7 @@ agents/langgraph_base_react/app/agent.py,sha256=yzCc5JaOJgItoBiZOzHPiSy9aD2HGeGI
|
|
|
30
30
|
agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb,sha256=PlW41fL-ji9NKkimW6u25YRLGWN2pgoX2G8w5nzIEPE,58737
|
|
31
31
|
agents/langgraph_base_react/tests/integration/test_agent.py,sha256=xy0A_3eGhxM8A5rc81revMztJN5GtFA-o5-CG5JzeQw,1630
|
|
32
32
|
agents/live_api/README.md,sha256=c3lu5WguOUBc5hO_UtNZfVhfYxvSzMXuGFICn9M38mU,2897
|
|
33
|
-
agents/live_api/.template/templateconfig.yaml,sha256=
|
|
33
|
+
agents/live_api/.template/templateconfig.yaml,sha256=Y_UQcxq5ql2YPrC5kd-SK7kfGb6Q6IqScaNDRv-vG5I,964
|
|
34
34
|
agents/live_api/app/agent.py,sha256=dYE2qd64OhL-fOgwzrjqN50LYXAgJ1TWbx6ohqtV5Rc,2434
|
|
35
35
|
agents/live_api/tests/integration/test_server_e2e.py,sha256=SBowHiVj-_Okbk1dqyITFVIG6yvr5BGNrfxHVpO4TFs,8635
|
|
36
36
|
agents/live_api/tests/load_test/load_test.py,sha256=HHZyfC4gqiQtZVF_CbbxENGgWQccMLpwMv0IdoQ6cbQ,1275
|
|
@@ -40,7 +40,7 @@ src/base_template/.gitignore,sha256=Fq0w34x4sfbwP4RqDqh6hdHNYRUEsFNI-9XONzLWBIs,
|
|
|
40
40
|
src/base_template/GEMINI.md,sha256=WzscHWlQeYkKORZ-453P8KM9IHuj1kAxW-69c7Ytuwk,133
|
|
41
41
|
src/base_template/Makefile,sha256=1UKB6rlIbGStc-hUfnwKanOtxhz-vzaKxrCxTlPilqs,8087
|
|
42
42
|
src/base_template/README.md,sha256=_TjEIWOK75GfaG3qfaOQdfC9J5AlPo_dckRY7e84dlM,10184
|
|
43
|
-
src/base_template/pyproject.toml,sha256=
|
|
43
|
+
src/base_template/pyproject.toml,sha256=Ch69IVTRzNn9zueU5TunZjb-dTmvCM_G_NwXDFUiIp8,2940
|
|
44
44
|
src/base_template/deployment/README.md,sha256=gZJvSWdQh_Mi-bZ3dmuPv7fMezIw04fgN5tq7KgglPw,692
|
|
45
45
|
src/base_template/deployment/terraform/apis.tf,sha256=KX8Oe2gjT-gh9Bkntz9yIAyRjPc1gZvwOhroJ6NZVp4,1513
|
|
46
46
|
src/base_template/deployment/terraform/github.tf,sha256=KhfNBAzeUH9jDr8FOw_DiypesA5AEC8IZT1PRqntSt8,10838
|
|
@@ -72,14 +72,14 @@ src/base_template/{{cookiecutter.agent_directory}}/utils/gcs.py,sha256=jKblaWOGQ
|
|
|
72
72
|
src/base_template/{{cookiecutter.agent_directory}}/utils/tracing.py,sha256=2rv1Ukh2jTBENDwoghCItJ28l-Sjz9gMlzdojlVgJa4,6052
|
|
73
73
|
src/base_template/{{cookiecutter.agent_directory}}/utils/typing.py,sha256=DP5OZC3IGvqA1XbvWt8kI3gyAK3ZjzUSL5Ca17wNeLI,4249
|
|
74
74
|
src/cli/main.py,sha256=Dya7Sw3ozMTaGDcwMh_-W7udkGZHGzgAj8aBdSZaZxI,1832
|
|
75
|
-
src/cli/commands/create.py,sha256=
|
|
75
|
+
src/cli/commands/create.py,sha256=ceUJyzdUN-h-0-7jw6gSSgQWFNXmcsDS47C7Lt8yEew,47385
|
|
76
76
|
src/cli/commands/enhance.py,sha256=AF58CFikNLPib8PULKkzM6r9JGXkTvRWspBaEvGnR3k,24237
|
|
77
77
|
src/cli/commands/list.py,sha256=ZGol9eYB9Yon7JysMUCtpEOwdXzrApdTHzErx6KvT04,6856
|
|
78
78
|
src/cli/commands/setup_cicd.py,sha256=3BtHChOPvp0I-4tlPqwz5hZFm13gtw9gvlWQwF-F7oE,32492
|
|
79
79
|
src/cli/utils/__init__.py,sha256=_cTmsXGPqOtK0q8UW5164QTltbJRJFR_Efxq_BRL1-o,1311
|
|
80
80
|
src/cli/utils/cicd.py,sha256=l9hPdqFXo5SxdtOG1yEoQdmRff5vNcqf0sqxBTtPQig,30704
|
|
81
81
|
src/cli/utils/datastores.py,sha256=gv1V6eDcOEKx4MRNG5C3Y-VfixYq1AzQuaYMLp8QRNo,1058
|
|
82
|
-
src/cli/utils/gcp.py,sha256=
|
|
82
|
+
src/cli/utils/gcp.py,sha256=wGgTOc1EWuq7FIHyXa80OUgE1ypGm7zwMF-dvI0jDOE,9261
|
|
83
83
|
src/cli/utils/logging.py,sha256=61ulUY1hUrpxHDFi0szqsjPlrpxdBvwzfYEEV0o97GA,3530
|
|
84
84
|
src/cli/utils/remote_template.py,sha256=ITN1a5GQmVIb1dHpExPLTz1k5c9j7M6fF-HXUDCl6i8,23967
|
|
85
85
|
src/cli/utils/template.py,sha256=YIJu0xZJTyP0XmyNN08Fj7Wc7Wl9ROT45rcZvsvgLb0,52108
|
|
@@ -97,7 +97,8 @@ src/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py,s
|
|
|
97
97
|
src/deployment_targets/agent_engine/tests/load_test/README.md,sha256=aQP7nDAqd2jKBET4noI39HC9PVHpgpned7cxucWpVJo,1302
|
|
98
98
|
src/deployment_targets/agent_engine/tests/load_test/load_test.py,sha256=VbQjm8uR8JsdJe3upO1eUIz5SZR7IQsHYyJy88cAjy0,4516
|
|
99
99
|
src/deployment_targets/agent_engine/tests/load_test/.results/.placeholder,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
|
-
src/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/agent_engine_app.py,sha256=
|
|
100
|
+
src/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/agent_engine_app.py,sha256=a5QPypiAn_yJxTAEJLQwpbqJRzhP3vk21IoeIZvC0VI,12437
|
|
101
|
+
src/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/utils/deployment.py,sha256=AY7awaGuFjri4Ha6M2IrPwpl1b1V7RTlJ_4uZ_zpfTo,2833
|
|
101
102
|
src/deployment_targets/cloud_run/Dockerfile,sha256=rSpmFK7uJhZYwYMtxH8W7mywcCPvaoFn7gL_mXRYuF8,1449
|
|
102
103
|
src/deployment_targets/cloud_run/deployment/terraform/service.tf,sha256=09F6jkkMtoQlbQNdzJl8OZs-ZlfmzZmgCaUFvniJnlQ,11146
|
|
103
104
|
src/deployment_targets/cloud_run/deployment/terraform/dev/service.tf,sha256=l6fG-kMyYOOrRwnsUys_Vq46-76bMiRyXzHYkVD2XFM,6993
|
|
@@ -156,20 +157,20 @@ src/resources/docs/adk-cheatsheet.md,sha256=9VZpM5bG3pJq4PbNfym7LOLzgeLZfqkAGA0Y
|
|
|
156
157
|
src/resources/idx/idx-template.json,sha256=07OQZCPp45Iqor2O7Tm1e1Gmsdd-AmmUofSvA7y-oRs,793
|
|
157
158
|
src/resources/idx/idx-template.nix,sha256=sesHGev_PYtVDg0J5tHkg0OO7IR1Bz2iAtl_if3Ar3M,892
|
|
158
159
|
src/resources/idx/.idx/dev.nix,sha256=XQ4T1xt5I-8SVwnI37v56RFFlxa58Ko-a9G2-oelYAI,1602
|
|
159
|
-
src/resources/locks/uv-adk_base-agent_engine.lock,sha256=
|
|
160
|
-
src/resources/locks/uv-adk_base-cloud_run.lock,sha256=
|
|
161
|
-
src/resources/locks/uv-agentic_rag-agent_engine.lock,sha256=
|
|
162
|
-
src/resources/locks/uv-agentic_rag-cloud_run.lock,sha256=
|
|
163
|
-
src/resources/locks/uv-crewai_coding_crew-agent_engine.lock,sha256=
|
|
164
|
-
src/resources/locks/uv-crewai_coding_crew-cloud_run.lock,sha256=
|
|
165
|
-
src/resources/locks/uv-langgraph_base_react-agent_engine.lock,sha256=
|
|
166
|
-
src/resources/locks/uv-langgraph_base_react-cloud_run.lock,sha256=
|
|
167
|
-
src/resources/locks/uv-live_api-cloud_run.lock,sha256=
|
|
160
|
+
src/resources/locks/uv-adk_base-agent_engine.lock,sha256=3vxRrbyJ0ySW_VqjCL3RLFKAuZpYw4CYcL2CjgJWEVI,567595
|
|
161
|
+
src/resources/locks/uv-adk_base-cloud_run.lock,sha256=2A1nvhxumnphEbs3jhbPPc3yqU7XJn7g01pEygsZQVQ,752779
|
|
162
|
+
src/resources/locks/uv-agentic_rag-agent_engine.lock,sha256=j6GtLqMEjBPrMHLbYBP7Tx8u92Ubq8wm-QfvbvpVnOg,636673
|
|
163
|
+
src/resources/locks/uv-agentic_rag-cloud_run.lock,sha256=NulH9sYfEV3hftBTkPFh0uSr-3Zwl4ojE0SeXiT6_KI,846052
|
|
164
|
+
src/resources/locks/uv-crewai_coding_crew-agent_engine.lock,sha256=fcwOoEXj0AGZxYvI_KFbO9t3Opq6KnaLIn3eCRASKB0,934190
|
|
165
|
+
src/resources/locks/uv-crewai_coding_crew-cloud_run.lock,sha256=iQiheltFkHQtF9tq992RiQyQKUx1hlaYs_qKMckuous,1233908
|
|
166
|
+
src/resources/locks/uv-langgraph_base_react-agent_engine.lock,sha256=qcsSMY-_lHe3Fy2iY9RwJd2lGXBVhx_lJItDZjh2xy0,800009
|
|
167
|
+
src/resources/locks/uv-langgraph_base_react-cloud_run.lock,sha256=WNSVBOeNpPi96j-1D6ONx7fLZaZOpHMsqwkVDTO_lOE,1063023
|
|
168
|
+
src/resources/locks/uv-live_api-cloud_run.lock,sha256=jrcrlnpJfJ6MIyEz1Z7qS_nxy0F035M-6C0D80VWCIo,969381
|
|
168
169
|
src/utils/generate_locks.py,sha256=6V1B8V2BEuevWnXUsxZVTrLjXwFRII8UfsIGrQqZxVs,4320
|
|
169
170
|
src/utils/lock_utils.py,sha256=IFOMUWtb-ypm2Y8w8J5y2oI_-MaPuwPF_JOAAlnNudA,2275
|
|
170
171
|
src/utils/watch_and_rebuild.py,sha256=vP4yIiA7E_lj5sfQdJUl8TXas6V7msDg8XWUutAC05Q,6679
|
|
171
|
-
agent_starter_pack-0.15.
|
|
172
|
-
agent_starter_pack-0.15.
|
|
173
|
-
agent_starter_pack-0.15.
|
|
174
|
-
agent_starter_pack-0.15.
|
|
175
|
-
agent_starter_pack-0.15.
|
|
172
|
+
agent_starter_pack-0.15.3.dist-info/METADATA,sha256=q2e5-mEcZTW81pjmENcnXyTmECp7TxBwMHsqCOrJ8nc,11482
|
|
173
|
+
agent_starter_pack-0.15.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
174
|
+
agent_starter_pack-0.15.3.dist-info/entry_points.txt,sha256=U7uCxR7YulIhZ0L8R8Hui0Bsy6J7oyESBeDYJYMrQjA,56
|
|
175
|
+
agent_starter_pack-0.15.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
176
|
+
agent_starter_pack-0.15.3.dist-info/RECORD,,
|
|
@@ -4,15 +4,12 @@
|
|
|
4
4
|
"cell_type": "markdown",
|
|
5
5
|
"metadata": {},
|
|
6
6
|
"source": [
|
|
7
|
-
"# ADK Application Testing\n",
|
|
7
|
+
"# 🧪 ADK Application Testing\n",
|
|
8
8
|
"\n",
|
|
9
9
|
"This notebook demonstrates how to test an ADK (Agent Development Kit) application.\n",
|
|
10
10
|
"It covers both local and remote testing, both with Agent Engine and Cloud Run.\n",
|
|
11
11
|
"\n",
|
|
12
|
-
"> **Note**: This notebook assumes that the agent files are stored in the `app` folder. If your agent files are located in a different directory, please update all relevant file paths and references accordingly
|
|
13
|
-
"\n",
|
|
14
|
-
"<img src=\"https://github.com/GoogleCloudPlatform/agent-starter-pack/blob/main/docs/images/adk_logo.png?raw=true\" width=\"400\">\n",
|
|
15
|
-
"\n"
|
|
12
|
+
"> **Note**: This notebook assumes that the agent files are stored in the `app` folder. If your agent files are located in a different directory, please update all relevant file paths and references accordingly."
|
|
16
13
|
]
|
|
17
14
|
},
|
|
18
15
|
{
|
|
@@ -92,12 +89,21 @@
|
|
|
92
89
|
"metadata": {},
|
|
93
90
|
"outputs": [],
|
|
94
91
|
"source": [
|
|
95
|
-
"#
|
|
96
|
-
"
|
|
92
|
+
"# Set to None to auto-detect from ./deployment_metadata.json, or specify manually\n",
|
|
93
|
+
"# \"projects/PROJECT_ID/locations/us-central1/reasoningEngines/ENGINE_ID\"\n",
|
|
94
|
+
"REASONING_ENGINE_ID = None\n",
|
|
95
|
+
"\n",
|
|
96
|
+
"if REASONING_ENGINE_ID is None:\n",
|
|
97
|
+
" try:\n",
|
|
98
|
+
" with open(\"../deployment_metadata.json\") as f:\n",
|
|
99
|
+
" metadata = json.load(f)\n",
|
|
100
|
+
" REASONING_ENGINE_ID = metadata.get(\"remote_agent_engine_id\")\n",
|
|
101
|
+
" except (FileNotFoundError, json.JSONDecodeError):\n",
|
|
102
|
+
" pass\n",
|
|
97
103
|
"\n",
|
|
104
|
+
"print(f\"Using REASONING_ENGINE_ID: {REASONING_ENGINE_ID}\")\n",
|
|
98
105
|
"# Get the existing agent engine\n",
|
|
99
|
-
"remote_agent_engine = client.agent_engines.get(name=
|
|
100
|
-
"print(f\"Retrieved agent engine: {remote_agent_engine.api_resource.name}\")"
|
|
106
|
+
"remote_agent_engine = client.agent_engines.get(name=REASONING_ENGINE_ID)"
|
|
101
107
|
]
|
|
102
108
|
},
|
|
103
109
|
{
|
|
@@ -354,7 +360,7 @@
|
|
|
354
360
|
],
|
|
355
361
|
"metadata": {
|
|
356
362
|
"kernelspec": {
|
|
357
|
-
"display_name": "myagent-
|
|
363
|
+
"display_name": "myagent-1758791726",
|
|
358
364
|
"language": "python",
|
|
359
365
|
"name": "python3"
|
|
360
366
|
},
|
|
@@ -4,15 +4,12 @@
|
|
|
4
4
|
"cell_type": "markdown",
|
|
5
5
|
"metadata": {},
|
|
6
6
|
"source": [
|
|
7
|
-
"# ADK Application Testing\n",
|
|
7
|
+
"# 🧪 ADK Application Testing\n",
|
|
8
8
|
"\n",
|
|
9
9
|
"This notebook demonstrates how to test an ADK (Agent Development Kit) application.\n",
|
|
10
10
|
"It covers both local and remote testing, both with Agent Engine and Cloud Run.\n",
|
|
11
11
|
"\n",
|
|
12
|
-
"> **Note**: This notebook assumes that the agent files are stored in the `app` folder. If your agent files are located in a different directory, please update all relevant file paths and references accordingly
|
|
13
|
-
"\n",
|
|
14
|
-
"<img src=\"https://github.com/GoogleCloudPlatform/agent-starter-pack/blob/main/docs/images/adk_logo.png?raw=true\" width=\"400\">\n",
|
|
15
|
-
"\n"
|
|
12
|
+
"> **Note**: This notebook assumes that the agent files are stored in the `app` folder. If your agent files are located in a different directory, please update all relevant file paths and references accordingly."
|
|
16
13
|
]
|
|
17
14
|
},
|
|
18
15
|
{
|
|
@@ -92,12 +89,21 @@
|
|
|
92
89
|
"metadata": {},
|
|
93
90
|
"outputs": [],
|
|
94
91
|
"source": [
|
|
95
|
-
"#
|
|
96
|
-
"
|
|
92
|
+
"# Set to None to auto-detect from ./deployment_metadata.json, or specify manually\n",
|
|
93
|
+
"# \"projects/PROJECT_ID/locations/us-central1/reasoningEngines/ENGINE_ID\"\n",
|
|
94
|
+
"REASONING_ENGINE_ID = None\n",
|
|
95
|
+
"\n",
|
|
96
|
+
"if REASONING_ENGINE_ID is None:\n",
|
|
97
|
+
" try:\n",
|
|
98
|
+
" with open(\"../deployment_metadata.json\") as f:\n",
|
|
99
|
+
" metadata = json.load(f)\n",
|
|
100
|
+
" REASONING_ENGINE_ID = metadata.get(\"remote_agent_engine_id\")\n",
|
|
101
|
+
" except (FileNotFoundError, json.JSONDecodeError):\n",
|
|
102
|
+
" pass\n",
|
|
97
103
|
"\n",
|
|
104
|
+
"print(f\"Using REASONING_ENGINE_ID: {REASONING_ENGINE_ID}\")\n",
|
|
98
105
|
"# Get the existing agent engine\n",
|
|
99
|
-
"remote_agent_engine = client.agent_engines.get(name=
|
|
100
|
-
"print(f\"Retrieved agent engine: {remote_agent_engine.api_resource.name}\")"
|
|
106
|
+
"remote_agent_engine = client.agent_engines.get(name=REASONING_ENGINE_ID)"
|
|
101
107
|
]
|
|
102
108
|
},
|
|
103
109
|
{
|
|
@@ -354,7 +360,7 @@
|
|
|
354
360
|
],
|
|
355
361
|
"metadata": {
|
|
356
362
|
"kernelspec": {
|
|
357
|
-
"display_name": "myagent-
|
|
363
|
+
"display_name": "myagent-1758791726",
|
|
358
364
|
"language": "python",
|
|
359
365
|
"name": "python3"
|
|
360
366
|
},
|
src/base_template/pyproject.toml
CHANGED
|
@@ -16,12 +16,12 @@ dependencies = [
|
|
|
16
16
|
{%- endif %}
|
|
17
17
|
"google-cloud-logging>=3.12.0",
|
|
18
18
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
19
|
-
"google-cloud-aiplatform[evaluation]~=1.
|
|
19
|
+
"google-cloud-aiplatform[evaluation]~=1.116.0",
|
|
20
20
|
"fastapi~=0.115.8",
|
|
21
21
|
"uvicorn~=0.34.0",
|
|
22
22
|
"psycopg2-binary>=2.9.10",
|
|
23
23
|
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
24
|
-
"google-cloud-aiplatform[evaluation,agent-engines]~=1.
|
|
24
|
+
"google-cloud-aiplatform[evaluation,agent-engines]~=1.116.0"
|
|
25
25
|
{%- endif %}
|
|
26
26
|
]
|
|
27
27
|
{% if cookiecutter.deployment_target == 'cloud_run' %}
|
src/cli/commands/create.py
CHANGED
|
@@ -630,12 +630,13 @@ def create(
|
|
|
630
630
|
# CI/CD runner selection
|
|
631
631
|
final_cicd_runner = cicd_runner
|
|
632
632
|
if not final_cicd_runner:
|
|
633
|
-
if auto_approve:
|
|
633
|
+
if auto_approve or agent_garden:
|
|
634
634
|
final_cicd_runner = "google_cloud_build"
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
635
|
+
if not agent_garden:
|
|
636
|
+
console.print(
|
|
637
|
+
"Info: --cicd-runner not specified. Defaulting to 'google_cloud_build' in auto-approve mode.",
|
|
638
|
+
style="yellow",
|
|
639
|
+
)
|
|
639
640
|
else:
|
|
640
641
|
final_cicd_runner = prompt_cicd_runner_selection()
|
|
641
642
|
if debug:
|
|
@@ -646,7 +647,13 @@ def create(
|
|
|
646
647
|
not auto_approve
|
|
647
648
|
and ctx.get_parameter_source("region") != ParameterSource.COMMANDLINE
|
|
648
649
|
):
|
|
649
|
-
|
|
650
|
+
# Show Agent Engine supported regions link if agent_garden flag is set
|
|
651
|
+
if agent_garden:
|
|
652
|
+
console.print(
|
|
653
|
+
"\n📍 [blue]Agent Engine Supported Regions:[/blue]\n"
|
|
654
|
+
" [cyan]https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/overview#supported-regions[/cyan]"
|
|
655
|
+
)
|
|
656
|
+
region = prompt_region_confirmation(region, agent_garden=agent_garden)
|
|
650
657
|
if debug:
|
|
651
658
|
logging.debug(f"Selected region: {region}")
|
|
652
659
|
|
|
@@ -777,7 +784,9 @@ def create(
|
|
|
777
784
|
raise
|
|
778
785
|
|
|
779
786
|
|
|
780
|
-
def prompt_region_confirmation(
|
|
787
|
+
def prompt_region_confirmation(
|
|
788
|
+
default_region: str = "us-central1", agent_garden: bool = False
|
|
789
|
+
) -> str:
|
|
781
790
|
"""Prompt user to confirm or change the default region."""
|
|
782
791
|
new_region = Prompt.ask(
|
|
783
792
|
"\nEnter desired GCP region (Gemini uses global endpoint by default)",
|
|
@@ -965,7 +974,8 @@ def setup_gcp_environment(
|
|
|
965
974
|
logging.debug("Verifying GCP credentials...")
|
|
966
975
|
creds_info = verify_credentials()
|
|
967
976
|
# Handle credential verification and project selection
|
|
968
|
-
if
|
|
977
|
+
# Skip interactive prompts if auto_approve or agent_garden is set
|
|
978
|
+
if not auto_approve and not agent_garden:
|
|
969
979
|
creds_info = _handle_credential_verification(creds_info)
|
|
970
980
|
# If user chose to skip verification, don't test Vertex AI connection
|
|
971
981
|
if creds_info.get("skip_vertex_test", False):
|
|
@@ -976,7 +986,7 @@ def setup_gcp_environment(
|
|
|
976
986
|
creds_info["project"], region, agent_garden=agent_garden
|
|
977
987
|
)
|
|
978
988
|
else:
|
|
979
|
-
# Even with auto_approve, we should still set the GCP project
|
|
989
|
+
# Even with auto_approve or agent_garden, we should still set the GCP project
|
|
980
990
|
set_gcp_project(creds_info["project"], set_quota_project=True)
|
|
981
991
|
# Test Vertex AI connection
|
|
982
992
|
_test_vertex_ai_connection(
|
src/cli/utils/gcp.py
CHANGED
|
@@ -147,7 +147,7 @@ def get_dummy_request(project_id: str) -> CountTokensRequest:
|
|
|
147
147
|
"""Creates a simple test request for Gemini."""
|
|
148
148
|
return CountTokensRequest(
|
|
149
149
|
contents=[{"role": "user", "parts": [{"text": "Hi"}]}],
|
|
150
|
-
endpoint=f"projects/{project_id}/locations/global/publishers/google/models/gemini-2.
|
|
150
|
+
endpoint=f"projects/{project_id}/locations/global/publishers/google/models/gemini-2.5-flash",
|
|
151
151
|
)
|
|
152
152
|
|
|
153
153
|
|
|
@@ -14,12 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
# mypy: disable-error-code="attr-defined,arg-type"
|
|
16
16
|
{%- if "adk" in cookiecutter.tags %}
|
|
17
|
-
import datetime
|
|
18
|
-
import json
|
|
19
17
|
import logging
|
|
20
18
|
import os
|
|
21
19
|
from typing import Any
|
|
22
20
|
|
|
21
|
+
import click
|
|
23
22
|
import google.auth
|
|
24
23
|
import vertexai
|
|
25
24
|
from google.adk.artifacts import GcsArtifactService
|
|
@@ -30,6 +29,11 @@ from vertexai._genai.types import AgentEngine, AgentEngineConfig
|
|
|
30
29
|
from vertexai.agent_engines.templates.adk import AdkApp
|
|
31
30
|
|
|
32
31
|
from {{cookiecutter.agent_directory}}.agent import root_agent
|
|
32
|
+
from {{cookiecutter.agent_directory}}.utils.deployment import (
|
|
33
|
+
parse_env_vars,
|
|
34
|
+
print_deployment_success,
|
|
35
|
+
write_deployment_metadata,
|
|
36
|
+
)
|
|
33
37
|
from {{cookiecutter.agent_directory}}.utils.gcs import create_bucket_if_not_exists
|
|
34
38
|
from {{cookiecutter.agent_directory}}.utils.tracing import CloudTraceLoggingSpanExporter
|
|
35
39
|
from {{cookiecutter.agent_directory}}.utils.typing import Feedback
|
|
@@ -68,8 +72,6 @@ class AgentEngineApp(AdkApp):
|
|
|
68
72
|
return operations
|
|
69
73
|
|
|
70
74
|
{%- else %}
|
|
71
|
-
import datetime
|
|
72
|
-
import json
|
|
73
75
|
import logging
|
|
74
76
|
import os
|
|
75
77
|
from collections.abc import Iterable, Mapping
|
|
@@ -77,6 +79,7 @@ from typing import (
|
|
|
77
79
|
Any,
|
|
78
80
|
)
|
|
79
81
|
|
|
82
|
+
import click
|
|
80
83
|
import google.auth
|
|
81
84
|
import vertexai
|
|
82
85
|
from google.cloud import logging as google_cloud_logging
|
|
@@ -84,6 +87,11 @@ from langchain_core.runnables import RunnableConfig
|
|
|
84
87
|
from traceloop.sdk import Instruments, Traceloop
|
|
85
88
|
from vertexai._genai.types import AgentEngine, AgentEngineConfig
|
|
86
89
|
|
|
90
|
+
from {{cookiecutter.agent_directory}}.utils.deployment import (
|
|
91
|
+
parse_env_vars,
|
|
92
|
+
print_deployment_success,
|
|
93
|
+
write_deployment_metadata,
|
|
94
|
+
)
|
|
87
95
|
from {{cookiecutter.agent_directory}}.utils.gcs import create_bucket_if_not_exists
|
|
88
96
|
from {{cookiecutter.agent_directory}}.utils.tracing import CloudTraceLoggingSpanExporter
|
|
89
97
|
from {{cookiecutter.agent_directory}}.utils.typing import Feedback, InputChat, dumpd, ensure_valid_config
|
|
@@ -190,17 +198,69 @@ class AgentEngineApp:
|
|
|
190
198
|
{%- endif %}
|
|
191
199
|
|
|
192
200
|
|
|
201
|
+
@click.command()
|
|
202
|
+
@click.option(
|
|
203
|
+
"--project",
|
|
204
|
+
default=None,
|
|
205
|
+
help="GCP project ID (defaults to application default credentials)",
|
|
206
|
+
)
|
|
207
|
+
@click.option(
|
|
208
|
+
"--location",
|
|
209
|
+
default="us-central1",
|
|
210
|
+
help="GCP region (defaults to us-central1)",
|
|
211
|
+
)
|
|
212
|
+
@click.option(
|
|
213
|
+
"--agent-name",
|
|
214
|
+
default="{{cookiecutter.project_name}}",
|
|
215
|
+
help="Name for the agent engine",
|
|
216
|
+
)
|
|
217
|
+
@click.option(
|
|
218
|
+
"--requirements-file",
|
|
219
|
+
default=".requirements.txt",
|
|
220
|
+
help="Path to requirements.txt file",
|
|
221
|
+
)
|
|
222
|
+
@click.option(
|
|
223
|
+
"--extra-packages",
|
|
224
|
+
multiple=True,
|
|
225
|
+
default=["./{{cookiecutter.agent_directory}}"],
|
|
226
|
+
help="Additional packages to include",
|
|
227
|
+
)
|
|
228
|
+
@click.option(
|
|
229
|
+
"--set-env-vars",
|
|
230
|
+
default=None,
|
|
231
|
+
help="Comma-separated list of environment variables in KEY=VALUE format",
|
|
232
|
+
)
|
|
233
|
+
@click.option(
|
|
234
|
+
"--service-account",
|
|
235
|
+
default=None,
|
|
236
|
+
help="Service account email to use for the agent engine",
|
|
237
|
+
)
|
|
193
238
|
def deploy_agent_engine_app(
|
|
194
|
-
project: str,
|
|
239
|
+
project: str | None,
|
|
195
240
|
location: str,
|
|
196
|
-
agent_name: str
|
|
197
|
-
requirements_file: str
|
|
198
|
-
extra_packages:
|
|
199
|
-
|
|
200
|
-
service_account: str | None
|
|
241
|
+
agent_name: str,
|
|
242
|
+
requirements_file: str,
|
|
243
|
+
extra_packages: tuple[str, ...],
|
|
244
|
+
set_env_vars: str | None,
|
|
245
|
+
service_account: str | None,
|
|
201
246
|
) -> AgentEngine:
|
|
202
247
|
"""Deploy the agent engine app to Vertex AI."""
|
|
248
|
+
# Parse environment variables if provided
|
|
249
|
+
env_vars = parse_env_vars(set_env_vars)
|
|
250
|
+
|
|
251
|
+
if not project:
|
|
252
|
+
_, project = google.auth.default()
|
|
253
|
+
|
|
254
|
+
print("""
|
|
255
|
+
╔═══════════════════════════════════════════════════════════╗
|
|
256
|
+
║ ║
|
|
257
|
+
║ 🤖 DEPLOYING AGENT TO VERTEX AI AGENT ENGINE 🤖 ║
|
|
258
|
+
║ ║
|
|
259
|
+
╚═══════════════════════════════════════════════════════════╝
|
|
260
|
+
""")
|
|
261
|
+
|
|
203
262
|
logging.basicConfig(level=logging.INFO)
|
|
263
|
+
extra_packages_list = list(extra_packages)
|
|
204
264
|
staging_bucket_uri = f"gs://{project}-agent-engine"
|
|
205
265
|
{%- if "adk" in cookiecutter.tags %}
|
|
206
266
|
artifacts_bucket_name = f"{project}-{{cookiecutter.project_name}}-logs-data"
|
|
@@ -236,14 +296,24 @@ def deploy_agent_engine_app(
|
|
|
236
296
|
env_vars["NUM_WORKERS"] = "1"
|
|
237
297
|
|
|
238
298
|
# Common configuration for both create and update operations
|
|
299
|
+
labels: dict[str, str] = {}
|
|
300
|
+
{%- if cookiecutter.agent_garden %}
|
|
301
|
+
labels["deployed-with"] = "agent-garden"
|
|
302
|
+
{%- if cookiecutter.agent_sample_id and cookiecutter.agent_sample_publisher %}
|
|
303
|
+
labels["vertex-agent-sample-id"] = "{{cookiecutter.agent_sample_id}}"
|
|
304
|
+
labels["vertex-agent-sample-publisher"] = "{{cookiecutter.agent_sample_publisher}}"
|
|
305
|
+
{%- endif %}
|
|
306
|
+
{%- endif %}
|
|
307
|
+
|
|
239
308
|
config = AgentEngineConfig(
|
|
240
309
|
display_name=agent_name,
|
|
241
310
|
description="{{cookiecutter.agent_description}}",
|
|
242
|
-
extra_packages=
|
|
311
|
+
extra_packages=extra_packages_list,
|
|
243
312
|
env_vars=env_vars,
|
|
244
313
|
service_account=service_account,
|
|
245
314
|
requirements=requirements,
|
|
246
315
|
staging_bucket=staging_bucket_uri,
|
|
316
|
+
labels=labels,
|
|
247
317
|
)
|
|
248
318
|
|
|
249
319
|
agent_config = {
|
|
@@ -262,94 +332,20 @@ def deploy_agent_engine_app(
|
|
|
262
332
|
|
|
263
333
|
if matching_agents:
|
|
264
334
|
# Update the existing agent with new configuration
|
|
265
|
-
logging.info(f"Updating existing agent: {agent_name}")
|
|
335
|
+
logging.info(f"\n📝 Updating existing agent: {agent_name}")
|
|
266
336
|
remote_agent = client.agent_engines.update(
|
|
267
337
|
name=matching_agents[0].api_resource.name, **agent_config
|
|
268
338
|
)
|
|
269
339
|
else:
|
|
270
340
|
# Create a new agent if none exists
|
|
271
|
-
logging.info(f"Creating new agent: {agent_name}")
|
|
341
|
+
logging.info(f"\n🚀 Creating new agent: {agent_name}")
|
|
272
342
|
remote_agent = client.agent_engines.create(**agent_config)
|
|
273
343
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
"deployment_timestamp": datetime.datetime.now().isoformat(),
|
|
277
|
-
}
|
|
278
|
-
metadata_file = "deployment_metadata.json"
|
|
279
|
-
|
|
280
|
-
with open(metadata_file, "w") as f:
|
|
281
|
-
json.dump(metadata, f, indent=2)
|
|
282
|
-
|
|
283
|
-
logging.info(f"Agent Engine ID written to {metadata_file}")
|
|
344
|
+
write_deployment_metadata(remote_agent)
|
|
345
|
+
print_deployment_success(remote_agent, location, project)
|
|
284
346
|
|
|
285
347
|
return remote_agent
|
|
286
348
|
|
|
287
349
|
|
|
288
350
|
if __name__ == "__main__":
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
parser = argparse.ArgumentParser(description="Deploy agent engine app to Vertex AI")
|
|
292
|
-
parser.add_argument(
|
|
293
|
-
"--project",
|
|
294
|
-
default=None,
|
|
295
|
-
help="GCP project ID (defaults to application default credentials)",
|
|
296
|
-
)
|
|
297
|
-
parser.add_argument(
|
|
298
|
-
"--location",
|
|
299
|
-
default="us-central1",
|
|
300
|
-
help="GCP region (defaults to us-central1)",
|
|
301
|
-
)
|
|
302
|
-
parser.add_argument(
|
|
303
|
-
"--agent-name",
|
|
304
|
-
default="{{cookiecutter.project_name}}",
|
|
305
|
-
help="Name for the agent engine",
|
|
306
|
-
)
|
|
307
|
-
parser.add_argument(
|
|
308
|
-
"--requirements-file",
|
|
309
|
-
default=".requirements.txt",
|
|
310
|
-
help="Path to requirements.txt file",
|
|
311
|
-
)
|
|
312
|
-
parser.add_argument(
|
|
313
|
-
"--extra-packages",
|
|
314
|
-
nargs="+",
|
|
315
|
-
default=["./{{cookiecutter.agent_directory}}"],
|
|
316
|
-
help="Additional packages to include",
|
|
317
|
-
)
|
|
318
|
-
parser.add_argument(
|
|
319
|
-
"--set-env-vars",
|
|
320
|
-
help="Comma-separated list of environment variables in KEY=VALUE format",
|
|
321
|
-
)
|
|
322
|
-
parser.add_argument(
|
|
323
|
-
"--service-account",
|
|
324
|
-
default=None,
|
|
325
|
-
help="Service account email to use for the agent engine",
|
|
326
|
-
)
|
|
327
|
-
args = parser.parse_args()
|
|
328
|
-
|
|
329
|
-
# Parse environment variables if provided
|
|
330
|
-
env_vars = {}
|
|
331
|
-
if args.set_env_vars:
|
|
332
|
-
for pair in args.set_env_vars.split(","):
|
|
333
|
-
key, value = pair.split("=", 1)
|
|
334
|
-
env_vars[key] = value
|
|
335
|
-
|
|
336
|
-
if not args.project:
|
|
337
|
-
_, args.project = google.auth.default()
|
|
338
|
-
|
|
339
|
-
print("""
|
|
340
|
-
╔═══════════════════════════════════════════════════════════╗
|
|
341
|
-
║ ║
|
|
342
|
-
║ 🤖 DEPLOYING AGENT TO VERTEX AI AGENT ENGINE 🤖 ║
|
|
343
|
-
║ ║
|
|
344
|
-
╚═══════════════════════════════════════════════════════════╝
|
|
345
|
-
""")
|
|
346
|
-
|
|
347
|
-
deploy_agent_engine_app(
|
|
348
|
-
project=args.project,
|
|
349
|
-
location=args.location,
|
|
350
|
-
agent_name=args.agent_name,
|
|
351
|
-
requirements_file=args.requirements_file,
|
|
352
|
-
extra_packages=args.extra_packages,
|
|
353
|
-
env_vars=env_vars,
|
|
354
|
-
service_account=args.service_account,
|
|
355
|
-
)
|
|
351
|
+
deploy_agent_engine_app()
|