Skip to content

Latest commit

 

History

History
252 lines (185 loc) · 5.8 KB

File metadata and controls

252 lines (185 loc) · 5.8 KB

🚀 Quick Deploy to Vertex AI Agent Engine

5-Minute Deployment Guide for hackathon demo


Prerequisites

# 1. Set environment variables
export GOOGLE_CLOUD_PROJECT="true-ability-473715-b4"
export REGION="us-central1"

# 2. Verify you're authenticated
gcloud auth list
gcloud config set project $GOOGLE_CLOUD_PROJECT

Deployment Steps

Step 1: Enable APIs (2 minutes)

# Enable required Google Cloud APIs
gcloud services enable aiplatform.googleapis.com \
  agent-engine.googleapis.com \
  storage.googleapis.com \
  artifactregistry.googleapis.com

# Create staging bucket
gsutil mb -p $GOOGLE_CLOUD_PROJECT -l $REGION \
  gs://${GOOGLE_CLOUD_PROJECT}-agent-engine

Step 2: Install Agent Engine SDK (1 minute)

# In your virtual environment
source venv/bin/activate

# Install SDK
pip install google-cloud-aiplatform[agent-engine]>=1.112.0

Step 3: Deploy! (2 minutes)

Option A: Using Our Deployment Script

# Generate configuration
python3 deploy_agent_engine.py

# This creates: agent_engine_config_TIMESTAMP.json

Option B: Manual Deployment

Create deploy_now.py:

from google.cloud import aiplatform
import os

PROJECT_ID = "true-ability-473715-b4"
REGION = "us-central1"

# Initialize Vertex AI
aiplatform.init(project=PROJECT_ID, location=REGION)

# Create an Agent Engine resource
from google.cloud.aiplatform import reasoning_engines

# Deploy orchestrator as reasoning engine
reasoning_engine = reasoning_engines.ReasoningEngine.create(
    requirements=[
        "google-cloud-aiplatform>=1.112.0",
        "google-generativeai>=0.3.0",
        "vertexai>=1.0.0",
        "aiohttp>=3.12.0",
        "python-dotenv>=1.0.0",
    ],
    reasoning_engine="./orchestrator.py",
    display_name="ActualCode Multi-Agent System",
    description="7-agent collaborative system with A2A protocol",
    extra_packages=["./agents", "./utils"]
)

print(f"✅ Deployed! Resource: {reasoning_engine.resource_name}")

Run:

python deploy_now.py

Test Deployment

# Test the deployed agent
python3 << 'EOF'
from google.cloud import aiplatform
from google.cloud.aiplatform import reasoning_engines

PROJECT_ID = "true-ability-473715-b4"
REGION = "us-central1"

aiplatform.init(project=PROJECT_ID, location=REGION)

# List deployed engines
engines = reasoning_engines.ReasoningEngine.list()
print(f"✅ Found {len(engines)} deployed agents")

for engine in engines:
    print(f"   - {engine.display_name}")
    print(f"     Resource: {engine.resource_name}")

# Query the first engine
if engines:
    response = engines[0].query(
        repo_url="https://github.com/google-gemini/example-chat-app",
        difficulty="medium",
        problem_type="feature"
    )
    print(f"\n✅ Test successful!")
    print(f"   Title: {response['assessment']['problem']['title']}")

EOF

For Judges - Key Points

What You've Deployed

7 AI Agents on Vertex AI Agent Engine
A2A Protocol for agent communication
Gemini 2.5 Pro & Flash models
Production Infrastructure on Google Cloud
Auto-scaling runtime
Enterprise Security (CMEK-ready, VPC-SC compatible)

Supported Regions

According to Vertex AI Agent Engine documentation, your agents are now deployed in:

  • us-central1 (Iowa) - Your deployment ✅
  • Available in 13+ regions globally
  • Supports: v1 (GA) and v1beta1 (Preview)

Enterprise Features Available

  • Sessions: Session management for multi-turn conversations
  • Memory Bank: Persistent memory across sessions
  • Code Execution: Sandbox environment for code execution
  • Tracing & Logging: Full observability
  • Private Service Connect: VPC integration
  • HIPAA Compliance: Healthcare-ready deployment

Monitoring

# View logs
gcloud logging read \
  "resource.type=aiplatform.googleapis.com/ReasoningEngine" \
  --limit=20 \
  --project=$GOOGLE_CLOUD_PROJECT \
  --format=json

# View in console
open "https://console.cloud.google.com/ai/platform/reasoning-engines?project=$GOOGLE_CLOUD_PROJECT"

Troubleshooting

"Permission Denied"

# Grant yourself necessary role
gcloud projects add-iam-policy-binding $GOOGLE_CLOUD_PROJECT \
  --member="user:$(gcloud config get-value account)" \
  --role="roles/aiplatform.admin"

"Quota Exceeded"

# Check quotas
gcloud compute project-info describe \
  --project=$GOOGLE_CLOUD_PROJECT \
  | grep -A 5 quotas

"Region Not Available"

Switch to a supported region:

  • us-central1 (Iowa) ✅ Recommended
  • us-east4 (Virginia)
  • europe-west1 (Belgium)
  • asia-southeast1 (Singapore)

Next Steps

  1. ✅ Agents deployed to Vertex AI
  2. 🎯 Update your web UI to call the deployed agent
  3. 🎬 Prepare demo showing:
    • Cloud Console with deployed agents
    • Agent Engine monitoring
    • Live assessment generation
  4. 📊 Highlight to judges:
    • Production deployment on Google Cloud
    • A2A protocol in action
    • Enterprise-grade infrastructure

Demo Script for Judges

"We've deployed our 7-agent system to Google Cloud's Vertex AI Agent Engine.

[Show Cloud Console]
Here you can see all 7 agents running in production, using Google's A2A protocol 
for inter-agent communication.

[Show monitoring]
The agents use Gemini 2.5 Pro and Flash models, with built-in tracing, logging, 
and auto-scaling.

[Run live demo]
Let me generate an assessment from a real GitHub repository...

[Shows results]
In under 3 minutes, our production system on Vertex AI generated this 
complete, validated coding assessment.

This is enterprise-ready, with CMEK support, VPC Service Controls, 
and HIPAA compliance available."

You're now deployed to production! 🎉

Full guide: DEPLOYMENT_GUIDE.md