diff --git a/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/Complete AI Agent System - Flowchart.svg b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/Complete AI Agent System - Flowchart.svg new file mode 100644 index 00000000..ff58f38a --- /dev/null +++ b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/Complete AI Agent System - Flowchart.svg @@ -0,0 +1,102 @@ +

Complete AI Agent System

PART 3: Configuration & Customization

PART 2: Agent System Templates

PART 1: Google Cloud Vertex AI Setup

P3

Start

P1

P2

1.1 Google Cloud Project Setup

1.1.1 - Initial Project Configuration

1.1.2 - Service Account Setup

1.2 Agent Development Kit Installation

Environment Setup

Basic Project Structure

1.3 Core Configuration Files

1.3.1 - settings.py

1.3.2 - main.py

1.4 Deployment Configuration

1.4.1 - Dockerfile

1.4.2 - cloudbuild.yaml

2.1 Agent Team Configuration

2.1.1 - Blank Team Template

2.1.2 - Team Structures by Function

Strategic Leadership

Product Development

Operations

2.2 Individual Agent Definitions

2.2.1 - Master Agent

2.2.2 - Orchestrator Agent

2.2.3 - Specialist Agent

2.3 Task Templates

Generic Task

Analysis Task

Creation Task

2.4 Document Templates

Master Document

Strategic Planning

Technical Specification

2.5 Checklist Templates

Master Checklist

Quality Validation

2.6 Data Structure Templates

Knowledge Base

Standards Reference

2.7 Workflow Templates

Master Workflow

3.1 Variable Configuration

Company-Specific

Agent Customization

Workflow Variables

3.2 Industry Adaptation

Manufacturing

Software Development

Healthcare

3.3 Implementation Roadmap

Phase 1: Foundation

Phase 2: Core Implementation

Phase 3: Optimization

