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
|
@@ -0,0 +1,85 @@
|
|
|
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 datetime
|
|
16
|
+
import json
|
|
17
|
+
import logging
|
|
18
|
+
from typing import Any
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def parse_env_vars(env_vars_string: str | None) -> dict[str, str]:
|
|
22
|
+
"""Parse environment variables from a comma-separated KEY=VALUE string.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
env_vars_string: Comma-separated list of environment variables in KEY=VALUE format
|
|
26
|
+
|
|
27
|
+
Returns:
|
|
28
|
+
Dictionary of environment variables with keys and values stripped of whitespace
|
|
29
|
+
"""
|
|
30
|
+
env_vars = {}
|
|
31
|
+
if env_vars_string:
|
|
32
|
+
for pair in env_vars_string.split(","):
|
|
33
|
+
if "=" in pair:
|
|
34
|
+
key, value = pair.split("=", 1)
|
|
35
|
+
env_vars[key.strip()] = value.strip()
|
|
36
|
+
else:
|
|
37
|
+
logging.warning(f"Skipping malformed environment variable pair: {pair}")
|
|
38
|
+
return env_vars
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def write_deployment_metadata(
|
|
42
|
+
remote_agent: Any,
|
|
43
|
+
metadata_file: str = "deployment_metadata.json",
|
|
44
|
+
) -> None:
|
|
45
|
+
"""Write deployment metadata to file.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
remote_agent: The deployed agent engine resource
|
|
49
|
+
metadata_file: Path to write the metadata JSON file
|
|
50
|
+
"""
|
|
51
|
+
metadata = {
|
|
52
|
+
"remote_agent_engine_id": remote_agent.api_resource.name,
|
|
53
|
+
"deployment_timestamp": datetime.datetime.now().isoformat(),
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
with open(metadata_file, "w") as f:
|
|
57
|
+
json.dump(metadata, f, indent=2)
|
|
58
|
+
|
|
59
|
+
logging.info(f"Agent Engine ID written to {metadata_file}")
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def print_deployment_success(
|
|
63
|
+
remote_agent: Any,
|
|
64
|
+
location: str,
|
|
65
|
+
project: str,
|
|
66
|
+
) -> None:
|
|
67
|
+
"""Print deployment success message with console URL.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
remote_agent: The deployed agent engine resource
|
|
71
|
+
location: GCP region where the agent was deployed
|
|
72
|
+
project: GCP project ID
|
|
73
|
+
"""
|
|
74
|
+
# Extract agent engine ID for console URL
|
|
75
|
+
agent_engine_id = remote_agent.api_resource.name.split("/")[-1]
|
|
76
|
+
console_url = f"https://console.cloud.google.com/vertex-ai/agents/locations/{location}/agent-engines/{agent_engine_id}?project={project}"
|
|
77
|
+
|
|
78
|
+
{%- if "adk" in cookiecutter.tags %}
|
|
79
|
+
print(
|
|
80
|
+
f"\n✅ Deployment successful! Test your agent: notebooks/adk_app_testing.ipynb"
|
|
81
|
+
f"\n📊 View in console: {console_url}\n"
|
|
82
|
+
)
|
|
83
|
+
{%- else %}
|
|
84
|
+
print(f"\n✅ Deployment successful!\n📊 View in console: {console_url}\n")
|
|
85
|
+
{%- endif %}
|