agent-starter-pack 0.0.9b0__py3-none-any.whl → 0.0.11b0__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.9b0.dist-info → agent_starter_pack-0.0.11b0.dist-info}/METADATA +1 -2
- {agent_starter_pack-0.0.9b0.dist-info → agent_starter_pack-0.0.11b0.dist-info}/RECORD +9 -9
- src/base_template/Makefile +4 -3
- src/base_template/README.md +12 -2
- src/cli/commands/create.py +11 -25
- src/cli/main.py +27 -5
- {agent_starter_pack-0.0.9b0.dist-info → agent_starter_pack-0.0.11b0.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.0.9b0.dist-info → agent_starter_pack-0.0.11b0.dist-info}/entry_points.txt +0 -0
- {agent_starter_pack-0.0.9b0.dist-info → agent_starter_pack-0.0.11b0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-starter-pack
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.11b0
|
|
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
|
|
@@ -9,7 +9,6 @@ Requires-Python: >=3.10
|
|
|
9
9
|
Requires-Dist: click~=8.1.7
|
|
10
10
|
Requires-Dist: cookiecutter~=2.5.0
|
|
11
11
|
Requires-Dist: google-cloud-aiplatform~=1.81.0
|
|
12
|
-
Requires-Dist: inquirer~=3.1.3
|
|
13
12
|
Requires-Dist: pyyaml~=6.0.1
|
|
14
13
|
Requires-Dist: rich~=13.7.0
|
|
15
14
|
Provides-Extra: jupyter
|
|
@@ -29,8 +29,8 @@ agents/multimodal_live_api/tests/integration/test_server_e2e.py,sha256=D2VETDIyT
|
|
|
29
29
|
agents/multimodal_live_api/tests/load_test/load_test.py,sha256=HHZyfC4gqiQtZVF_CbbxENGgWQccMLpwMv0IdoQ6cbQ,1275
|
|
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
|
-
src/base_template/Makefile,sha256=
|
|
33
|
-
src/base_template/README.md,sha256=
|
|
32
|
+
src/base_template/Makefile,sha256=PNmyhdIRf0p6eRLYqWHfCskLmuDMG673YPEeu51XLVQ,1720
|
|
33
|
+
src/base_template/README.md,sha256=PS5cKkBPgoAHPcRYMxgynx82PBcMK21xZ_eQehrI-b8,4922
|
|
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
|
|
@@ -56,8 +56,8 @@ src/base_template/deployment/terraform/dev/variables.tf,sha256=wMgDgp1E-piGhcF1W
|
|
|
56
56
|
src/base_template/deployment/terraform/dev/vars/env.tfvars,sha256=xz5cYG29ZIgqM1K-0o-RB10oBTDKNIhHMY7qrmjHk8I,922
|
|
57
57
|
src/base_template/deployment/terraform/vars/env.tfvars,sha256=2dxWRDzeolN2f7eKSHXcBiBt9fRcIMO6VH-2MAZevLQ,1633
|
|
58
58
|
src/base_template/tests/unit/test_utils/test_tracing_exporter.py,sha256=JAb0vIB7wNFPm_kaDaHcxtPKNReypDHjdsMQyzpuePQ,4687
|
|
59
|
-
src/cli/main.py,sha256=
|
|
60
|
-
src/cli/commands/create.py,sha256=
|
|
59
|
+
src/cli/main.py,sha256=vNEV1Fdl1BhJAFbKHcN3MN1v7dPRUcAgXMnB3uCnlI0,1591
|
|
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
63
|
src/cli/utils/cicd.py,sha256=x-8PKp4aevkUwAmtbEZVwu0UlrA6ifXGbouxICu1D0o,25664
|
|
@@ -150,8 +150,8 @@ src/resources/setup_cicd/providers.tf,sha256=Km4z6IJt7x7PLaa0kyZbBrO2m3lpuIJZFD5
|
|
|
150
150
|
src/utils/generate_locks.py,sha256=xu5IAhGGBPkVQGSJX4kk7_JNDwWJUEaXAHbmaQIohbg,4386
|
|
151
151
|
src/utils/lock_utils.py,sha256=plw3vWkRViCMxBK3IrLRHtF_I0kbbP043T9KIYxcb20,2423
|
|
152
152
|
src/utils/watch_and_rebuild.py,sha256=IdbTLReYknTXXu5KWPz3sc7Zg5HTEMS5UVlMSnuhs5E,6067
|
|
153
|
-
agent_starter_pack-0.0.
|
|
154
|
-
agent_starter_pack-0.0.
|
|
155
|
-
agent_starter_pack-0.0.
|
|
156
|
-
agent_starter_pack-0.0.
|
|
157
|
-
agent_starter_pack-0.0.
|
|
153
|
+
agent_starter_pack-0.0.11b0.dist-info/METADATA,sha256=GnSk21NQg-MUxiOAg3J-c-Yjt6mSHWRCbPvbftw4K8I,7174
|
|
154
|
+
agent_starter_pack-0.0.11b0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
155
|
+
agent_starter_pack-0.0.11b0.dist-info/entry_points.txt,sha256=U7uCxR7YulIhZ0L8R8Hui0Bsy6J7oyESBeDYJYMrQjA,56
|
|
156
|
+
agent_starter_pack-0.0.11b0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
157
|
+
agent_starter_pack-0.0.11b0.dist-info/RECORD,,
|
src/base_template/Makefile
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
test:
|
|
2
|
-
uv run pytest tests/unit && uv run pytest tests/integration
|
|
3
|
-
|
|
4
1
|
install:
|
|
2
|
+
@command -v uv >/dev/null 2>&1 || { echo "uv is not installed. Installing uv..."; curl -LsSf https://astral.sh/uv/install.sh | sh; source ~/.bashrc; }
|
|
5
3
|
uv sync --dev {% if cookiecutter.agent_name != 'multimodal_live_api' %}--extra streamlit{%- endif %} --extra jupyter --frozen{% if cookiecutter.agent_name == 'multimodal_live_api' %} && npm --prefix frontend install{%- endif %}
|
|
6
4
|
|
|
5
|
+
test:
|
|
6
|
+
uv run pytest tests/unit && uv run pytest tests/integration
|
|
7
|
+
|
|
7
8
|
playground:
|
|
8
9
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
9
10
|
uv run uvicorn app.server:app --host 0.0.0.0 --port 8000 --reload &
|
src/base_template/README.md
CHANGED
|
@@ -21,6 +21,14 @@ This project is organized as follows:
|
|
|
21
21
|
└── pyproject.toml # Project dependencies and configuration
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
## Requirements
|
|
25
|
+
|
|
26
|
+
Before you begin, ensure you have:
|
|
27
|
+
- **uv**: Python package manager - [Install](https://docs.astral.sh/uv/getting-started/installation/)
|
|
28
|
+
- **Google Cloud SDK**: For GCP services - [Install](https://cloud.google.com/sdk/docs/install)
|
|
29
|
+
- **Terraform**: For infrastructure deployment - [Install](https://developer.hashicorp.com/terraform/downloads)
|
|
30
|
+
- **make**: Build automation tool - [Install](https://www.gnu.org/software/make/) (pre-installed on most Unix-based systems)
|
|
31
|
+
|
|
24
32
|
|
|
25
33
|
### Installation
|
|
26
34
|
|
|
@@ -30,7 +38,7 @@ Install required packages using uv:
|
|
|
30
38
|
uv sync --extra jupyter --extra streamlit --frozen
|
|
31
39
|
```
|
|
32
40
|
|
|
33
|
-
###
|
|
41
|
+
### Setupx
|
|
34
42
|
|
|
35
43
|
If not done during the initialization, set your default Google Cloud project and Location:
|
|
36
44
|
|
|
@@ -46,15 +54,17 @@ gcloud auth application-default set-quota-project $PROJECT_ID
|
|
|
46
54
|
|
|
47
55
|
| Command | Description |
|
|
48
56
|
| -------------------- | ------------------------------------------------------------------------------------------- |
|
|
57
|
+
| `make install` | Install all required dependencies using uv |
|
|
49
58
|
{%- if cookiecutter.deployment_target == 'cloud_run' %}
|
|
50
59
|
| `make playground` | Launch local development environment with backend and frontend |
|
|
51
60
|
| `make backend` | Start backend server only |
|
|
52
|
-
| `make ui`
|
|
61
|
+
| `make ui` | Launch Streamlit frontend without local backend |
|
|
53
62
|
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
|
|
54
63
|
| `make playground` | Launch Streamlit interface for testing agent locally and remotely |
|
|
55
64
|
| `make backend` | Deploy agent to Agent Engine service |
|
|
56
65
|
{%- endif %}
|
|
57
66
|
| `make test` | Run unit and integration tests |
|
|
67
|
+
| `make lint` | Run code quality checks (codespell, ruff, mypy) |
|
|
58
68
|
| `uv run jupyter lab` | Launch Jupyter notebook |
|
|
59
69
|
|
|
60
70
|
For full command options and usage, refer to the [Makefile](Makefile).
|
src/cli/commands/create.py
CHANGED
|
@@ -165,8 +165,6 @@ def create(
|
|
|
165
165
|
|
|
166
166
|
# Check for uv installation if not skipping checks
|
|
167
167
|
if not skip_checks:
|
|
168
|
-
check_and_install_uv()
|
|
169
|
-
|
|
170
168
|
# Set up GCP environment
|
|
171
169
|
try:
|
|
172
170
|
setup_gcp_environment(
|
|
@@ -178,6 +176,17 @@ def create(
|
|
|
178
176
|
except Exception as e:
|
|
179
177
|
if debug:
|
|
180
178
|
logging.warning(f"GCP environment setup failed: {e}")
|
|
179
|
+
console.print(
|
|
180
|
+
f"> Warning: GCP environment setup failed: {e}", style="yellow"
|
|
181
|
+
)
|
|
182
|
+
console.print(
|
|
183
|
+
"> Please check your authentication settings and permissions. "
|
|
184
|
+
"Visit https://cloud.google.com/vertex-ai/docs/authentication for help.",
|
|
185
|
+
style="yellow",
|
|
186
|
+
)
|
|
187
|
+
console.print(
|
|
188
|
+
"> Continuing with template processing...", style="yellow"
|
|
189
|
+
)
|
|
181
190
|
|
|
182
191
|
# Process template
|
|
183
192
|
template_path = get_template_path(final_agent, debug=debug)
|
|
@@ -527,26 +536,3 @@ def replace_region_in_files(
|
|
|
527
536
|
except UnicodeDecodeError:
|
|
528
537
|
# Skip files that can't be read as text
|
|
529
538
|
continue
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
def check_and_install_uv() -> None:
|
|
533
|
-
"""Check if uv is installed and inform the user if it's not."""
|
|
534
|
-
try:
|
|
535
|
-
# Use shell=True for Windows compatibility and add timeout
|
|
536
|
-
process = subprocess.run(
|
|
537
|
-
"uv --version", shell=True, capture_output=True, text=True, timeout=5
|
|
538
|
-
)
|
|
539
|
-
if process.returncode == 0:
|
|
540
|
-
logging.debug("uv is already installed")
|
|
541
|
-
return
|
|
542
|
-
else:
|
|
543
|
-
console.print("> uv command failed", style="yellow")
|
|
544
|
-
except subprocess.TimeoutExpired:
|
|
545
|
-
console.print("> uv version check timed out", style="yellow")
|
|
546
|
-
except (subprocess.CalledProcessError, FileNotFoundError):
|
|
547
|
-
console.print("> uv is not installed", style="yellow")
|
|
548
|
-
|
|
549
|
-
console.print(
|
|
550
|
-
"\n> uv is recommended for managing virtual environments and dependencies."
|
|
551
|
-
"\n> For installation instructions, visit: https://docs.astral.sh/uv/getting-started/installation"
|
|
552
|
-
)
|
src/cli/main.py
CHANGED
|
@@ -12,24 +12,46 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
import importlib.metadata
|
|
16
|
+
|
|
15
17
|
import click
|
|
16
18
|
from rich.console import Console
|
|
17
19
|
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
+
from .commands.create import create
|
|
21
|
+
from .commands.setup_cicd import setup_cicd
|
|
20
22
|
|
|
21
23
|
console = Console()
|
|
22
24
|
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> None:
|
|
27
|
+
if not value or ctx.resilient_parsing:
|
|
28
|
+
return
|
|
29
|
+
try:
|
|
30
|
+
version_str = importlib.metadata.version("agent-starter-pack")
|
|
31
|
+
console.print(f"GCP Agent Starter Pack CLI version: {version_str}")
|
|
32
|
+
except importlib.metadata.PackageNotFoundError:
|
|
33
|
+
console.print("GCP Agent Starter Pack CLI (development version)")
|
|
34
|
+
ctx.exit()
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@click.group(help="Production-ready Generative AI Agent templates for Google Cloud")
|
|
38
|
+
@click.option(
|
|
39
|
+
"--version",
|
|
40
|
+
"-v",
|
|
41
|
+
is_flag=True,
|
|
42
|
+
callback=print_version,
|
|
43
|
+
expose_value=False,
|
|
44
|
+
is_eager=True,
|
|
45
|
+
help="Show the version and exit.",
|
|
46
|
+
)
|
|
25
47
|
def cli() -> None:
|
|
26
|
-
"""GCP Agent Starter CLI tool"""
|
|
27
48
|
pass
|
|
28
49
|
|
|
29
50
|
|
|
30
|
-
# Register commands
|
|
51
|
+
# Register commands
|
|
31
52
|
cli.add_command(create)
|
|
32
53
|
cli.add_command(setup_cicd)
|
|
33
54
|
|
|
55
|
+
|
|
34
56
|
if __name__ == "__main__":
|
|
35
57
|
cli()
|
|
File without changes
|
{agent_starter_pack-0.0.9b0.dist-info → agent_starter_pack-0.0.11b0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{agent_starter_pack-0.0.9b0.dist-info → agent_starter_pack-0.0.11b0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|