agent-starter-pack 0.0.1b0__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.0.1b0.dist-info/METADATA +143 -0
- agent_starter_pack-0.0.1b0.dist-info/RECORD +162 -0
- agent_starter_pack-0.0.1b0.dist-info/WHEEL +4 -0
- agent_starter_pack-0.0.1b0.dist-info/entry_points.txt +2 -0
- agent_starter_pack-0.0.1b0.dist-info/licenses/LICENSE +201 -0
- agents/agentic_rag_vertexai_search/README.md +22 -0
- agents/agentic_rag_vertexai_search/app/agent.py +145 -0
- agents/agentic_rag_vertexai_search/app/retrievers.py +79 -0
- agents/agentic_rag_vertexai_search/app/templates.py +53 -0
- agents/agentic_rag_vertexai_search/notebooks/evaluating_langgraph_agent.ipynb +1561 -0
- agents/agentic_rag_vertexai_search/template/.templateconfig.yaml +14 -0
- agents/agentic_rag_vertexai_search/tests/integration/test_agent.py +57 -0
- agents/crewai_coding_crew/README.md +34 -0
- agents/crewai_coding_crew/app/agent.py +86 -0
- agents/crewai_coding_crew/app/crew/config/agents.yaml +39 -0
- agents/crewai_coding_crew/app/crew/config/tasks.yaml +37 -0
- agents/crewai_coding_crew/app/crew/crew.py +71 -0
- agents/crewai_coding_crew/notebooks/evaluating_crewai_agent.ipynb +1571 -0
- agents/crewai_coding_crew/notebooks/evaluating_langgraph_agent.ipynb +1561 -0
- agents/crewai_coding_crew/template/.templateconfig.yaml +12 -0
- agents/crewai_coding_crew/tests/integration/test_agent.py +47 -0
- agents/langgraph_base_react/README.md +9 -0
- agents/langgraph_base_react/app/agent.py +73 -0
- agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb +1561 -0
- agents/langgraph_base_react/template/.templateconfig.yaml +13 -0
- agents/langgraph_base_react/tests/integration/test_agent.py +48 -0
- agents/multimodal_live_api/README.md +50 -0
- agents/multimodal_live_api/app/agent.py +86 -0
- agents/multimodal_live_api/app/server.py +193 -0
- agents/multimodal_live_api/app/templates.py +51 -0
- agents/multimodal_live_api/app/vector_store.py +55 -0
- agents/multimodal_live_api/template/.templateconfig.yaml +15 -0
- agents/multimodal_live_api/tests/integration/test_server_e2e.py +254 -0
- agents/multimodal_live_api/tests/load_test/load_test.py +40 -0
- agents/multimodal_live_api/tests/unit/test_server.py +143 -0
- src/base_template/.gitignore +197 -0
- src/base_template/Makefile +37 -0
- src/base_template/README.md +91 -0
- src/base_template/app/utils/tracing.py +143 -0
- src/base_template/app/utils/typing.py +115 -0
- src/base_template/deployment/README.md +123 -0
- src/base_template/deployment/cd/deploy-to-prod.yaml +98 -0
- src/base_template/deployment/cd/staging.yaml +215 -0
- src/base_template/deployment/ci/pr_checks.yaml +51 -0
- src/base_template/deployment/terraform/apis.tf +34 -0
- src/base_template/deployment/terraform/build_triggers.tf +122 -0
- src/base_template/deployment/terraform/dev/apis.tf +42 -0
- src/base_template/deployment/terraform/dev/iam.tf +90 -0
- src/base_template/deployment/terraform/dev/log_sinks.tf +66 -0
- src/base_template/deployment/terraform/dev/providers.tf +29 -0
- src/base_template/deployment/terraform/dev/storage.tf +76 -0
- src/base_template/deployment/terraform/dev/variables.tf +126 -0
- src/base_template/deployment/terraform/dev/vars/env.tfvars +21 -0
- src/base_template/deployment/terraform/iam.tf +130 -0
- src/base_template/deployment/terraform/locals.tf +50 -0
- src/base_template/deployment/terraform/log_sinks.tf +72 -0
- src/base_template/deployment/terraform/providers.tf +35 -0
- src/base_template/deployment/terraform/service_accounts.tf +42 -0
- src/base_template/deployment/terraform/storage.tf +100 -0
- src/base_template/deployment/terraform/variables.tf +202 -0
- src/base_template/deployment/terraform/vars/env.tfvars +43 -0
- src/base_template/pyproject.toml +113 -0
- src/base_template/tests/unit/test_utils/test_tracing_exporter.py +140 -0
- src/cli/commands/create.py +534 -0
- src/cli/commands/setup_cicd.py +730 -0
- src/cli/main.py +35 -0
- src/cli/utils/__init__.py +35 -0
- src/cli/utils/cicd.py +662 -0
- src/cli/utils/gcp.py +120 -0
- src/cli/utils/logging.py +51 -0
- src/cli/utils/template.py +644 -0
- src/data_ingestion/README.md +79 -0
- src/data_ingestion/data_ingestion_pipeline/components/ingest_data.py +175 -0
- src/data_ingestion/data_ingestion_pipeline/components/process_data.py +321 -0
- src/data_ingestion/data_ingestion_pipeline/pipeline.py +58 -0
- src/data_ingestion/data_ingestion_pipeline/submit_pipeline.py +184 -0
- src/data_ingestion/pyproject.toml +17 -0
- src/data_ingestion/uv.lock +999 -0
- src/deployment_targets/agent_engine/app/agent_engine_app.py +238 -0
- src/deployment_targets/agent_engine/app/utils/gcs.py +42 -0
- src/deployment_targets/agent_engine/deployment_metadata.json +4 -0
- src/deployment_targets/agent_engine/notebooks/intro_reasoning_engine.ipynb +869 -0
- src/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py +120 -0
- src/deployment_targets/agent_engine/tests/load_test/.results/.placeholder +0 -0
- src/deployment_targets/agent_engine/tests/load_test/.results/report.html +264 -0
- src/deployment_targets/agent_engine/tests/load_test/.results/results_exceptions.csv +1 -0
- src/deployment_targets/agent_engine/tests/load_test/.results/results_failures.csv +1 -0
- src/deployment_targets/agent_engine/tests/load_test/.results/results_stats.csv +3 -0
- src/deployment_targets/agent_engine/tests/load_test/.results/results_stats_history.csv +22 -0
- src/deployment_targets/agent_engine/tests/load_test/README.md +42 -0
- src/deployment_targets/agent_engine/tests/load_test/load_test.py +100 -0
- src/deployment_targets/agent_engine/tests/unit/test_dummy.py +22 -0
- src/deployment_targets/cloud_run/Dockerfile +29 -0
- src/deployment_targets/cloud_run/app/server.py +128 -0
- src/deployment_targets/cloud_run/deployment/terraform/artifact_registry.tf +22 -0
- src/deployment_targets/cloud_run/deployment/terraform/dev/service_accounts.tf +20 -0
- src/deployment_targets/cloud_run/tests/integration/test_server_e2e.py +192 -0
- src/deployment_targets/cloud_run/tests/load_test/.results/.placeholder +0 -0
- src/deployment_targets/cloud_run/tests/load_test/README.md +79 -0
- src/deployment_targets/cloud_run/tests/load_test/load_test.py +85 -0
- src/deployment_targets/cloud_run/tests/unit/test_server.py +142 -0
- src/deployment_targets/cloud_run/uv.lock +6952 -0
- src/frontends/live_api_react/frontend/package-lock.json +19405 -0
- src/frontends/live_api_react/frontend/package.json +56 -0
- src/frontends/live_api_react/frontend/public/favicon.ico +0 -0
- src/frontends/live_api_react/frontend/public/index.html +62 -0
- src/frontends/live_api_react/frontend/public/robots.txt +3 -0
- src/frontends/live_api_react/frontend/src/App.scss +189 -0
- src/frontends/live_api_react/frontend/src/App.test.tsx +25 -0
- src/frontends/live_api_react/frontend/src/App.tsx +205 -0
- src/frontends/live_api_react/frontend/src/components/audio-pulse/AudioPulse.tsx +64 -0
- src/frontends/live_api_react/frontend/src/components/audio-pulse/audio-pulse.scss +68 -0
- src/frontends/live_api_react/frontend/src/components/control-tray/ControlTray.tsx +217 -0
- src/frontends/live_api_react/frontend/src/components/control-tray/control-tray.scss +201 -0
- src/frontends/live_api_react/frontend/src/components/logger/Logger.tsx +241 -0
- src/frontends/live_api_react/frontend/src/components/logger/logger.scss +133 -0
- src/frontends/live_api_react/frontend/src/components/logger/mock-logs.ts +151 -0
- src/frontends/live_api_react/frontend/src/components/side-panel/SidePanel.tsx +161 -0
- src/frontends/live_api_react/frontend/src/components/side-panel/side-panel.scss +285 -0
- src/frontends/live_api_react/frontend/src/contexts/LiveAPIContext.tsx +48 -0
- src/frontends/live_api_react/frontend/src/hooks/use-live-api.ts +115 -0
- src/frontends/live_api_react/frontend/src/hooks/use-media-stream-mux.ts +23 -0
- src/frontends/live_api_react/frontend/src/hooks/use-screen-capture.ts +72 -0
- src/frontends/live_api_react/frontend/src/hooks/use-webcam.ts +69 -0
- src/frontends/live_api_react/frontend/src/index.css +28 -0
- src/frontends/live_api_react/frontend/src/index.tsx +35 -0
- src/frontends/live_api_react/frontend/src/multimodal-live-types.ts +242 -0
- src/frontends/live_api_react/frontend/src/react-app-env.d.ts +17 -0
- src/frontends/live_api_react/frontend/src/reportWebVitals.ts +31 -0
- src/frontends/live_api_react/frontend/src/setupTests.ts +21 -0
- src/frontends/live_api_react/frontend/src/utils/audio-recorder.ts +111 -0
- src/frontends/live_api_react/frontend/src/utils/audio-streamer.ts +270 -0
- src/frontends/live_api_react/frontend/src/utils/audioworklet-registry.ts +43 -0
- src/frontends/live_api_react/frontend/src/utils/multimodal-live-client.ts +329 -0
- src/frontends/live_api_react/frontend/src/utils/store-logger.ts +64 -0
- src/frontends/live_api_react/frontend/src/utils/utils.ts +86 -0
- src/frontends/live_api_react/frontend/src/utils/worklets/audio-processing.ts +73 -0
- src/frontends/live_api_react/frontend/src/utils/worklets/vol-meter.ts +65 -0
- src/frontends/live_api_react/frontend/tsconfig.json +25 -0
- src/frontends/streamlit/frontend/side_bar.py +213 -0
- src/frontends/streamlit/frontend/streamlit_app.py +263 -0
- src/frontends/streamlit/frontend/style/app_markdown.py +37 -0
- src/frontends/streamlit/frontend/utils/chat_utils.py +67 -0
- src/frontends/streamlit/frontend/utils/local_chat_history.py +125 -0
- src/frontends/streamlit/frontend/utils/message_editing.py +59 -0
- src/frontends/streamlit/frontend/utils/multimodal_utils.py +217 -0
- src/frontends/streamlit/frontend/utils/stream_handler.py +282 -0
- src/frontends/streamlit/frontend/utils/title_summary.py +77 -0
- src/resources/containers/data_processing/Dockerfile +25 -0
- src/resources/locks/uv-agentic_rag_vertexai_search-agent_engine.lock +4684 -0
- src/resources/locks/uv-agentic_rag_vertexai_search-cloud_run.lock +5799 -0
- src/resources/locks/uv-crewai_coding_crew-agent_engine.lock +5509 -0
- src/resources/locks/uv-crewai_coding_crew-cloud_run.lock +6688 -0
- src/resources/locks/uv-langgraph_base_react-agent_engine.lock +4595 -0
- src/resources/locks/uv-langgraph_base_react-cloud_run.lock +5710 -0
- src/resources/locks/uv-multimodal_live_api-cloud_run.lock +5665 -0
- src/resources/setup_cicd/cicd_variables.tf +36 -0
- src/resources/setup_cicd/github.tf +85 -0
- src/resources/setup_cicd/providers.tf +39 -0
- src/utils/generate_locks.py +135 -0
- src/utils/lock_utils.py +82 -0
- src/utils/watch_and_rebuild.py +190 -0
|
@@ -0,0 +1,184 @@
|
|
|
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 argparse
|
|
16
|
+
import logging
|
|
17
|
+
import os
|
|
18
|
+
import sys
|
|
19
|
+
|
|
20
|
+
from data_ingestion_pipeline.pipeline import pipeline
|
|
21
|
+
from google.cloud import aiplatform
|
|
22
|
+
from kfp import compiler
|
|
23
|
+
|
|
24
|
+
PIPELINE_FILE_NAME = "data_processing_pipeline.json"
|
|
25
|
+
|
|
26
|
+
# Configure logging
|
|
27
|
+
logging.basicConfig(
|
|
28
|
+
level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
29
|
+
)
|
|
30
|
+
logger = logging.getLogger(__name__)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def parse_args() -> argparse.Namespace:
|
|
34
|
+
"""Parse command line arguments for pipeline configuration."""
|
|
35
|
+
|
|
36
|
+
parser = argparse.ArgumentParser(description="Pipeline configuration")
|
|
37
|
+
parser.add_argument(
|
|
38
|
+
"--project-id", default=os.getenv("PROJECT_ID"), help="GCP Project ID"
|
|
39
|
+
)
|
|
40
|
+
parser.add_argument(
|
|
41
|
+
"--region", default=os.getenv("REGION"), help="Vertex AI Pipelines region"
|
|
42
|
+
)
|
|
43
|
+
parser.add_argument(
|
|
44
|
+
"--data-store-region",
|
|
45
|
+
default=os.getenv("DATA_STORE_REGION"),
|
|
46
|
+
help="Data Store region",
|
|
47
|
+
)
|
|
48
|
+
parser.add_argument(
|
|
49
|
+
"--data-store-id", default=os.getenv("DATA_STORE_ID"), help="Data store ID"
|
|
50
|
+
)
|
|
51
|
+
parser.add_argument(
|
|
52
|
+
"--service-account",
|
|
53
|
+
default=os.getenv("SERVICE_ACCOUNT"),
|
|
54
|
+
help="Service account",
|
|
55
|
+
)
|
|
56
|
+
parser.add_argument(
|
|
57
|
+
"--pipeline-root",
|
|
58
|
+
default=os.getenv("PIPELINE_ROOT"),
|
|
59
|
+
help="Pipeline root directory",
|
|
60
|
+
)
|
|
61
|
+
parser.add_argument(
|
|
62
|
+
"--pipeline-name", default=os.getenv("PIPELINE_NAME"), help="Pipeline name"
|
|
63
|
+
)
|
|
64
|
+
parser.add_argument(
|
|
65
|
+
"--disable-caching",
|
|
66
|
+
type=bool,
|
|
67
|
+
default=os.getenv("DISABLE_CACHING", "false").lower() == "true",
|
|
68
|
+
help="Enable pipeline caching",
|
|
69
|
+
)
|
|
70
|
+
parser.add_argument(
|
|
71
|
+
"--cron-schedule",
|
|
72
|
+
default=os.getenv("CRON_SCHEDULE", None),
|
|
73
|
+
help="Cron schedule",
|
|
74
|
+
)
|
|
75
|
+
parser.add_argument(
|
|
76
|
+
"--schedule-only",
|
|
77
|
+
type=bool,
|
|
78
|
+
default=os.getenv("SCHEDULE_ONLY", "false").lower() == "true",
|
|
79
|
+
help="Schedule only (do not submit)",
|
|
80
|
+
)
|
|
81
|
+
parsed_args = parser.parse_args()
|
|
82
|
+
|
|
83
|
+
# Validate required parameters
|
|
84
|
+
missing_params = []
|
|
85
|
+
required_params = {
|
|
86
|
+
"project_id": parsed_args.project_id,
|
|
87
|
+
"region": parsed_args.region,
|
|
88
|
+
"data_store_region": parsed_args.data_store_region,
|
|
89
|
+
"data_store_id": parsed_args.data_store_id,
|
|
90
|
+
"service_account": parsed_args.service_account,
|
|
91
|
+
"pipeline_root": parsed_args.pipeline_root,
|
|
92
|
+
"pipeline_name": parsed_args.pipeline_name,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
for param_name, param_value in required_params.items():
|
|
96
|
+
if param_value is None:
|
|
97
|
+
missing_params.append(param_name)
|
|
98
|
+
|
|
99
|
+
if missing_params:
|
|
100
|
+
logging.error("Error: The following required parameters are missing:")
|
|
101
|
+
for param in missing_params:
|
|
102
|
+
logging.error(f" - {param}")
|
|
103
|
+
logging.error(
|
|
104
|
+
"\nPlease provide these parameters either through environment variables or command line arguments."
|
|
105
|
+
)
|
|
106
|
+
sys.exit(1)
|
|
107
|
+
|
|
108
|
+
return parsed_args
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
if __name__ == "__main__":
|
|
112
|
+
args = parse_args()
|
|
113
|
+
|
|
114
|
+
if args.schedule_only and not args.cron_schedule:
|
|
115
|
+
logging.error("Missing --cron-schedule argument for scheduling")
|
|
116
|
+
sys.exit(1)
|
|
117
|
+
|
|
118
|
+
# Print configuration
|
|
119
|
+
logging.info("\nConfiguration:")
|
|
120
|
+
logging.info("--------------")
|
|
121
|
+
logging.info(f"project_id: {args.project_id}")
|
|
122
|
+
logging.info(f"region: {args.region}")
|
|
123
|
+
logging.info(f"region_data_store: {args.data_store_region}")
|
|
124
|
+
logging.info(f"data_store_id: {args.data_store_id}")
|
|
125
|
+
logging.info(f"service_account: {args.service_account}")
|
|
126
|
+
logging.info(f"pipeline_root: {args.pipeline_root}")
|
|
127
|
+
logging.info(f"cron_schedule: {args.cron_schedule}")
|
|
128
|
+
logging.info(f"pipeline_name: {args.pipeline_name}")
|
|
129
|
+
logging.info(f"disable_caching: {args.disable_caching}")
|
|
130
|
+
logging.info(f"schedule_only: {args.schedule_only}")
|
|
131
|
+
logging.info("--------------\n")
|
|
132
|
+
|
|
133
|
+
compiler.Compiler().compile(pipeline_func=pipeline, package_path=PIPELINE_FILE_NAME)
|
|
134
|
+
# Create common pipeline job parameters
|
|
135
|
+
pipeline_job_params = {
|
|
136
|
+
"display_name": args.pipeline_name,
|
|
137
|
+
"template_path": PIPELINE_FILE_NAME,
|
|
138
|
+
"pipeline_root": args.pipeline_root,
|
|
139
|
+
"project": args.project_id,
|
|
140
|
+
"enable_caching": (not args.disable_caching),
|
|
141
|
+
"location": args.region,
|
|
142
|
+
"parameter_values": {
|
|
143
|
+
"project_id": args.project_id,
|
|
144
|
+
"location": args.region,
|
|
145
|
+
"data_store_region": args.data_store_region,
|
|
146
|
+
"data_store_id": args.data_store_id,
|
|
147
|
+
},
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
# Create pipeline job instance
|
|
151
|
+
job = aiplatform.PipelineJob(**pipeline_job_params)
|
|
152
|
+
|
|
153
|
+
if not args.schedule_only:
|
|
154
|
+
logging.info("Running pipeline and waiting for completion...")
|
|
155
|
+
job.submit(service_account=args.service_account)
|
|
156
|
+
job.wait()
|
|
157
|
+
logging.info("Pipeline completed!")
|
|
158
|
+
|
|
159
|
+
if args.cron_schedule and args.schedule_only:
|
|
160
|
+
# No need to create new job instance since we already have one with the same params
|
|
161
|
+
pipeline_job_schedule = aiplatform.PipelineJobSchedule(
|
|
162
|
+
pipeline_job=job,
|
|
163
|
+
display_name=f"{args.pipeline_name} Weekly Ingestion Job",
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
schedule_list = pipeline_job_schedule.list(
|
|
167
|
+
filter=f'display_name="{args.pipeline_name} Weekly Ingestion Job"',
|
|
168
|
+
project=args.project_id,
|
|
169
|
+
location=args.region,
|
|
170
|
+
)
|
|
171
|
+
logging.info("Schedule lists found: %s", schedule_list)
|
|
172
|
+
if not schedule_list:
|
|
173
|
+
pipeline_job_schedule.create(
|
|
174
|
+
cron=args.cron_schedule, service_account=args.service_account
|
|
175
|
+
)
|
|
176
|
+
logging.info("Schedule created")
|
|
177
|
+
else:
|
|
178
|
+
schedule_list[0].update(cron=args.cron_schedule)
|
|
179
|
+
logging.info("Schedule updated")
|
|
180
|
+
|
|
181
|
+
# Clean up pipeline file
|
|
182
|
+
if os.path.exists(PIPELINE_FILE_NAME):
|
|
183
|
+
os.remove(PIPELINE_FILE_NAME)
|
|
184
|
+
logging.info(f"Deleted {PIPELINE_FILE_NAME}")
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "data-ingestion-pipeline"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Data ingestion pipeline for RAG retriever"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.9, <=3.13"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"google-cloud-aiplatform>=1.80.0",
|
|
9
|
+
"kfp>=1.4.0",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
[build-system]
|
|
13
|
+
requires = ["hatchling"]
|
|
14
|
+
build-backend = "hatchling.build"
|
|
15
|
+
|
|
16
|
+
[tool.hatch.build.targets.wheel]
|
|
17
|
+
packages = ["data_ingestion_pipeline"]
|