agent-starter-pack 0.0.13b0__py3-none-any.whl → 0.1.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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-starter-pack
3
- Version: 0.0.13b0
3
+ Version: 0.1.0
4
4
  Summary: CLI tool to create GCP-based AI agent projects from templates
5
5
  Author-email: Google LLC <agent-starter-pack@google.com>
6
6
  License: Apache-2.0
@@ -51,7 +51,7 @@ pip install agent-starter-pack
51
51
  agent-starter-pack create my-awesome-agent
52
52
  ```
53
53
 
54
- **That's it!** You now have a fully functional agent project, complete with a backend, frontend, and deployment infrastructure, ready to explore and customize.
54
+ **That's it!** You now have a fully functional agent projectcomplete with backend, frontend, and deployment infrastructureready for you to explore and customize.
55
55
  For more installation options, see the [Installation Guide](docs/installation.md).
56
56
 
57
57
  ---
@@ -119,7 +119,6 @@ See the [documentation](docs/) for more details:
119
119
  - [Data Ingestion](docs/data-ingestion.md)
120
120
  - [Observability](docs/observability.md)
121
121
  - [CLI Reference](docs/cli/README.md)
122
- - [CLI Reference](docs/cli/README.md)
123
122
  - [Troubleshooting](docs/troubleshooting.md)
124
123
 
125
124
  **Video Walkthrough:** A [20-Minute Video Walkthrough](https://youtu.be/kwRG7cnqSu0) is available, showcasing the previous `e2e-gen-ai-app-starter-pack`. A new walkthrough for the `agent-starter-pack` will be released soon!
@@ -138,7 +137,7 @@ If you encounter any issues or have specific suggestions, please first consider
138
137
 
139
138
  ### Share Your Experience
140
139
 
141
- For other types of feedback, or if you'd like to share a positive experience or success story using this starter pack, we'd love to hear from you! You can reach out to us at <a href="mailto:e2e-gen-ai-app-starter-pack@google.com">e2e-gen-ai-app-starter-pack@google.com</a>.
140
+ For other types of feedback, or if you'd like to share a positive experience or success story using this starter pack, we'd love to hear from you! You can reach out to us at <a href="mailto:agent-starter-pack@google.com">agent-starter-pack@google.com</a>.
142
141
 
143
142
  Thank you for your contributions!
144
143
 
@@ -21,7 +21,7 @@ agents/langgraph_base_react/template/.templateconfig.yaml,sha256=NpQRZbXtCOeX0Xi
21
21
  agents/langgraph_base_react/tests/integration/test_agent.py,sha256=wg2Y8V4l7dh7rhWy7Z8zioDW5ILRsz7RZJ-mz0AhK3U,1619
22
22
  agents/multimodal_live_api/README.md,sha256=t19QIXtYX8OuHy4po8dD875hDp0E5kRJOxaxGJ-i2zQ,2741
23
23
  agents/multimodal_live_api/app/agent.py,sha256=WFB7lvDiImvNyWFlds_f5TtzyrbwcquJe6JyJo8HGSs,2690
24
- agents/multimodal_live_api/app/server.py,sha256=RelFBb2iPzAUaI4huM7_5yRCXwNCtpoiT6AfYlQZvqI,7016
24
+ agents/multimodal_live_api/app/server.py,sha256=LdJcBRcUEqjAPk2pwsxwLx8wMULUzvMNDYZf_dx4yl0,7063
25
25
  agents/multimodal_live_api/app/templates.py,sha256=HgA4QGIle4Q-Nr6xAAXk1pTX7eNbZqlQUD9_fbCvDWA,3301
26
26
  agents/multimodal_live_api/app/vector_store.py,sha256=AYRSNpfevbVTt-nnWna_dp2pn4T7o1nz9-9wOoWaxsA,2045
27
27
  agents/multimodal_live_api/template/.templateconfig.yaml,sha256=gkXZxV15yY6OpJ64VWRhWlCtPhJxyacrv_e2kY3-Wo0,1082
@@ -30,16 +30,16 @@ agents/multimodal_live_api/tests/load_test/load_test.py,sha256=HHZyfC4gqiQtZVF_C
30
30
  agents/multimodal_live_api/tests/unit/test_server.py,sha256=_TjlgQgNkjerIaBGnu8P8_KB8ZlSolDcivALpUOn_Rw,4786
31
31
  src/base_template/.gitignore,sha256=mJKTZIcVdAFiIUQicRfPNGUg6WvwcfTEC2xbmAaU34g,2579
32
32
  src/base_template/Makefile,sha256=PNmyhdIRf0p6eRLYqWHfCskLmuDMG673YPEeu51XLVQ,1720
33
- src/base_template/README.md,sha256=7HDBqs6gvoUJNagg48_apRuDkrgb0_uRkAei2OTR_II,8094
33
+ src/base_template/README.md,sha256=A2AsGhPVfbMTjiPnuuEui7V8UVWa7hE5m0zut--QbbU,8196
34
34
  src/base_template/pyproject.toml,sha256=Pv4nC4uh_9_sGA90Tom0ITJUAbGolhseCA9-AOaEIpY,2799
35
35
  src/base_template/app/utils/tracing.py,sha256=ovp6tgwgo_tqibpbhhHl8cWIqqUWVYfV0AL7XPDEPpM,5661
36
36
  src/base_template/app/utils/typing.py,sha256=UUFm74qiKGtT8pLuE_3yRpcmntRCt91wH_Q-LKdjQuQ,3194
37
37
  src/base_template/deployment/README.md,sha256=8AorSeF2Aj0kvPmuQLFrmAAUWVbdTzg0S-rVBbfdirQ,4835
38
- src/base_template/deployment/cd/deploy-to-prod.yaml,sha256=TbIJc0YTPwH5lQUERiDlC98muaw6e0QjYOfjNtCx9os,3308
39
- src/base_template/deployment/cd/staging.yaml,sha256=9DtPZ2A0yiPXA07XbBa-yurT9os5OF28eEU-YXlmTk4,7121
40
- src/base_template/deployment/ci/pr_checks.yaml,sha256=6eNl5O-9zrbAcYGxWl_4-8EPKb7xxUiWHxC4npNEEvc,1442
38
+ src/base_template/deployment/cd/deploy-to-prod.yaml,sha256=sy9IkWsQ9Pk_qBfiamsFuYpc0SUQpWEkII8JVqOehNc,3323
39
+ src/base_template/deployment/cd/staging.yaml,sha256=BuK-Z08yEILfKUFlZQDSBx-hXmCH1m9h4A4KL4uOsRw,7141
40
+ src/base_template/deployment/ci/pr_checks.yaml,sha256=FGa2ab43Y1KgYkxK7XovyQrQHY5ypeND5VewZ4lpBw0,1457
41
41
  src/base_template/deployment/terraform/apis.tf,sha256=NoQP9HUJ5eXJMSKerdhypFYSEpWgLLhKK6Bz8hJgPTo,1221
42
- src/base_template/deployment/terraform/build_triggers.tf,sha256=Gd51HQ-b2IGupfZmsMlm3M_c8C4pI-o_IBh1OkQsanw,5105
42
+ src/base_template/deployment/terraform/build_triggers.tf,sha256=P-AbWegeDXoFkBeHSn0bBb-4MP5pQ15vc0b5DH-vcDc,5097
43
43
  src/base_template/deployment/terraform/iam.tf,sha256=6lsvBGLl0JRxR3pZMS38yw-pq6MNA0mxK54s19qr5-M,5600
44
44
  src/base_template/deployment/terraform/locals.tf,sha256=mrmOigExLk5g734-2VodDj8qQUTBq20e7FgQD0KUF8E,1390
45
45
  src/base_template/deployment/terraform/log_sinks.tf,sha256=pxZcQ-FyT7RVuGDORB_023SoGj96iqWtmh5kgJMG1u4,3011
@@ -60,7 +60,7 @@ src/cli/main.py,sha256=vNEV1Fdl1BhJAFbKHcN3MN1v7dPRUcAgXMnB3uCnlI0,1591
60
60
  src/cli/commands/create.py,sha256=38wc5DjUOelLtmCnkVLIq9aVc6c1EK10O0fd-refh6I,18963
61
61
  src/cli/commands/setup_cicd.py,sha256=EgVkDdA94npDHHPTuYDmWNIiRscnsXtN7CbTuelrTVU,28347
62
62
  src/cli/utils/__init__.py,sha256=x-k6jfcv68_zYS88LrA1mr0yB5y5SekJ0nc5Tvt6iDA,1064
63
- src/cli/utils/cicd.py,sha256=W44Dt39mZMzfDqA16gG69C8vc6VvBy99QVBJxEIjMI4,26631
63
+ src/cli/utils/cicd.py,sha256=nrb46lJ3bR_yVJRlUPsBN-To4v-xo5qO5WmnIi6qcYM,27076
64
64
  src/cli/utils/gcp.py,sha256=f-XTq9AN2_KrCR8pf_gSPOng8KrvtFlNP2Ok9VtTk_Q,4118
65
65
  src/cli/utils/logging.py,sha256=0lHe4EPi1A8sOx9xkA7gS4UNl0GsIyp2ahydkkuCzLY,1570
66
66
  src/cli/utils/template.py,sha256=p7uKv5yHkXIOWo8EJJ0IjUh57lOSDL7kYHA9OZ7j-z4,25447
@@ -72,7 +72,7 @@ src/data_ingestion/data_ingestion_pipeline/submit_pipeline.py,sha256=i5TI-NMGaMz
72
72
  src/data_ingestion/data_ingestion_pipeline/components/ingest_data.py,sha256=EfAUQh4WEkc-hfZ0E0_mb5F-WkZWw4RXdgD6IByvslU,5969
73
73
  src/data_ingestion/data_ingestion_pipeline/components/process_data.py,sha256=TQEQ6obbERs-dhsTLn-GA7M1zEjitqg-MiBR80yzUO4,11770
74
74
  src/deployment_targets/agent_engine/deployment_metadata.json,sha256=G_t_n-UNrFsBgH1Xrw5-ZqYzUGwZ4X6ipsIm_yiSq-w,72
75
- src/deployment_targets/agent_engine/app/agent_engine_app.py,sha256=k1dIgjpcAmkAM0xD5IRVYFyWLf9UXSj-lwzYlSgwZyY,8699
75
+ src/deployment_targets/agent_engine/app/agent_engine_app.py,sha256=Bf54uYOe9x7V_1Oe12k0eEvUbRDpI5ke1XrorulcG0A,9473
76
76
  src/deployment_targets/agent_engine/app/utils/gcs.py,sha256=voQNs8sbvLDH0PX3avpn8RFNTq7QWNgXfMWUKU7hBTA,1495
77
77
  src/deployment_targets/agent_engine/notebooks/intro_reasoning_engine.ipynb,sha256=DUlLvBjaPxHXNAxMw8pkHMWCDuyPleiAsiiyRJ-D1YA,929968
78
78
  src/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py,sha256=maYeJgeZceMgD4TI8ZID6SKAqHPlQuW2CksT7MGile4,3938
@@ -86,7 +86,7 @@ src/deployment_targets/cloud_run/app/server.py,sha256=h6H6xwK_VVlOOfD6sOSbxX3WqR
86
86
  src/deployment_targets/cloud_run/deployment/terraform/artifact_registry.tf,sha256=7KgheT1UuCUUQK2pfb8cmS_H8qftzy7HHKu1HrCS0_0,970
87
87
  src/deployment_targets/cloud_run/deployment/terraform/dev/service_accounts.tf,sha256=CBavl84WbuQCGz0bQt5B7Sh9ZlpQVMRNHQZAnyWxppg,820
88
88
  src/deployment_targets/cloud_run/tests/integration/test_server_e2e.py,sha256=KKtdtBTxaAfHQodm4FdyQHa7hBAwWCCda5aEF26-bjk,5978
89
- src/deployment_targets/cloud_run/tests/load_test/README.md,sha256=y-SLVLiYZp4Lt8xI5lhz5svAsIwMK8IWIZMwF27SLro,2663
89
+ src/deployment_targets/cloud_run/tests/load_test/README.md,sha256=JP47idadGBiLaBxBPOBJBEY4W87Xh3-wv5Bn8avhvHU,2804
90
90
  src/deployment_targets/cloud_run/tests/load_test/load_test.py,sha256=HsxmcNKyEopeGER4QUmnjiW4Bqp6h1TXsCUkyrq6inw,3317
91
91
  src/deployment_targets/cloud_run/tests/load_test/.results/.placeholder,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
92
  src/deployment_targets/cloud_run/tests/unit/test_server.py,sha256=f3nJIw2JCcxvV2WDwq9oZv_VUVYpTCm6R2kw5ch8BRc,4379
@@ -148,10 +148,10 @@ src/resources/setup_cicd/cicd_variables.tf,sha256=OHNKglkpN2TSTnfgpd-fM-eNUbWhs6
148
148
  src/resources/setup_cicd/github.tf,sha256=g7gMQqPZI69XteCSruNfiT00GBGawuXANHj-F0fc-GE,2727
149
149
  src/resources/setup_cicd/providers.tf,sha256=Km4z6IJt7x7PLaa0kyZbBrO2m3lpuIJZFD5jB7QBfF0,1122
150
150
  src/utils/generate_locks.py,sha256=xu5IAhGGBPkVQGSJX4kk7_JNDwWJUEaXAHbmaQIohbg,4386
151
- src/utils/lock_utils.py,sha256=plw3vWkRViCMxBK3IrLRHtF_I0kbbP043T9KIYxcb20,2423
151
+ src/utils/lock_utils.py,sha256=_QdzQtgIbCmJ87s046_i1g966slVNmvr3bJDeHbRQSM,2419
152
152
  src/utils/watch_and_rebuild.py,sha256=IdbTLReYknTXXu5KWPz3sc7Zg5HTEMS5UVlMSnuhs5E,6067
153
- agent_starter_pack-0.0.13b0.dist-info/METADATA,sha256=JCEZ64tCOLyVW6BDUo1hLzP3bB0e0RUut2B1-1EWYvE,7379
154
- agent_starter_pack-0.0.13b0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
155
- agent_starter_pack-0.0.13b0.dist-info/entry_points.txt,sha256=U7uCxR7YulIhZ0L8R8Hui0Bsy6J7oyESBeDYJYMrQjA,56
156
- agent_starter_pack-0.0.13b0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
157
- agent_starter_pack-0.0.13b0.dist-info/RECORD,,
153
+ agent_starter_pack-0.1.0.dist-info/METADATA,sha256=f1w4h-F89pFoC5hN7sxzYRHUbYD6cFEf2Ab-2kXaO_Y,7328
154
+ agent_starter_pack-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
155
+ agent_starter_pack-0.1.0.dist-info/entry_points.txt,sha256=U7uCxR7YulIhZ0L8R8Hui0Bsy6J7oyESBeDYJYMrQjA,56
156
+ agent_starter_pack-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
157
+ agent_starter_pack-0.1.0.dist-info/RECORD,,
@@ -77,7 +77,9 @@ class GeminiSession:
77
77
  elif "setup" in data:
78
78
  self.run_id = data["setup"]["run_id"]
79
79
  self.user_id = data["setup"]["user_id"]
80
- logger.log_struct({**data['setup'],"type": "setup"}, severity="INFO")
80
+ logger.log_struct(
81
+ {**data["setup"], "type": "setup"}, severity="INFO"
82
+ )
81
83
  else:
82
84
  logging.warning(f"Received unexpected input from client: {data}")
83
85
  except ConnectionClosedError as e:
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{cookiecutter.agent_description}}
4
4
 
5
- Template generated with `googleCloudPlatform/agent-starter-pack`
5
+ Agent generated with [`googleCloudPlatform/agent-starter-pack`](https://github.com/GoogleCloudPlatform/agent-starter-pack)
6
6
 
7
7
  ## Project Structure
8
8
 
@@ -113,7 +113,9 @@ For full command options and usage, refer to the [Makefile](Makefile).
113
113
  3. **Interact with the Agent**
114
114
  Once both the backend and frontend are running, click the play button in the frontend UI to establish a connection with the backend. You can now interact with the Multimodal Live Agent! You can try asking questions such as "Using the tool you have, define Governance in the context MLOPs" to allow the agent to use the documentation it was provided to.
115
115
 
116
- **Cloud Shell usage**
116
+ <details>
117
+ <summary><b>Cloud Shell usage</b></summary>
118
+
117
119
  To use the `multimodal_live_api` agent in Cloud Shell, follow these steps:
118
120
 
119
121
  1. **Start the Frontend:**
@@ -153,6 +155,7 @@ To use the `multimodal_live_api` agent in Cloud Shell, follow these steps:
153
155
  * Click the "Play button" to connect. Start interacting with it!
154
156
 
155
157
  * When using Cloud Shell there is a known limitation when using the feedback feature in the Frontend. Feedback submission might fail due to different origins between the frontend and backend in the Cloud Shell environment.
158
+ </details>
156
159
  {%- else %}
157
160
  ## Usage
158
161
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  steps:
16
16
  {%- if cookiecutter.data_ingestion %}
17
- - name: "python:3.11"
17
+ - name: "python:3.11-slim"
18
18
  id: deploy-data-ingestion-pipeline-prod
19
19
  entrypoint: bash
20
20
  args:
@@ -63,7 +63,7 @@ steps:
63
63
  - "--set-env-vars"
64
64
  - "COMMIT_SHA=${COMMIT_SHA}{%- if cookiecutter.data_ingestion %},DATA_STORE_ID=${_DATA_STORE_ID},DATA_STORE_REGION=${_DATA_STORE_REGION}{%- endif %}"
65
65
  {%- elif cookiecutter.deployment_target == 'agent_engine' %}
66
- - name: "python:3.11"
66
+ - name: "python:3.11-slim"
67
67
  id: install-dependencies
68
68
  entrypoint: /bin/bash
69
69
  args:
@@ -73,7 +73,7 @@ steps:
73
73
  env:
74
74
  - 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
75
75
 
76
- - name: "python:3.11"
76
+ - name: "python:3.11-slim"
77
77
  id: trigger-deployment
78
78
  entrypoint: /bin/bash
79
79
  args:
@@ -14,7 +14,7 @@
14
14
 
15
15
  steps:
16
16
  {%- if cookiecutter.data_ingestion %}
17
- - name: "python:3.11"
17
+ - name: "python:3.11-slim"
18
18
  id: deploy-data-ingestion-pipeline-prod
19
19
  entrypoint: bash
20
20
  args:
@@ -96,7 +96,7 @@ steps:
96
96
  - |
97
97
  echo $(gcloud auth print-identity-token -q) > id_token.txt
98
98
  {%- elif cookiecutter.deployment_target == 'agent_engine' %}
99
- - name: "python:3.11"
99
+ - name: "python:3.11-slim"
100
100
  id: install-dependencies
101
101
  entrypoint: /bin/bash
102
102
  args:
@@ -106,7 +106,7 @@ steps:
106
106
  env:
107
107
  - 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
108
108
 
109
- - name: "python:3.11"
109
+ - name: "python:3.11-slim"
110
110
  id: deploy-staging
111
111
  entrypoint: /bin/bash
112
112
  args:
@@ -131,7 +131,7 @@ steps:
131
131
  {%- endif %}
132
132
 
133
133
  # Load Testing
134
- - name: "python:3.11"
134
+ - name: "python:3.11-slim"
135
135
  id: load_test
136
136
  entrypoint: /bin/bash
137
137
  args:
@@ -14,7 +14,7 @@
14
14
 
15
15
  steps:
16
16
  # Install uv package manager and sync dependencies
17
- - name: "python:3.11"
17
+ - name: "python:3.11-slim"
18
18
  id: install-dependencies
19
19
  entrypoint: /bin/bash
20
20
  args:
@@ -25,7 +25,7 @@ steps:
25
25
  - 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
26
26
 
27
27
  # Run unit tests using pytest
28
- - name: "python:3.11"
28
+ - name: "python:3.11-slim"
29
29
  id: unit-tests
30
30
  entrypoint: /bin/bash
31
31
  args:
@@ -36,7 +36,7 @@ steps:
36
36
  - 'PATH=/usr/local/bin:/usr/bin:~/.local/bin'
37
37
 
38
38
  # Run integration tests
39
- - name: "python:3.11"
39
+ - name: "python:3.11-slim"
40
40
  id: integration-tests
41
41
  entrypoint: /bin/bash
42
42
  args:
@@ -33,7 +33,7 @@ resource "google_cloudbuild_trigger" "pr_checks" {
33
33
  "data_ingestion/**",
34
34
  "tests/**",
35
35
  "deployment/**",
36
- "poetry.lock",
36
+ "uv.lock",
37
37
  {%- if cookiecutter.data_ingestion %}
38
38
  "data_ingestion/**",
39
39
  {%- endif %}
@@ -62,7 +62,7 @@ resource "google_cloudbuild_trigger" "cd_pipeline" {
62
62
  "data_ingestion/**",
63
63
  "tests/**",
64
64
  "deployment/**",
65
- "poetry.lock"
65
+ "uv.lock"
66
66
  ]
67
67
  substitutions = {
68
68
  _STAGING_PROJECT_ID = var.staging_project_id
src/cli/utils/cicd.py CHANGED
@@ -259,15 +259,30 @@ def create_github_connection(
259
259
  console.print("⏳ Waiting for GitHub authorization...")
260
260
  # Extract and print the action URI for user authentication
261
261
  try:
262
- action_uri = json.loads(result.stdout).get("installationState", {}).get("actionUri")
262
+ action_uri = (
263
+ json.loads(result.stdout)
264
+ .get("installationState", {})
265
+ .get("actionUri")
266
+ )
263
267
  if action_uri:
264
- console.print("\n🔑 Authentication Required:", style="bold yellow")
265
- console.print(f"Please visit [link={action_uri}]this page[/link] to authenticate Cloud Build with GitHub:")
268
+ console.print(
269
+ "\n🔑 Authentication Required:", style="bold yellow"
270
+ )
271
+ console.print(
272
+ f"Please visit [link={action_uri}]this page[/link] to authenticate Cloud Build with GitHub:"
273
+ )
266
274
  console.print(f"{action_uri}", style="bold blue")
267
- console.print("(Copy and paste the link into your browser if clicking doesn't work)")
268
- console.print("After completing authentication, return here to continue the setup.\n")
275
+ console.print(
276
+ "(Copy and paste the link into your browser if clicking doesn't work)"
277
+ )
278
+ console.print(
279
+ "After completing authentication, return here to continue the setup.\n"
280
+ )
269
281
  except (json.JSONDecodeError, KeyError) as e:
270
- console.print(f"⚠️ Could not extract authentication link: {e}", style="yellow")
282
+ console.print(
283
+ f"⚠️ Could not extract authentication link: {e}",
284
+ style="yellow",
285
+ )
271
286
  time.sleep(10)
272
287
  continue
273
288
  else:
@@ -32,20 +32,21 @@ from app.utils.gcs import create_bucket_if_not_exists
32
32
  from app.utils.tracing import CloudTraceLoggingSpanExporter
33
33
  from app.utils.typing import Feedback, InputChat, dumpd, ensure_valid_config
34
34
 
35
-
36
35
  logging.basicConfig(
37
36
  level=logging.INFO,
38
37
  )
39
38
 
39
+
40
40
  class AgentEngineApp:
41
41
  """Class for managing agent engine functionality."""
42
42
 
43
- def __init__(self, project_id: str | None = None, env_vars: dict[str, str] | None = None) -> None:
43
+ def __init__(
44
+ self, project_id: str | None = None, env_vars: dict[str, str] | None = None
45
+ ) -> None:
44
46
  """Initialize the AgentEngineApp variables"""
45
47
  self.project_id = project_id
46
48
  self.env_vars = env_vars if env_vars is not None else {}
47
49
 
48
-
49
50
  def set_up(self) -> None:
50
51
  """The set_up method is used to define application initialization logic"""
51
52
  import os
@@ -144,8 +145,8 @@ class AgentEngineApp:
144
145
 
145
146
 
146
147
  def deploy_agent_engine_app(
147
- project: str | None = None,
148
- location: str | None = None,
148
+ project: str,
149
+ location: str,
149
150
  agent_name: str | None = None,
150
151
  requirements_file: str = ".requirements.txt",
151
152
  extra_packages: list[str] = ["./app"],
@@ -169,13 +170,12 @@ def deploy_agent_engine_app(
169
170
  # Common configuration for both create and update operations
170
171
  agent_config = {
171
172
  "reasoning_engine": agent,
172
- "requirements": requirements,
173
173
  "display_name": agent_name,
174
174
  "description": "This is a sample custom application in Reasoning Engine that uses LangGraph",
175
175
  "extra_packages": extra_packages,
176
176
  }
177
-
178
177
  logging.info(f"Agent config: {agent_config}")
178
+ agent_config["requirements"] = requirements
179
179
 
180
180
  # Check if an agent with this name already exists
181
181
  existing_agents = reasoning_engines.ReasoningEngine.list(
@@ -207,14 +207,36 @@ def deploy_agent_engine_app(
207
207
 
208
208
  if __name__ == "__main__":
209
209
  import argparse
210
-
210
+
211
211
  parser = argparse.ArgumentParser(description="Deploy agent engine app to Vertex AI")
212
- parser.add_argument("--project", default=None, help="GCP project ID (defaults to application default credentials)")
213
- parser.add_argument("--location", default="us-central1", help="GCP region (defaults to us-central1)")
214
- parser.add_argument("--agent-name", default="{{cookiecutter.project_name}}", help="Name for the agent engine")
215
- parser.add_argument("--requirements-file", default=".requirements.txt", help="Path to requirements.txt file")
216
- parser.add_argument("--extra-packages", nargs="+", default=["./app"], help="Additional packages to include")
217
- parser.add_argument("--set-env-vars", help="Comma-separated list of environment variables in KEY=VALUE format")
212
+ parser.add_argument(
213
+ "--project",
214
+ default=None,
215
+ help="GCP project ID (defaults to application default credentials)",
216
+ )
217
+ parser.add_argument(
218
+ "--location", default="us-central1", help="GCP region (defaults to us-central1)"
219
+ )
220
+ parser.add_argument(
221
+ "--agent-name",
222
+ default="{{cookiecutter.project_name}}",
223
+ help="Name for the agent engine",
224
+ )
225
+ parser.add_argument(
226
+ "--requirements-file",
227
+ default=".requirements.txt",
228
+ help="Path to requirements.txt file",
229
+ )
230
+ parser.add_argument(
231
+ "--extra-packages",
232
+ nargs="+",
233
+ default=["./app"],
234
+ help="Additional packages to include",
235
+ )
236
+ parser.add_argument(
237
+ "--set-env-vars",
238
+ help="Comma-separated list of environment variables in KEY=VALUE format",
239
+ )
218
240
  args = parser.parse_args()
219
241
 
220
242
  # Parse environment variables if provided
@@ -228,11 +250,19 @@ if __name__ == "__main__":
228
250
  if not args.project:
229
251
  _, args.project = google.auth.default()
230
252
 
253
+ print("""
254
+ ╔═══════════════════════════════════════════════════════════╗
255
+ ║ ║
256
+ ║ 🤖 DEPLOYING AGENT TO VERTEX AI AGENT ENGINE 🤖 ║
257
+ ║ ║
258
+ ╚═══════════════════════════════════════════════════════════╝
259
+ """)
260
+
231
261
  deploy_agent_engine_app(
232
262
  project=args.project,
233
263
  location=args.location,
234
264
  agent_name=args.agent_name,
235
265
  requirements_file=args.requirements_file,
236
266
  extra_packages=args.extra_packages,
237
- env_vars=env_vars
267
+ env_vars=env_vars,
238
268
  )
@@ -11,13 +11,13 @@ Follow these steps to execute load tests on your local machine:
11
11
  Launch the FastAPI server in a separate terminal:
12
12
 
13
13
  ```bash