\ No newline at end of file diff --git a/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash copy.txt b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash copy.txt new file mode 100644 index 00000000..b6d9c791 --- /dev/null +++ b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash copy.txt @@ -0,0 +1,13 @@ +# 1. Create new Google Cloud Project +gcloud projects create {{PROJECT_ID}} --name="{{COMPANY_NAME}} AI Agent System" + +# 2. Set default project +gcloud config set project {{PROJECT_ID}} + +# 3. Enable required APIs +gcloud services enable aiplatform.googleapis.com +gcloud services enable storage.googleapis.com +gcloud services enable cloudfunctions.googleapis.com +gcloud services enable run.googleapis.com +gcloud services enable firestore.googleapis.com +gcloud services enable secretmanager.googleapis.com \ No newline at end of file diff --git a/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash.txt b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash.txt new file mode 100644 index 00000000..b6d9c791 --- /dev/null +++ b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.1 Google Cloud Project Setup/1.1.1 - Initial Project Configuration - bash.txt @@ -0,0 +1,13 @@ +# 1. Create new Google Cloud Project +gcloud projects create {{PROJECT_ID}} --name="{{COMPANY_NAME}} AI Agent System" + +# 2. Set default project +gcloud config set project {{PROJECT_ID}} + +# 3. Enable required APIs +gcloud services enable aiplatform.googleapis.com +gcloud services enable storage.googleapis.com +gcloud services enable cloudfunctions.googleapis.com +gcloud services enable run.googleapis.com +gcloud services enable firestore.googleapis.com +gcloud services enable secretmanager.googleapis.com \ No newline at end of file diff --git a/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.2 Agent Development Kit Installation/1.2.2 - Basic Project Structure - txt.txt b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.2 Agent Development Kit Installation/1.2.2 - Basic Project Structure - txt.txt new file mode 100644 index 00000000..a502d0c5 --- /dev/null +++ b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.2 Agent Development Kit Installation/1.2.2 - Basic Project Structure - txt.txt @@ -0,0 +1,25 @@ +{{company_name}}-ai-agents/ +├── agents/ +│ ├── __init__.py +│ ├── {{team_1}}/ +│ │ ├── __init__.py +│ │ ├── {{agent_1}}.py +│ │ └── {{agent_2}}.py +│ └── {{team_2}}/ +├── tasks/ +│ ├── __init__.py +│ ├── {{task_category_1}}/ +│ └── {{task_category_2}}/ +├── templates/ +│ ├── {{document_type_1}}/ +│ └── {{document_type_2}}/ +├── checklists/ +├── data/ +├── workflows/ +├── config/ +│ ├── settings.py +│ └── agent_config.yaml +├── main.py +└── deployment/ + ├── Dockerfile + └── cloudbuild.yaml \ No newline at end of file diff --git a/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.1 - settings.py b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.1 - settings.py new file mode 100644 index 00000000..4fb3eedb --- /dev/null +++ b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.1 - settings.py @@ -0,0 +1,34 @@ +import os +from pydantic import BaseSettings + +class Settings(BaseSettings): + # Google Cloud Configuration + project_id: str = "{{PROJECT_ID}}" + location: str = "{{LOCATION}}" # e.g., "us-central1" + + # Company Information + company_name: str = "{{COMPANY_NAME}}" + industry: str = "{{INDUSTRY}}" + business_type: str = "{{BUSINESS_TYPE}}" + + # Agent Configuration + default_model: str = "gemini-1.5-pro" + max_iterations: int = 10 + timeout_seconds: int = 300 + + # Storage Configuration + bucket_name: str = "{{COMPANY_NAME}}-ai-agents-storage" + database_name: str = "{{COMPANY_NAME}}-ai-agents-db" + + # API Configuration + session_service_type: str = "vertex" # or "in_memory" for development + artifact_service_type: str = "gcs" # or "in_memory" for development + memory_service_type: str = "vertex" # or "in_memory" for development + + # Security + service_account_path: str = "./{{COMPANY_NAME}}-ai-agents-key.json" + + class Config: + env_file = ".env" + +settings = Settings() \ No newline at end of file diff --git a/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.2 - main.py - Base Application.py b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.2 - main.py - Base Application.py new file mode 100644 index 00000000..6f3cea50 --- /dev/null +++ b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.3 Core Configuration Files/1.3.2 - main.py - Base Application.py @@ -0,0 +1,70 @@ +import asyncio +from google.adk.agents import LlmAgent +from google.adk.runners import Runner +from google.adk.sessions import VertexAiSessionService +from google.adk.artifacts import GcsArtifactService +from google.adk.memory import VertexAiRagMemoryService +from google.adk.models import Gemini + +from config.settings import settings +from agents.{{primary_team}}.{{main_orchestrator}} import {{MainOrchestratorClass}} + +class {{CompanyName}}AISystem: + def __init__(self): + self.settings = settings + self.runner = None + self.main_orchestrator = None + + async def initialize(self): + """Initialize the AI agent system""" + + # Create main orchestrator + self.main_orchestrator = {{MainOrchestratorClass}}() + + # Initialize services + session_service = VertexAiSessionService( + project=self.settings.project_id, + location=self.settings.location + ) + + artifact_service = GcsArtifactService( + bucket_name=self.settings.bucket_name + ) + + memory_service = VertexAiRagMemoryService( + rag_corpus=f"projects/{self.settings.project_id}/locations/{self.settings.location}/ragCorpora/{{COMPANY_NAME}}-knowledge" + ) + + # Create runner + self.runner = Runner( + app_name=f"{self.settings.company_name}-AI-System", + agent=self.main_orchestrator, + session_service=session_service, + artifact_service=artifact_service, + memory_service=memory_service + ) + + print(f"✅ {self.settings.company_name} AI Agent System initialized successfully!") + + async def run_agent_interaction(self, user_id: str, session_id: str, message: str): + """Run agent interaction""" + if not self.runner: + await self.initialize() + + async for event in self.runner.run_async( + user_id=user_id, + session_id=session_id, + new_message=message + ): + yield event + +# Application factory +async def create_app(): + ai_system = {{CompanyName}}AISystem() + await ai_system.initialize() + return ai_system + +if __name__ == "__main__": + # Development server + import uvicorn + uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True) \ No newline at end of file diff --git a/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.4 Deployment Configuration/1.4.2 - cloudbuild.yaml b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.4 Deployment Configuration/1.4.2 - cloudbuild.yaml new file mode 100644 index 00000000..2ec414b1 --- /dev/null +++ b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/PART 1 - Google Cloud Vertex AI Setup Documentation/1.4 Deployment Configuration/1.4.2 - cloudbuild.yaml @@ -0,0 +1,26 @@ +steps: + # Build the container image + - name: 'gcr.io/cloud-builders/docker' + args: ['build', '-t', 'gcr.io/{{PROJECT_ID}}/{{COMPANY_NAME}}-ai-agents:$COMMIT_SHA', '.'] + + # Push the container image to Container Registry + - name: 'gcr.io/cloud-builders/docker' + args: ['push', 'gcr.io/{{PROJECT_ID}}/{{COMPANY_NAME}}-ai-agents:$COMMIT_SHA'] + + # Deploy container image to Cloud Run + - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' + entrypoint: gcloud + args: + - 'run' + - 'deploy' + - '{{COMPANY_NAME}}-ai-agents' + - '--image' + - 'gcr.io/{{PROJECT_ID}}/{{COMPANY_NAME}}-ai-agents:$COMMIT_SHA' + - '--region' + - '{{LOCATION}}' + - '--platform' + - 'managed' + - '--allow-unauthenticated' + +images: + - 'gcr.io/{{PROJECT_ID}}/{{COMPANY_NAME}}-ai-agents:$COMMIT_SHA' \ No newline at end of file diff --git a/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/README.md b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/README.md new file mode 100644 index 00000000..de0d4680 --- /dev/null +++ b/expansion-packs/Complete AI Agent System - Blank Templates & Google Cloud Setup/README.md @@ -0,0 +1,109 @@ +# BMad Expansion Pack: Google Cloud Vertex AI Agent System + +[](https://opensource.org/licenses/MIT) +[](https://www.google.com/search?q=https://github.com/antmikinka/BMAD-METHOD) +[](https://cloud.google.com/) + +This expansion pack provides a complete, deployable starter kit for building and hosting sophisticated AI agent systems on Google Cloud Platform (GCP). It bridges the gap between the BMad Method's natural language framework and a production-ready cloud environment, leveraging Google Vertex AI, Cloud Run, and the Google Agent Development Kit (ADK). + +## Features + + * **Automated GCP Setup**: `gcloud` scripts to configure your project, service accounts, and required APIs in minutes. + * **Production-Ready Deployment**: Includes a `Dockerfile` and `cloudbuild.yaml` for easy, repeatable deployments to Google Cloud Run. + * **Rich Template Library**: A comprehensive set of BMad-compatible templates for Teams, Agents, Tasks, Workflows, Documents, and Checklists. + * **Pre-configured Agent Roles**: Includes powerful master templates for key agent archetypes like Orchestrators and Specialists. + * **Highly Customizable**: Easily adapt the entire system with company-specific variables and industry-specific configurations. + * **Powered by Google ADK**: Built on the official Google Agent Development Kit for robust and native integration with Vertex AI services. + +## Prerequisites + +Before you begin, ensure you have the following installed and configured: + + * A Google Cloud Platform (GCP) Account with an active billing account. + * The [Google Cloud SDK (`gcloud` CLI)](https://www.google.com/search?q=%5Bhttps://cloud.google.com/sdk/docs/install%5D\(https://cloud.google.com/sdk/docs/install\)) installed and authenticated. + * [Docker](https://www.docker.com/products/docker-desktop/) installed on your local machine. + * Python 3.11+ + +## Quick Start Guide + +Follow these steps to get your own AI agent system running on Google Cloud. + +### 1\. Configure Setup Variables + +The setup scripts use placeholder variables. Before running them, open the files in the `/scripts` directory and replace the following placeholders with your own values: + + * `{{PROJECT_ID}}`: Your unique Google Cloud project ID. + * `{{COMPANY_NAME}}`: Your company or project name (used for naming resources). + * `{{LOCATION}}`: The GCP region you want to deploy to (e.g., `us-central1`). + +### 2\. Run the GCP Setup Scripts + +Execute the setup scripts to prepare your Google Cloud environment. + +```bash +# Navigate to the scripts directory +cd scripts/ + +# Run the project configuration script +sh 1-initial-project-config.sh + +# Run the service account setup script +sh 2-service-account-setup.sh +``` + +These scripts will enable the necessary APIs, create a service account, assign permissions, and download a JSON key file required for authentication. + +### 3\. Install Python Dependencies + +Install the required Python packages for the application. + +```bash +# From the root of the expansion pack +pip install -r requirements.txt +``` + +### 4\. Deploy to Cloud Run + +Deploy the entire agent system as a serverless application using Cloud Build. + +```bash +# From the root of the expansion pack +gcloud builds submit --config deployment/cloudbuild.yaml . +``` + +This command will build the Docker container, push it to the Google Container Registry, and deploy it to Cloud Run. Your agent system is now live\! + +## How to Use + +Once deployed, the power of this system lies in its natural language templates. + +1. **Define Your Organization**: Go to `/templates/teams` and use the templates to define your agent teams (e.g., Product Development, Operations). +2. **Customize Your Agents**: In `/templates/agents`, use the `Master-Agent-Template.yaml` to create new agents or customize the existing Orchestrator and Specialist templates. Define their personas, skills, and commands in plain English. +3. **Build Your Workflows**: In `/templates/workflows`, link agents and tasks together to create complex, automated processes. + +The deployed application reads these YAML and Markdown files to dynamically construct and run your AI workforce. When you update a template, your live agents automatically adopt the new behaviors. + +## What's Included + +This expansion pack has a comprehensive structure to get you started: + +``` +/ +├── deployment/ # Dockerfile and cloudbuild.yaml for deployment +├── scripts/ # GCP setup scripts (project config, service accounts) +├── src/ # Python source code (main.py, settings.py) +├── templates/ +│ ├── agents/ # Master, Orchestrator, Specialist agent templates +│ ├── teams/ # Team structure templates +│ ├── tasks/ # Generic and specialized task templates +│ ├── documents/ # Document and report templates +│ ├── checklists/ # Quality validation checklists +│ ├── workflows/ # Workflow definition templates +│ └── ...and more +├── config/ # Customization guides and variable files +└── requirements.txt # Python package dependencies +``` + +## Contributing + +Contributions are welcome\! Please follow the main project's `CONTRIBUTING.md` guidelines. For major changes or new features for this expansion pack, please open an issue or discussion first. \ No newline at end of file