agent-starter-pack 0.1.6__py3-none-any.whl → 0.2.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.

Files changed (81) hide show
  1. {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/METADATA +6 -6
  2. {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/RECORD +78 -78
  3. agents/{agentic_rag_vertexai_search → agentic_rag}/README.md +3 -3
  4. agents/{agentic_rag_vertexai_search → agentic_rag}/app/agent.py +22 -6
  5. agents/agentic_rag/app/retrievers.py +132 -0
  6. agents/{agentic_rag_vertexai_search → agentic_rag}/notebooks/evaluating_langgraph_agent.ipynb +3 -3
  7. agents/{agentic_rag_vertexai_search → agentic_rag}/template/.templateconfig.yaml +3 -5
  8. agents/crewai_coding_crew/notebooks/evaluating_crewai_agent.ipynb +4 -4
  9. agents/crewai_coding_crew/notebooks/evaluating_langgraph_agent.ipynb +3 -3
  10. agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb +3 -3
  11. agents/{multimodal_live_api → live_api}/README.md +7 -0
  12. agents/{multimodal_live_api → live_api}/app/agent.py +3 -11
  13. agents/{multimodal_live_api → live_api}/app/server.py +3 -2
  14. agents/{multimodal_live_api → live_api}/template/.templateconfig.yaml +2 -2
  15. src/base_template/Makefile +12 -7
  16. src/base_template/README.md +71 -71
  17. src/base_template/app/utils/tracing.py +3 -1
  18. src/base_template/app/utils/typing.py +1 -0
  19. src/base_template/deployment/cd/deploy-to-prod.yaml +10 -4
  20. src/base_template/deployment/cd/staging.yaml +11 -10
  21. src/base_template/deployment/ci/pr_checks.yaml +1 -1
  22. src/base_template/deployment/terraform/apis.tf +6 -0
  23. src/base_template/deployment/terraform/build_triggers.tf +34 -21
  24. src/base_template/deployment/terraform/dev/iam.tf +13 -6
  25. src/base_template/deployment/terraform/dev/log_sinks.tf +25 -28
  26. src/base_template/deployment/terraform/dev/providers.tf +1 -0
  27. src/base_template/deployment/terraform/dev/storage.tf +69 -11
  28. src/base_template/deployment/terraform/dev/variables.tf +50 -53
  29. src/base_template/deployment/terraform/dev/vars/env.tfvars +13 -11
  30. src/base_template/deployment/terraform/iam.tf +3 -3
  31. src/base_template/deployment/terraform/log_sinks.tf +24 -26
  32. src/base_template/deployment/terraform/providers.tf +2 -0
  33. src/base_template/deployment/terraform/service_accounts.tf +7 -7
  34. src/base_template/deployment/terraform/storage.tf +123 -11
  35. src/base_template/deployment/terraform/variables.tf +49 -70
  36. src/base_template/deployment/terraform/vars/env.tfvars +12 -17
  37. src/base_template/pyproject.toml +4 -3
  38. src/cli/commands/create.py +79 -19
  39. src/cli/commands/setup_cicd.py +91 -22
  40. src/cli/main.py +3 -1
  41. src/cli/utils/__init__.py +9 -2
  42. src/cli/utils/cicd.py +12 -0
  43. src/cli/utils/datastores.py +32 -0
  44. src/cli/utils/gcp.py +4 -6
  45. src/cli/utils/template.py +127 -45
  46. src/cli/utils/version.py +87 -0
  47. src/data_ingestion/README.md +24 -19
  48. src/data_ingestion/data_ingestion_pipeline/components/ingest_data.py +135 -2
  49. src/data_ingestion/data_ingestion_pipeline/components/process_data.py +276 -2
  50. src/data_ingestion/data_ingestion_pipeline/pipeline.py +28 -5
  51. src/data_ingestion/data_ingestion_pipeline/submit_pipeline.py +49 -14
  52. src/data_ingestion/pyproject.toml +1 -0
  53. src/deployment_targets/agent_engine/app/agent_engine_app.py +3 -1
  54. src/deployment_targets/cloud_run/tests/unit/test_server.py +15 -33
  55. src/frontends/live_api_react/frontend/package-lock.json +226 -186
  56. src/frontends/live_api_react/frontend/package.json +1 -1
  57. src/frontends/streamlit/frontend/utils/stream_handler.py +5 -5
  58. src/resources/containers/data_processing/Dockerfile +3 -1
  59. src/resources/locks/{uv-agentic_rag_vertexai_search-agent_engine.lock → uv-agentic_rag-agent_engine.lock} +747 -694
  60. src/resources/locks/{uv-agentic_rag_vertexai_search-cloud_run.lock → uv-agentic_rag-cloud_run.lock} +944 -806
  61. src/resources/locks/uv-crewai_coding_crew-agent_engine.lock +651 -694
  62. src/resources/locks/uv-crewai_coding_crew-cloud_run.lock +813 -789
  63. src/resources/locks/uv-langgraph_base_react-agent_engine.lock +666 -686
  64. src/resources/locks/uv-langgraph_base_react-cloud_run.lock +848 -798
  65. src/resources/locks/{uv-multimodal_live_api-cloud_run.lock → uv-live_api-cloud_run.lock} +856 -791
  66. src/resources/setup_cicd/cicd_variables.tf +5 -0
  67. src/resources/setup_cicd/github.tf +4 -2
  68. src/utils/watch_and_rebuild.py +14 -0
  69. agents/agentic_rag_vertexai_search/app/retrievers.py +0 -79
  70. src/deployment_targets/cloud_run/deployment/terraform/artifact_registry.tf +0 -22
  71. src/deployment_targets/cloud_run/deployment/terraform/dev/service_accounts.tf +0 -20
  72. {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/WHEEL +0 -0
  73. {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/entry_points.txt +0 -0
  74. {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/licenses/LICENSE +0 -0
  75. /agents/{agentic_rag_vertexai_search → agentic_rag}/app/templates.py +0 -0
  76. /agents/{agentic_rag_vertexai_search → agentic_rag}/tests/integration/test_agent.py +0 -0
  77. /agents/{multimodal_live_api → live_api}/app/templates.py +0 -0
  78. /agents/{multimodal_live_api → live_api}/app/vector_store.py +0 -0
  79. /agents/{multimodal_live_api → live_api}/tests/integration/test_server_e2e.py +0 -0
  80. /agents/{multimodal_live_api → live_api}/tests/load_test/load_test.py +0 -0
  81. /agents/{multimodal_live_api → live_api}/tests/unit/test_server.py +0 -0
@@ -12,8 +12,13 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ provider "google" {
16
+ region = var.region
17
+ user_project_override = true
18
+ }
19
+
15
20
  resource "google_storage_bucket" "bucket_load_test_results" {
16
- name = "${var.cicd_runner_project_id}-${var.suffix_bucket_name_load_test_results}"
21
+ name = "${var.cicd_runner_project_id}-${var.project_name}-load-test"
17
22
  location = var.region
18
23
  project = var.cicd_runner_project_id
19
24
  uniform_bucket_level_access = true
@@ -23,7 +28,7 @@ resource "google_storage_bucket" "bucket_load_test_results" {
23
28
 
24
29
  resource "google_storage_bucket" "logs_data_bucket" {
25
30
  for_each = toset(local.all_project_ids)
26
- name = "${each.value}-logs-data"
31
+ name = "${each.value}-${var.project_name}-logs-data"
27
32
  location = var.region
28
33
  project = each.value
29
34
  uniform_bucket_level_access = true
@@ -31,11 +36,21 @@ resource "google_storage_bucket" "logs_data_bucket" {
31
36
 
32
37
  depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.shared_services]
33
38
  }
39
+ {% if cookiecutter.deployment_target == 'cloud_run' %}
40
+ resource "google_artifact_registry_repository" "repo-artifacts-genai" {
41
+ location = var.region
42
+ repository_id = "${var.project_name}-repo"
43
+ description = "Repo for Generative AI applications"
44
+ format = "DOCKER"
45
+ project = var.cicd_runner_project_id
46
+ depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.shared_services]
47
+ }
48
+ {% endif %}
34
49
 
35
- {%- if cookiecutter.data_ingestion %}
50
+ {% if cookiecutter.data_ingestion %}
36
51
  resource "google_storage_bucket" "data_ingestion_pipeline_gcs_root" {
37
52
  for_each = local.deploy_project_ids
38
- name = "${each.value}-pipeline-artifacts"
53
+ name = "${each.value}-${var.project_name}-rag"
39
54
  location = var.region
40
55
  project = each.value
41
56
  uniform_bucket_level_access = true
@@ -44,11 +59,13 @@ resource "google_storage_bucket" "data_ingestion_pipeline_gcs_root" {
44
59
  depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.shared_services]
45
60
  }
46
61
 
62
+ {% if cookiecutter.datastore_type == "vertex_ai_search" %}
63
+
47
64
  resource "google_discovery_engine_data_store" "data_store_staging" {
48
65
  location = var.data_store_region
49
66
  project = var.staging_project_id
50
- data_store_id = "${var.datastore_name}"
51
- display_name = "${var.datastore_name}"
67
+ data_store_id = "${var.project_name}-datastore"
68
+ display_name = "${var.project_name}-datastore"
52
69
  industry_vertical = "GENERIC"
53
70
  content_config = "NO_CONTENT"
54
71
  solution_types = ["SOLUTION_TYPE_SEARCH"]
@@ -59,7 +76,7 @@ resource "google_discovery_engine_data_store" "data_store_staging" {
59
76
 
60
77
  resource "google_discovery_engine_search_engine" "search_engine_staging" {
61
78
  project = var.staging_project_id
62
- engine_id = "${var.search_engine_name}"
79
+ engine_id = "${var.project_name}-search"
63
80
  collection_id = "default_collection"
64
81
  location = google_discovery_engine_data_store.data_store_staging.location
65
82
  display_name = "Search Engine App Staging"
@@ -73,8 +90,8 @@ resource "google_discovery_engine_search_engine" "search_engine_staging" {
73
90
  resource "google_discovery_engine_data_store" "data_store_prod" {
74
91
  location = var.data_store_region
75
92
  project = var.prod_project_id
76
- data_store_id = "${var.datastore_name}"
77
- display_name = "${var.datastore_name}"
93
+ data_store_id = "${var.project_name}-datastore"
94
+ display_name = "${var.project_name}-datastore"
78
95
  industry_vertical = "GENERIC"
79
96
  content_config = "NO_CONTENT"
80
97
  solution_types = ["SOLUTION_TYPE_SEARCH"]
@@ -85,7 +102,7 @@ resource "google_discovery_engine_data_store" "data_store_prod" {
85
102
 
86
103
  resource "google_discovery_engine_search_engine" "search_engine_prod" {
87
104
  project = var.prod_project_id
88
- engine_id = "${var.search_engine_name}"
105
+ engine_id = "${var.project_name}-search"
89
106
  collection_id = "default_collection"
90
107
  location = google_discovery_engine_data_store.data_store_prod.location
91
108
  display_name = "Search Engine App Prod"
@@ -95,6 +112,101 @@ resource "google_discovery_engine_search_engine" "search_engine_prod" {
95
112
  }
96
113
  provider = google.prod_billing_override
97
114
  }
98
- {%- endif %}
115
+ {% elif cookiecutter.datastore_type == "vertex_ai_vector_search" %}
116
+
117
+ resource "google_storage_bucket" "vector_search_data_bucket" {
118
+ for_each = local.deploy_project_ids
119
+ name = "${each.value}-${var.project_name}-vs"
120
+ location = var.region
121
+ project = each.value
122
+ uniform_bucket_level_access = true
123
+ force_destroy = true
124
+
125
+ depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.shared_services]
126
+ }
99
127
 
128
+ resource "google_vertex_ai_index" "vector_search_index_staging" {
129
+ project = var.staging_project_id
130
+ region = var.region
131
+ display_name = "${var.project_name}-vector-search"
132
+ description = "vector search index for test"
133
+ metadata {
134
+ config {
135
+ dimensions = var.vector_search_embedding_size
136
+ shard_size = var.vector_search_shard_size
137
+ distance_measure_type = "DOT_PRODUCT_DISTANCE"
138
+ approximate_neighbors_count = var.vector_search_approximate_neighbors_count
139
+ algorithm_config {
140
+ tree_ah_config {
141
+ }
142
+ }
143
+ }
144
+ }
145
+ index_update_method = "STREAM_UPDATE"
146
+ }
147
+
148
+ resource "google_vertex_ai_index_endpoint" "vector_search_index_endpoint_staging" {
149
+ project = var.staging_project_id
150
+ region = var.region
151
+ display_name = "${var.project_name}-vector-search-endpoint"
152
+ public_endpoint_enabled = true
153
+ depends_on = [google_vertex_ai_index.vector_search_index_staging]
154
+ }
155
+
156
+ resource "google_vertex_ai_index_endpoint_deployed_index" "vector_search_index_deployment_staging" {
157
+ index_endpoint = google_vertex_ai_index_endpoint.vector_search_index_endpoint_staging.id
158
+ index = google_vertex_ai_index.vector_search_index_staging.id
159
+ deployed_index_id = replace("${var.project_name}_deployed_index", "-", "_")
160
+ depends_on = [
161
+ google_vertex_ai_index.vector_search_index_staging,
162
+ google_vertex_ai_index_endpoint.vector_search_index_endpoint_staging
163
+ ]
164
+ }
165
+
166
+ resource "google_vertex_ai_index" "vector_search_index_prod" {
167
+ project = var.prod_project_id
168
+ region = var.region
169
+ display_name = "${var.project_name}-vector-search"
170
+ description = "vector search index for test"
171
+ metadata {
172
+ config {
173
+ dimensions = var.vector_search_embedding_size
174
+ distance_measure_type = "DOT_PRODUCT_DISTANCE"
175
+ approximate_neighbors_count = var.vector_search_approximate_neighbors_count
176
+ shard_size = var.vector_search_shard_size
177
+ algorithm_config {
178
+ tree_ah_config {
179
+ }
180
+ }
181
+ }
182
+ }
183
+ index_update_method = "STREAM_UPDATE"
184
+ }
185
+
186
+ resource "google_vertex_ai_index_endpoint" "vector_search_index_endpoint_prod" {
187
+ project = var.prod_project_id
188
+ region = var.region
189
+ display_name = "${var.project_name}-vector-search-endpoint"
190
+ public_endpoint_enabled = true
191
+ depends_on = [google_vertex_ai_index.vector_search_index_prod]
192
+ }
193
+
194
+ resource "google_vertex_ai_index_endpoint_deployed_index" "vector_search_index_deployment_prod" {
195
+ index_endpoint = google_vertex_ai_index_endpoint.vector_search_index_endpoint_prod.id
196
+ index = google_vertex_ai_index.vector_search_index_prod.id
197
+ deployed_index_id = replace("${var.project_name}_deployed_index", "-", "_")
198
+ dedicated_resources {
199
+ machine_spec {
200
+ machine_type = var.vector_search_machine_type
201
+ }
202
+ min_replica_count = var.vector_search_min_replica_count
203
+ max_replica_count = var.vector_search_max_replica_count
204
+ }
205
+ depends_on = [
206
+ google_vertex_ai_index.vector_search_index_prod,
207
+ google_vertex_ai_index_endpoint.vector_search_index_endpoint_prod
208
+ ]
209
+ }
100
210
 
211
+ {% endif %}
212
+ {% endif %}
@@ -12,6 +12,12 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ variable "project_name" {
16
+ type = string
17
+ description = "Project name used as a base for resource naming"
18
+ default = "{{ cookiecutter.project_name | replace('_', '-') }}"
19
+ }
20
+
15
21
  variable "prod_project_id" {
16
22
  type = string
17
23
  description = "**Production** Google Cloud Project ID for resource deployment."
@@ -43,22 +49,10 @@ variable "repository_name" {
43
49
  type = string
44
50
  }
45
51
 
46
- variable "telemetry_bigquery_dataset_id" {
47
- type = string
48
- description = "BigQuery dataset ID for telemetry data export."
49
- default = "telemetry_genai_app_sample_sink"
50
- }
51
-
52
- variable "feedback_bigquery_dataset_id" {
53
- type = string
54
- description = "BigQuery dataset ID for feedback data export."
55
- default = "feedback_genai_app_sample_sink"
56
- }
57
-
58
52
  variable "telemetry_logs_filter" {
59
53
  type = string
60
54
  description = "Log Sink filter for capturing telemetry data. Captures logs with the `traceloop.association.properties.log_type` attribute set to `tracing`."
61
- default = "jsonPayload.attributes.\"traceloop.association.properties.log_type\"=\"tracing\" jsonPayload.resource.attributes.\"service.name\"=\"Sample Chatbot Application\""
55
+ default = "jsonPayload.attributes.\"traceloop.association.properties.log_type\"=\"tracing\" jsonPayload.resource.attributes.\"service.name\"=\"{{cookiecutter.project_name}}\""
62
56
  }
63
57
 
64
58
  variable "feedback_logs_filter" {
@@ -67,48 +61,13 @@ variable "feedback_logs_filter" {
67
61
  default = "jsonPayload.log_type=\"feedback\""
68
62
  }
69
63
 
70
- variable "telemetry_sink_name" {
71
- type = string
72
- description = "Name of the telemetry data Log Sink."
73
- default = "telemetry_logs_genai_app_sample"
74
- }
75
-
76
- variable "feedback_sink_name" {
77
- type = string
78
- description = "Name of the feedback data Log Sink."
79
- default = "feedback_logs_genai_app_sample"
80
- }
81
-
82
- variable "cicd_runner_sa_name" {
83
- description = "Service account name to be used for the CICD processes"
84
- type = string
85
- default = "cicd-runner"
86
- }
87
-
88
- variable "suffix_bucket_name_load_test_results" {
89
- description = "Suffix Name of the bucket that will be used to store the results of the load test. Prefix will be project id."
90
- type = string
91
- default = "cicd-load-test-results"
92
- }
93
- {%- if cookiecutter.deployment_target == 'cloud_run' %}
94
- variable "cloud_run_app_sa_name" {
95
- description = "Service account name to be used for the Cloud Run service"
96
- type = string
97
- default = "{{cookiecutter.project_name}}-cr"
98
- }
99
-
100
- variable "artifact_registry_repo_name" {
101
- description = "Name of the Artifact registry repository to be used to push containers"
102
- type = string
103
- default = "genai-containers"
104
- }
105
-
64
+ {% if cookiecutter.deployment_target == 'cloud_run' %}
106
65
  variable "cloud_run_app_roles" {
107
66
  description = "List of roles to assign to the Cloud Run app service account"
108
- {%- elif cookiecutter.deployment_target == 'agent_engine' %}
67
+ {% elif cookiecutter.deployment_target == 'agent_engine' %}
109
68
  variable "agentengine_sa_roles" {
110
69
  description = "List of roles to assign to the Agent Engine service account"
111
- {%- endif %}
70
+ {% endif %}
112
71
  type = list(string)
113
72
  default = [
114
73
  {%- if cookiecutter.deployment_target == 'cloud_run' %}
@@ -152,12 +111,7 @@ variable "cicd_sa_deployment_required_roles" {
152
111
  ]
153
112
  }
154
113
 
155
- {%- if cookiecutter.data_ingestion %}
156
- variable "vertexai_pipeline_sa_name" {
157
- description = "Service account name to be used for the Vertex AI service"
158
- type = string
159
- default = "data-ingestion-vertexai-sa"
160
- }
114
+ {% if cookiecutter.data_ingestion %}
161
115
 
162
116
  variable "pipeline_cron_schedule" {
163
117
  type = string
@@ -165,12 +119,6 @@ variable "pipeline_cron_schedule" {
165
119
  default = "0 0 * * 0" # Run at 00:00 UTC every Sunday
166
120
  }
167
121
 
168
- variable "data_store_region" {
169
- type = string
170
- description = "Google Cloud region for resource deployment."
171
- default = "us"
172
- }
173
-
174
122
  variable "pipelines_roles" {
175
123
  description = "List of roles to assign to the Vertex AI Pipelines service account"
176
124
  type = list(string)
@@ -187,16 +135,47 @@ variable "pipelines_roles" {
187
135
  "roles/resourcemanager.projectIamAdmin"
188
136
  ]
189
137
  }
138
+ {% if cookiecutter.datastore_type == "vertex_ai_search" %}
139
+ variable "data_store_region" {
140
+ type = string
141
+ description = "Google Cloud region for resource deployment."
142
+ default = "us"
143
+ }
144
+ {% elif cookiecutter.datastore_type == "vertex_ai_vector_search" %}
145
+ variable "vector_search_embedding_size" {
146
+ type = number
147
+ description = "The number of dimensions for the embeddings."
148
+ default = 768
149
+ }
150
+
151
+ variable "vector_search_approximate_neighbors_count" {
152
+ type = number
153
+ description = "The approximate number of neighbors to return."
154
+ default = 150
155
+ }
156
+
157
+ variable "vector_search_min_replica_count" {
158
+ type = number
159
+ description = "The min replica count for vector search instance"
160
+ default = 1
161
+ }
190
162
 
191
- variable "datastore_name" {
192
- description = "The name of the datastore"
163
+ variable "vector_search_max_replica_count" {
164
+ type = number
165
+ description = "The max replica count for vector search instance"
166
+ default = 1
167
+ }
168
+
169
+ variable "vector_search_shard_size" {
170
+ description = "The shard size of the vector search instance"
193
171
  type = string
194
- default = "sample-datastore"
172
+ default = "SHARD_SIZE_SMALL"
195
173
  }
196
174
 
197
- variable "search_engine_name" {
198
- description = "The name of the search engine"
175
+ variable "vector_search_machine_type" {
176
+ description = "The machine type for the vector search instance"
199
177
  type = string
200
- default = "sample-search-engine"
178
+ default = "e2-standard-2"
201
179
  }
202
- {%- endif %}
180
+ {% endif %}
181
+ {% endif %}
@@ -1,3 +1,6 @@
1
+ # Project name used for resource naming
2
+ project_name = "{{ cookiecutter.project_name | replace('_', '-') }}"
3
+
1
4
  # Your Production Google Cloud project id
2
5
  prod_project_id = "your-production-project-id"
3
6
 
@@ -8,36 +11,28 @@ staging_project_id = "your-staging-project-id"
8
11
  cicd_runner_project_id = "your-cicd-project-id"
9
12
 
10
13
  # Name of the host connection you created in Cloud Build
11
- host_connection_name = "your-host-connection-name"
14
+ host_connection_name = "git-{{cookiecutter.project_name}}"
12
15
 
13
16
  # Name of the repository you added to Cloud Build
14
- repository_name = "your-repository-name"
17
+ repository_name = "repo-{{cookiecutter.project_name}}"
15
18
 
16
19
  # The Google Cloud region you will use to deploy the infrastructure
17
20
  region = "us-central1"
18
21
 
19
- {%- if cookiecutter.deployment_target == 'cloud_run' %}
20
- cloud_run_app_sa_name = "{{cookiecutter.project_name}}-cr"
21
- {%- endif %}
22
-
23
- telemetry_bigquery_dataset_id = "telemetry_genai_app_sample_sink"
24
- telemetry_sink_name = "telemetry_logs_genai_app_sample"
25
22
  telemetry_logs_filter = "jsonPayload.attributes.\"traceloop.association.properties.log_type\"=\"tracing\" jsonPayload.resource.attributes.\"service.name\"=\"{{cookiecutter.project_name}}\""
26
23
 
27
- feedback_bigquery_dataset_id = "feedback_genai_app_sample_sink"
28
- feedback_sink_name = "feedback_logs_genai_app_sample"
29
24
  feedback_logs_filter = "jsonPayload.log_type=\"feedback\""
30
25
 
31
- cicd_runner_sa_name = "cicd-runner"
32
-
33
- suffix_bucket_name_load_test_results = "cicd-load-test-results"
34
-
35
26
  {%- if cookiecutter.data_ingestion %}
36
- search_engine_name = "sample-search-engine"
37
- datastore_name = "sample-datastore"
38
- vertexai_pipeline_sa_name = "vertexai-pipelines-sa"
39
27
  pipeline_cron_schedule = "0 0 * * 0"
40
28
 
29
+ {%- if cookiecutter.datastore_type == "vertex_ai_search" %}
41
30
  #The value can only be one of "global", "us" and "eu".
42
31
  data_store_region = "us"
32
+ {%- elif cookiecutter.datastore_type == "vertex_ai_vector_search" %}
33
+ vector_search_shard_size = "SHARD_SIZE_SMALL"
34
+ vector_search_machine_type = "e2-standard-2"
35
+ vector_search_min_replica_count = 1
36
+ vector_search_max_replica_count = 1
37
+ {%- endif %}
43
38
  {%- endif %}
@@ -18,7 +18,7 @@ dependencies = [
18
18
  "fastapi~=0.115.8",
19
19
  "uvicorn~=0.34.0"
20
20
  {%- elif cookiecutter.deployment_target == 'agent_engine' %}
21
- "google-cloud-aiplatform[evaluation,langchain,reasoningengine]~=1.81.0"
21
+ "google-cloud-aiplatform[evaluation,reasoningengine]~=1.81.0"
22
22
  {%- endif %}
23
23
  ]
24
24
  {% if cookiecutter.deployment_target == 'cloud_run' %}
@@ -87,7 +87,7 @@ follow_imports = "silent"
87
87
  ignore_missing_imports = true
88
88
  explicit_package_bases = true
89
89
  disable_error_code = ["misc", "no-untyped-call", "no-any-return"]
90
- {% if cookiecutter.agent_name == 'multimodal_live_api' %}
90
+ {% if cookiecutter.agent_name == 'live_api' %}
91
91
  exclude = [".venv","./frontend"]
92
92
  {% else %}
93
93
  exclude = [".venv"]
@@ -95,7 +95,7 @@ exclude = [".venv"]
95
95
 
96
96
  [tool.codespell]
97
97
  ignore-words-list = "rouge"
98
- {% if cookiecutter.agent_name == 'multimodal_live_api' %}
98
+ {% if cookiecutter.agent_name == 'live_api' %}
99
99
  skip = "./locust_env/*,uv.lock,.venv,./frontend,**/*.ipynb"
100
100
  {% else %}
101
101
  skip = "./locust_env/*,uv.lock,.venv,**/*.ipynb"
@@ -108,6 +108,7 @@ build-backend = "hatchling.build"
108
108
 
109
109
  [tool.pytest.ini_options]
110
110
  pythonpath = "."
111
+ asyncio_default_fixture_loop_scope = "function"
111
112
 
112
113
  [tool.hatch.build.targets.wheel]
113
114
  packages = ["app","frontend"]
@@ -22,13 +22,15 @@ from click.core import ParameterSource
22
22
  from rich.console import Console
23
23
  from rich.prompt import IntPrompt, Prompt
24
24
 
25
+ from ..utils.datastores import DATASTORE_TYPES
25
26
  from ..utils.gcp import verify_credentials, verify_vertex_connection
26
27
  from ..utils.logging import handle_cli_error
27
28
  from ..utils.template import (
28
29
  get_available_agents,
29
30
  get_template_path,
31
+ load_template_config,
30
32
  process_template,
31
- prompt_data_ingestion,
33
+ prompt_datastore_selection,
32
34
  prompt_deployment_target,
33
35
  )
34
36
 
@@ -46,7 +48,16 @@ console = Console()
46
48
  help="Deployment target name",
47
49
  )
48
50
  @click.option(
49
- "--include-data-ingestion", "-i", is_flag=True, help="Include data pipeline"
51
+ "--include-data-ingestion",
52
+ "-i",
53
+ is_flag=True,
54
+ help="Include data ingestion pipeline in the project",
55
+ )
56
+ @click.option(
57
+ "--datastore",
58
+ "-ds",
59
+ type=click.Choice(DATASTORE_TYPES),
60
+ help="Type of datastore to use for data ingestion (requires --include-data-ingestion)",
50
61
  )
51
62
  @click.option("--debug", is_flag=True, help="Enable debug logging")
52
63
  @click.option(
@@ -76,6 +87,7 @@ def create(
76
87
  agent: str | None,
77
88
  deployment_target: str | None,
78
89
  include_data_ingestion: bool,
90
+ datastore: str | None,
79
91
  debug: bool,
80
92
  output_dir: str | None,
81
93
  auto_approve: bool,
@@ -90,6 +102,23 @@ def create(
90
102
  console.print(
91
103
  "This tool will help you create an end-to-end production-ready AI agent in GCP!\n"
92
104
  )
105
+ # Validate project name
106
+ if len(project_name) > 26:
107
+ console.print(
108
+ f"Error: Project name '{project_name}' exceeds 26 characters. Please use a shorter name.",
109
+ style="bold red",
110
+ )
111
+ return
112
+
113
+ # Convert project name to lowercase
114
+ if any(char.isupper() for char in project_name):
115
+ original_name = project_name
116
+ project_name = project_name.lower()
117
+ console.print(
118
+ f"Warning: Project name '{original_name}' contains uppercase characters. "
119
+ f"Converting to lowercase: '{project_name}'",
120
+ style="bold yellow",
121
+ )
93
122
 
94
123
  # Setup debug logging if enabled
95
124
  if debug:
@@ -136,6 +165,38 @@ def create(
136
165
  if debug:
137
166
  logging.debug(f"Selected agent: {agent}")
138
167
 
168
+ # Data ingestion and datastore selection
169
+ if include_data_ingestion or datastore:
170
+ # If datastore is specified but include_data_ingestion is not, set it to True
171
+ include_data_ingestion = True
172
+
173
+ # If include_data_ingestion is True but no datastore is specified, prompt for it
174
+ if not datastore:
175
+ # Pass a flag to indicate this is from explicit CLI flag
176
+ datastore = prompt_datastore_selection(final_agent, from_cli_flag=True)
177
+
178
+ if debug:
179
+ logging.debug(f"Data ingestion enabled: {include_data_ingestion}")
180
+ logging.debug(f"Selected datastore type: {datastore}")
181
+ else:
182
+ # Check if the agent requires data ingestion
183
+ template_path = (
184
+ pathlib.Path(__file__).parent.parent.parent.parent
185
+ / "agents"
186
+ / final_agent
187
+ / "template"
188
+ )
189
+ config = load_template_config(template_path)
190
+ if config and config.get("settings", {}).get("requires_data_ingestion"):
191
+ include_data_ingestion = True
192
+ datastore = prompt_datastore_selection(final_agent)
193
+
194
+ if debug:
195
+ logging.debug(
196
+ f"Data ingestion required by agent: {include_data_ingestion}"
197
+ )
198
+ logging.debug(f"Selected datastore type: {datastore}")
199
+
139
200
  # Deployment target selection
140
201
  final_deployment = (
141
202
  deployment_target
@@ -145,12 +206,6 @@ def create(
145
206
  if debug:
146
207
  logging.debug(f"Selected deployment target: {final_deployment}")
147
208
 
148
- # Data pipeline selection
149
- include_data_ingestion = include_data_ingestion or prompt_data_ingestion(
150
- final_agent
151
- )
152
- if debug:
153
- logging.debug(f"Include data pipeline: {include_data_ingestion}")
154
209
  # Region confirmation (if not explicitly passed)
155
210
  if (
156
211
  not auto_approve
@@ -164,7 +219,6 @@ def create(
164
219
  logging.debug("Setting up GCP...")
165
220
 
166
221
  creds_info = {}
167
- # Check for uv installation if not skipping checks
168
222
  if not skip_checks:
169
223
  # Set up GCP environment
170
224
  try:
@@ -208,12 +262,16 @@ def create(
208
262
  project_name,
209
263
  deployment_target=final_deployment,
210
264
  include_data_ingestion=include_data_ingestion,
265
+ datastore=datastore,
211
266
  output_dir=destination_dir,
212
267
  )
213
268
 
269
+ # Replace region in all files if a different region was specified
270
+ if region != "us-central1":
271
+ replace_region_in_files(project_path, region, debug=debug)
272
+
214
273
  project_path = destination_dir / project_name
215
- # Determine the correct path to display to the user
216
- display_path = str(project_path) if output_dir else project_name
274
+ cd_path = project_path if output_dir else project_name
217
275
 
218
276
  if include_data_ingestion:
219
277
  project_id = creds_info.get("project", "")
@@ -222,23 +280,25 @@ def create(
222
280
  f"This agent uses a datastore for grounded responses.\n"
223
281
  f"The agent will work without data, but for optimal results:\n"
224
282
  f"1. Set up dev environment:\n"
225
- f" [white italic]`export PROJECT_ID={project_id} && cd {display_path} && make setup-dev-env`[/white italic]\n\n"
283
+ f" [white italic]`export PROJECT_ID={project_id} && cd {cd_path} && make setup-dev-env`[/white italic]\n\n"
226
284
  f" See deployment/README.md for more info\n"
227
285
  f"2. Run the data ingestion pipeline:\n"
228
- f" [white italic]`export PROJECT_ID={project_id} && cd {display_path} && make data-ingestion`[/white italic]\n\n"
286
+ f" [white italic]`export PROJECT_ID={project_id} && cd {cd_path} && make data-ingestion`[/white italic]\n\n"
229
287
  f" See data_ingestion/README.md for more info\n"
230
288
  f"[bold white]=================================[/bold white]\n"
231
289
  )
232
290
  console.print("\n> 👍 Done. Execute the following command to get started:")
233
291
 
234
- # Show the command to get started
292
+ console.print("\n> Success! Your agent project is ready.")
235
293
  console.print(
236
- f"[bold bright_green]cd {display_path} && make install && make playground[/]"
294
+ "\n📖 For more information on project structure, usage, and deployment, check out the README:"
295
+ )
296
+ console.print(f" [cyan]cat {cd_path}/README.md[/]")
297
+ # Determine the correct path to display based on whether output_dir was specified
298
+ console.print("\n🚀 To get started, run the following command:")
299
+ console.print(
300
+ f" [bold bright_green]cd {cd_path} && make install && make playground[/]"
237
301
  )
238
-
239
- # Replace region in all files if a different region was specified
240
- if region != "us-central1":
241
- replace_region_in_files(project_path, region, debug=debug)
242
302
  except Exception:
243
303
  if debug:
244
304
  logging.exception(