14
- poetry run uvicorn app.server:app --host 0.0.0.0 --port 8000 --reload
14
+ uv run uvicorn app.server:app --host 0.0.0.0 --port 8000 --reload
15
15
  ```
16
16
 
17
17
  **2. (In another tab) Create virtual environment with Locust**
18
18
  Using another terminal tab, This is suggested to avoid conflicts with the existing application python environment.
19
19
 
20
- ```commandline
20
+ ```bash
21
21
  python3 -m venv locust_env && source locust_env/bin/activate && pip install locust==2.31.1
22
22
  ```
23
23
 
@@ -67,10 +67,14 @@ export _ID_TOKEN=$(gcloud auth print-identity-token -q)
67
67
  ```
68
68
 
69
69
  **3. Execute the Load Test:**
70
- The following command executes the same load test parameters as the local test but targets your remote Cloud Run instance.
70
+ Create virtual environment with Locust:
71
+ ```bash
72
+ python3 -m venv locust_env && source locust_env/bin/activate && pip install locust==2.31.1
73
+ ```
71
74
 
75
+ Execute load tests. The following command executes the same load test parameters as the local test but targets your remote Cloud Run instance.
72
76
  ```bash
73
- poetry run locust -f tests/load_test/load_test.py \
77
+ locust -f tests/load_test/load_test.py \
74
78
  -H $RUN_SERVICE_URL \
75
79
  --headless \
76
80
  -t 30s -u 60 -r 2 \
src/utils/lock_utils.py CHANGED
@@ -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
- """Utilities for managing Poetry lock files and dependencies."""
15
+ """Utilities for managing uv lock files and dependencies."""
16
16
 
17
17
  import pathlib
18
18
  from pathlib import Path