agent-starter-pack 0.0.10b0__py3-none-any.whl → 0.0.12b0__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-starter-pack
3
- Version: 0.0.10b0
3
+ Version: 0.0.12b0
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
@@ -53,6 +52,7 @@ agent-starter-pack create my-awesome-agent
53
52
  ```
54
53
 
55
54
  **That's it!** You now have a fully functional agent project, complete with a backend, frontend, and deployment infrastructure, ready to explore and customize.
55
+ For more installation options, see the [Installation Guide](docs/installation.md).
56
56
 
57
57
  ---
58
58
 
@@ -114,10 +114,13 @@ This project represents the next evolution of the [e2e-gen-ai-app-starter-pack](
114
114
  See the [documentation](docs/) for more details:
115
115
 
116
116
  - [Why Use the Starter Pack?](docs/why_starter_pack.md)
117
+ - [Installation](docs/installation.md)
117
118
  - [Deployment](docs/deployment.md)
118
119
  - [Data Ingestion](docs/data-ingestion.md)
119
120
  - [Observability](docs/observability.md)
120
121
  - [CLI Reference](docs/cli/README.md)
122
+ - [CLI Reference](docs/cli/README.md)
123
+ - [Troubleshooting](docs/troubleshooting.md)
121
124
 
122
125
  **Video Walkthrough:** A [20-Minute Video Walkthrough](https://youtu.be/kwRG7cnqSu0) is available, showcasing the previous `e2e-gen-ai-app-starter-pack`. A new walkthrough for the `agent-starter-pack` will be released soon!
123
126
 
@@ -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=YQXymaikoFP3r7MN1EiNbQv8VZKjrVzeRoksIPHNX0E,1568
33
- src/base_template/README.md,sha256=LS07ZhCLj2SXew3j3xEWaaXwsf3aIjyvQpkp0S0l8nA,4194
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,11 +56,11 @@ 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=134KpcOQlexr_vR-KT3D3B1jKh1Y6S3qHGJ-9uD9Kkg,950
60
- src/cli/commands/create.py,sha256=9WqSRt7t6RYF6SbXsF_igOXevw6C8PIR6d4yMwbpZuM,20953
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
- src/cli/utils/cicd.py,sha256=x-8PKp4aevkUwAmtbEZVwu0UlrA6ifXGbouxICu1D0o,25664
63
+ src/cli/utils/cicd.py,sha256=W44Dt39mZMzfDqA16gG69C8vc6VvBy99QVBJxEIjMI4,26631
64
64
  src/cli/utils/gcp.py,sha256=f-XTq9AN2_KrCR8pf_gSPOng8KrvtFlNP2Ok9VtTk_Q,4118
65
65
  src/cli/utils/logging.py,sha256=0lHe4EPi1A8sOx9xkA7gS4UNl0GsIyp2ahydkkuCzLY,1570
66
66
  src/cli/utils/template.py,sha256=p7uKv5yHkXIOWo8EJJ0IjUh57lOSDL7kYHA9OZ7j-z4,25447
@@ -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.10b0.dist-info/METADATA,sha256=tWZHbeB2mwGNTnfNqhyhT1VqWd45hfpEwHhWg-KErtk,7205
154
- agent_starter_pack-0.0.10b0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
155
- agent_starter_pack-0.0.10b0.dist-info/entry_points.txt,sha256=U7uCxR7YulIhZ0L8R8Hui0Bsy6J7oyESBeDYJYMrQjA,56
156
- agent_starter_pack-0.0.10b0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
157
- agent_starter_pack-0.0.10b0.dist-info/RECORD,,
153
+ agent_starter_pack-0.0.12b0.dist-info/METADATA,sha256=M9PRQDNxktA7du5saw1i_35SOfFvF6G2ZToucjz_fko,7379
154
+ agent_starter_pack-0.0.12b0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
155
+ agent_starter_pack-0.0.12b0.dist-info/entry_points.txt,sha256=U7uCxR7YulIhZ0L8R8Hui0Bsy6J7oyESBeDYJYMrQjA,56
156
+ agent_starter_pack-0.0.12b0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
157
+ agent_starter_pack-0.0.12b0.dist-info/RECORD,,
@@ -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 &
@@ -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
- ### Setup
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` | Launch Streamlit frontend without local backend |
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).
@@ -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,67 +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 install it if not present."""
534
- try:
535
- # Use shell=True for Windows compatibility and add timeout
536
- process = subprocess.run(
537
- "uv --version",
538
- shell=True,
539
- capture_output=True,
540
- text=True,
541
- timeout=10
542
- )
543
- if process.returncode == 0:
544
- logging.debug("uv is already installed")
545
- return
546
- else:
547
- console.print("> uv command failed", style="yellow")
548
- except subprocess.TimeoutExpired:
549
- console.print("> uv version check timed out", style="yellow")
550
- except (subprocess.CalledProcessError, FileNotFoundError):
551
- console.print("> uv is not installed", style="yellow")
552
-
553
- console.print(
554
- "\n> uv is required for the template to work. You can install it in several ways:"
555
- "\n 1. Automatically install uv now"
556
- "\n 2. Manual installation from: https://docs.astral.sh/uv/getting-started/installation"
557
- "\n This includes other options e.g PyPI (pip/pipx), Homebrew, Docker.."
558
- )
559
-
560
- install_choice = Prompt.ask(
561
- "\n> Would you like to install uv automatically now?",
562
- choices=["y", "n"],
563
- default="y",
564
- )
565
- if install_choice.lower() == "y":
566
- console.print("> Installing uv...", style="yellow")
567
- try:
568
- install_command = "curl -LsSf https://astral.sh/uv/install.sh | sh"
569
- # Add timeout to installation process as well
570
- subprocess.run(
571
- install_command,
572
- shell=True,
573
- check=True,
574
- timeout=60 # Give installation more time
575
- )
576
- console.print("> uv installed successfully!", style="green")
577
- except subprocess.TimeoutExpired:
578
- console.print("> uv installation timed out", style="bold red")
579
- raise
580
- except subprocess.CalledProcessError as e:
581
- console.print("> Failed to install uv", style="bold red")
582
- logging.debug(f"uv installation error: {e!s}")
583
- console.print(
584
- "> Please install uv manually using one of the methods listed above",
585
- style="yellow",
586
- )
587
- raise
588
- else:
589
- console.print(
590
- "> Please install uv manually using one of the methods listed above and try again",
591
- style="yellow",
592
- )
593
- raise click.Abort() from None
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 src.cli.commands.create import create
19
- from src.cli.commands.setup_cicd import setup_cicd
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
- @click.group()
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 with the CLI group
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()
src/cli/utils/cicd.py CHANGED
@@ -257,6 +257,17 @@ def create_github_connection(
257
257
  elif status == "PENDING_USER_OAUTH" or status == "PENDING_INSTALL_APP":
258
258
  if attempt < max_retries - 1: # Don't print waiting on last attempt
259
259
  console.print("⏳ Waiting for GitHub authorization...")
260
+ # Extract and print the action URI for user authentication
261
+ try:
262
+ action_uri = json.loads(result.stdout).get("installationState", {}).get("actionUri")
263
+ if action_uri:
264
+ console.print("\n🔑 Authentication Required:", style="bold yellow")
265
+ console.print(f"Please visit [link={action_uri}]this page[/link] to authenticate Cloud Build with GitHub:")
266
+ console.print(f"{action_uri}", style="bold blue")
267
+ console.print("(Copy and paste the link into your browser if clicking doesn't work)")
268
+ console.print("After completing authentication, return here to continue the setup.\n")
269
+ except (json.JSONDecodeError, KeyError) as e:
270
+ console.print(f"⚠️ Could not extract authentication link: {e}", style="yellow")
260
271
  time.sleep(10)
261
272
  continue
262
273
  else: