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.
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/METADATA +6 -6
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/RECORD +78 -78
- agents/{agentic_rag_vertexai_search → agentic_rag}/README.md +3 -3
- agents/{agentic_rag_vertexai_search → agentic_rag}/app/agent.py +22 -6
- agents/agentic_rag/app/retrievers.py +132 -0
- agents/{agentic_rag_vertexai_search → agentic_rag}/notebooks/evaluating_langgraph_agent.ipynb +3 -3
- agents/{agentic_rag_vertexai_search → agentic_rag}/template/.templateconfig.yaml +3 -5
- agents/crewai_coding_crew/notebooks/evaluating_crewai_agent.ipynb +4 -4
- agents/crewai_coding_crew/notebooks/evaluating_langgraph_agent.ipynb +3 -3
- agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb +3 -3
- agents/{multimodal_live_api → live_api}/README.md +7 -0
- agents/{multimodal_live_api → live_api}/app/agent.py +3 -11
- agents/{multimodal_live_api → live_api}/app/server.py +3 -2
- agents/{multimodal_live_api → live_api}/template/.templateconfig.yaml +2 -2
- src/base_template/Makefile +12 -7
- src/base_template/README.md +71 -71
- src/base_template/app/utils/tracing.py +3 -1
- src/base_template/app/utils/typing.py +1 -0
- src/base_template/deployment/cd/deploy-to-prod.yaml +10 -4
- src/base_template/deployment/cd/staging.yaml +11 -10
- src/base_template/deployment/ci/pr_checks.yaml +1 -1
- src/base_template/deployment/terraform/apis.tf +6 -0
- src/base_template/deployment/terraform/build_triggers.tf +34 -21
- src/base_template/deployment/terraform/dev/iam.tf +13 -6
- src/base_template/deployment/terraform/dev/log_sinks.tf +25 -28
- src/base_template/deployment/terraform/dev/providers.tf +1 -0
- src/base_template/deployment/terraform/dev/storage.tf +69 -11
- src/base_template/deployment/terraform/dev/variables.tf +50 -53
- src/base_template/deployment/terraform/dev/vars/env.tfvars +13 -11
- src/base_template/deployment/terraform/iam.tf +3 -3
- src/base_template/deployment/terraform/log_sinks.tf +24 -26
- src/base_template/deployment/terraform/providers.tf +2 -0
- src/base_template/deployment/terraform/service_accounts.tf +7 -7
- src/base_template/deployment/terraform/storage.tf +123 -11
- src/base_template/deployment/terraform/variables.tf +49 -70
- src/base_template/deployment/terraform/vars/env.tfvars +12 -17
- src/base_template/pyproject.toml +4 -3
- src/cli/commands/create.py +79 -19
- src/cli/commands/setup_cicd.py +91 -22
- src/cli/main.py +3 -1
- src/cli/utils/__init__.py +9 -2
- src/cli/utils/cicd.py +12 -0
- src/cli/utils/datastores.py +32 -0
- src/cli/utils/gcp.py +4 -6
- src/cli/utils/template.py +127 -45
- src/cli/utils/version.py +87 -0
- src/data_ingestion/README.md +24 -19
- src/data_ingestion/data_ingestion_pipeline/components/ingest_data.py +135 -2
- src/data_ingestion/data_ingestion_pipeline/components/process_data.py +276 -2
- src/data_ingestion/data_ingestion_pipeline/pipeline.py +28 -5
- src/data_ingestion/data_ingestion_pipeline/submit_pipeline.py +49 -14
- src/data_ingestion/pyproject.toml +1 -0
- src/deployment_targets/agent_engine/app/agent_engine_app.py +3 -1
- src/deployment_targets/cloud_run/tests/unit/test_server.py +15 -33
- src/frontends/live_api_react/frontend/package-lock.json +226 -186
- src/frontends/live_api_react/frontend/package.json +1 -1
- src/frontends/streamlit/frontend/utils/stream_handler.py +5 -5
- src/resources/containers/data_processing/Dockerfile +3 -1
- src/resources/locks/{uv-agentic_rag_vertexai_search-agent_engine.lock → uv-agentic_rag-agent_engine.lock} +747 -694
- src/resources/locks/{uv-agentic_rag_vertexai_search-cloud_run.lock → uv-agentic_rag-cloud_run.lock} +944 -806
- src/resources/locks/uv-crewai_coding_crew-agent_engine.lock +651 -694
- src/resources/locks/uv-crewai_coding_crew-cloud_run.lock +813 -789
- src/resources/locks/uv-langgraph_base_react-agent_engine.lock +666 -686
- src/resources/locks/uv-langgraph_base_react-cloud_run.lock +848 -798
- src/resources/locks/{uv-multimodal_live_api-cloud_run.lock → uv-live_api-cloud_run.lock} +856 -791
- src/resources/setup_cicd/cicd_variables.tf +5 -0
- src/resources/setup_cicd/github.tf +4 -2
- src/utils/watch_and_rebuild.py +14 -0
- agents/agentic_rag_vertexai_search/app/retrievers.py +0 -79
- src/deployment_targets/cloud_run/deployment/terraform/artifact_registry.tf +0 -22
- src/deployment_targets/cloud_run/deployment/terraform/dev/service_accounts.tf +0 -20
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/entry_points.txt +0 -0
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/licenses/LICENSE +0 -0
- /agents/{agentic_rag_vertexai_search → agentic_rag}/app/templates.py +0 -0
- /agents/{agentic_rag_vertexai_search → agentic_rag}/tests/integration/test_agent.py +0 -0
- /agents/{multimodal_live_api → live_api}/app/templates.py +0 -0
- /agents/{multimodal_live_api → live_api}/app/vector_store.py +0 -0
- /agents/{multimodal_live_api → live_api}/tests/integration/test_server_e2e.py +0 -0
- /agents/{multimodal_live_api → live_api}/tests/load_test/load_test.py +0 -0
- /agents/{multimodal_live_api → live_api}/tests/unit/test_server.py +0 -0
|
@@ -46,12 +46,13 @@ locals {
|
|
|
46
46
|
|
|
47
47
|
# Try to get existing repo
|
|
48
48
|
data "github_repository" "existing_repo" {
|
|
49
|
+
count = var.repository_exists ? 1 : 0
|
|
49
50
|
full_name = "${var.repository_owner}/${var.repository_name}"
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
# Only create GitHub repo if it doesn't already exist
|
|
53
54
|
resource "github_repository" "repo" {
|
|
54
|
-
count =
|
|
55
|
+
count = var.repository_exists ? 0 : 1
|
|
55
56
|
name = var.repository_name
|
|
56
57
|
description = "Repository created by Terraform"
|
|
57
58
|
visibility = "private"
|
|
@@ -80,6 +81,7 @@ resource "google_cloudbuildv2_repository" "repo" {
|
|
|
80
81
|
resource.google_project_service.cicd_services,
|
|
81
82
|
resource.google_project_service.shared_services,
|
|
82
83
|
data.github_repository.existing_repo,
|
|
83
|
-
github_repository.repo
|
|
84
|
+
github_repository.repo,
|
|
85
|
+
google_cloudbuildv2_connection.github_connection,
|
|
84
86
|
]
|
|
85
87
|
}
|
src/utils/watch_and_rebuild.py
CHANGED
|
@@ -34,12 +34,14 @@ class TemplateHandler(FileSystemEventHandler):
|
|
|
34
34
|
deployment_target: str,
|
|
35
35
|
output_dir: str | None,
|
|
36
36
|
region: str,
|
|
37
|
+
extra_params: str | None = None,
|
|
37
38
|
):
|
|
38
39
|
self.agent_name = agent_name
|
|
39
40
|
self.project_name = project_name
|
|
40
41
|
self.deployment_target = deployment_target
|
|
41
42
|
self.output_dir = output_dir
|
|
42
43
|
self.region = region
|
|
44
|
+
self.extra_params = extra_params
|
|
43
45
|
self.last_rebuild = 0
|
|
44
46
|
self.rebuild_cooldown = 1 # Seconds to wait between rebuilds
|
|
45
47
|
|
|
@@ -91,6 +93,13 @@ class TemplateHandler(FileSystemEventHandler):
|
|
|
91
93
|
"--region",
|
|
92
94
|
self.region,
|
|
93
95
|
]
|
|
96
|
+
|
|
97
|
+
# Add extra parameters if provided
|
|
98
|
+
if self.extra_params:
|
|
99
|
+
# Split comma-separated parameters and add them individually
|
|
100
|
+
for param in self.extra_params.split(','):
|
|
101
|
+
cmd.append(param.strip())
|
|
102
|
+
|
|
94
103
|
console.print(f"Executing: {' '.join(cmd)}", style="bold blue")
|
|
95
104
|
subprocess.run(cmd, check=True)
|
|
96
105
|
|
|
@@ -115,6 +124,7 @@ class TemplateHandler(FileSystemEventHandler):
|
|
|
115
124
|
)
|
|
116
125
|
@click.option("--debug", is_flag=True, help="Enable debug logging")
|
|
117
126
|
@click.option("--region", default="us-central1", help="GCP region to use")
|
|
127
|
+
@click.option("--extra-params", help="Additional parameters to pass to the create command")
|
|
118
128
|
def watch(
|
|
119
129
|
agent: str,
|
|
120
130
|
project_name: str,
|
|
@@ -122,6 +132,7 @@ def watch(
|
|
|
122
132
|
output_dir: str | None,
|
|
123
133
|
debug: bool,
|
|
124
134
|
region: str,
|
|
135
|
+
extra_params: str | None,
|
|
125
136
|
):
|
|
126
137
|
"""
|
|
127
138
|
Watch a agent's template and automatically rebuild when changes are detected.
|
|
@@ -155,6 +166,8 @@ def watch(
|
|
|
155
166
|
console.print(f"agents directory: {agents_dir}")
|
|
156
167
|
console.print(f"Project name: {project_name}")
|
|
157
168
|
console.print(f"Region: {region}")
|
|
169
|
+
if extra_params:
|
|
170
|
+
console.print(f"Extra parameters: {extra_params}")
|
|
158
171
|
|
|
159
172
|
event_handler = TemplateHandler(
|
|
160
173
|
agent_name=agent,
|
|
@@ -162,6 +175,7 @@ def watch(
|
|
|
162
175
|
deployment_target=deployment_target,
|
|
163
176
|
output_dir=output_dir,
|
|
164
177
|
region=region,
|
|
178
|
+
extra_params=extra_params,
|
|
165
179
|
)
|
|
166
180
|
|
|
167
181
|
observer = Observer()
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 Google LLC
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
import os
|
|
16
|
-
from unittest.mock import MagicMock
|
|
17
|
-
|
|
18
|
-
from langchain_google_community import VertexAISearchRetriever
|
|
19
|
-
from langchain_google_community.vertex_rank import VertexAIRank
|
|
20
|
-
from langchain_google_vertexai import VertexAIEmbeddings
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def get_retriever(
|
|
24
|
-
project_id: str,
|
|
25
|
-
data_store_id: str,
|
|
26
|
-
data_store_region: str,
|
|
27
|
-
embedding: VertexAIEmbeddings,
|
|
28
|
-
embedding_column: str = "embedding",
|
|
29
|
-
max_documents: int = 10,
|
|
30
|
-
custom_embedding_ratio: float = 0.5,
|
|
31
|
-
) -> VertexAISearchRetriever:
|
|
32
|
-
"""
|
|
33
|
-
Creates and returns an instance of the retriever service.
|
|
34
|
-
|
|
35
|
-
Uses mock service if the INTEGRATION_TEST environment variable is set to "TRUE",
|
|
36
|
-
otherwise initializes real Vertex AI retriever.
|
|
37
|
-
"""
|
|
38
|
-
if os.getenv("INTEGRATION_TEST") == "TRUE":
|
|
39
|
-
retriever = MagicMock()
|
|
40
|
-
retriever.invoke = lambda x: []
|
|
41
|
-
return retriever
|
|
42
|
-
|
|
43
|
-
return VertexAISearchRetriever(
|
|
44
|
-
project_id=project_id,
|
|
45
|
-
data_store_id=data_store_id,
|
|
46
|
-
location_id=data_store_region,
|
|
47
|
-
engine_data_type=1,
|
|
48
|
-
# The following parameters are used when you want to search
|
|
49
|
-
# using custom embeddings in Agent Builder.
|
|
50
|
-
# The ratio is set to 0.5 by default to use a mix of custom
|
|
51
|
-
# embeddings but you can adapt the ratio as you need.
|
|
52
|
-
custom_embedding_ratio=custom_embedding_ratio,
|
|
53
|
-
custom_embedding=embedding,
|
|
54
|
-
custom_embedding_field_path=embedding_column,
|
|
55
|
-
# Extracting 20 documents before re-rank.
|
|
56
|
-
max_documents=max_documents,
|
|
57
|
-
beta=True,
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def get_compressor(project_id: str, top_n: int = 5) -> VertexAIRank:
|
|
62
|
-
"""
|
|
63
|
-
Creates and returns an instance of the compressor service.
|
|
64
|
-
|
|
65
|
-
Uses mock service if the INTEGRATION_TEST environment variable is set to "TRUE",
|
|
66
|
-
otherwise initializes real Vertex AI compressor.
|
|
67
|
-
"""
|
|
68
|
-
if os.getenv("INTEGRATION_TEST") == "TRUE":
|
|
69
|
-
compressor = MagicMock()
|
|
70
|
-
compressor.compress_documents = lambda documents, query: []
|
|
71
|
-
return compressor
|
|
72
|
-
|
|
73
|
-
return VertexAIRank(
|
|
74
|
-
project_id=project_id,
|
|
75
|
-
location_id="global",
|
|
76
|
-
ranking_config="default_ranking_config",
|
|
77
|
-
title_field="id",
|
|
78
|
-
top_n=top_n,
|
|
79
|
-
)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 Google LLC
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
resource "google_artifact_registry_repository" "repo-artifacts-genai" {
|
|
16
|
-
location = var.region
|
|
17
|
-
repository_id = var.artifact_registry_repo_name
|
|
18
|
-
description = "Repo for Generative AI applications"
|
|
19
|
-
format = "DOCKER"
|
|
20
|
-
project = var.cicd_runner_project_id
|
|
21
|
-
depends_on = [resource.google_project_service.cicd_services, resource.google_project_service.shared_services]
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 Google LLC
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
resource "google_service_account" "cloud_run_app_sa" {
|
|
16
|
-
account_id = var.cloud_run_app_sa_name
|
|
17
|
-
display_name = "Cloud Run Generative AI app SA"
|
|
18
|
-
project = var.dev_project_id
|
|
19
|
-
depends_on = [resource.google_project_service.services]
|
|
20
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|