google-cloud-agent-sdk-master

108
2
Source

Automate the creation, deployment, and orchestration of multi-agent systems using Google Cloud's Agent Development Kit.

Install

mkdir -p .claude/skills/google-cloud-agent-sdk-master && curl -L -o skill.zip "https://mcp.directory/api/skills/download/179" && unzip -o skill.zip -d .claude/skills/google-cloud-agent-sdk-master && rm skill.zip

Installs to .claude/skills/google-cloud-agent-sdk-master

About this skill

Google Cloud Agent SDK Master - Production-Ready Agent Systems

This Agent Skill provides comprehensive mastery of Google's Agent Development Kit (ADK) and Agent Starter Pack for building and deploying production-grade containerized agents.

Core Capabilities

🤖 Agent Development Kit (ADK)

Framework Overview:

  • Open-source Python framework from Google
  • Same framework powering Google Agentspace and CES
  • Build production agents in <100 lines of code
  • Model-agnostic (optimized for Gemini)
  • Deployment-agnostic (local, Cloud Run, GKE, Agent Engine)

Supported Agent Types:

  1. LLM Agents: Dynamic routing with intelligence
  2. Workflow Agents:
    • Sequential: Linear execution
    • Loop: Iterative processing
    • Parallel: Concurrent execution
  3. Custom Agents: User-defined implementations
  4. Multi-agent Systems: Hierarchical coordination

Key Features:

  • Flexible orchestration (workflow & LLM-driven)
  • Tool ecosystem (search, code execution, custom functions)
  • Third-party integrations (LangChain, CrewAI)
  • Agents-as-tools capability
  • Built-in evaluation framework
  • Cloud Trace integration

📦 Agent Starter Pack

Production Templates:

  1. adk_base - ReAct agent using ADK
  2. agentic_rag - Document retrieval + Q&A with search
  3. langgraph_base_react - LangGraph ReAct implementation
  4. crewai_coding_crew - Multi-agent coding system
  5. adk_live - Multimodal RAG (audio/video/text)

Infrastructure Automation:

  • CI/CD setup with single command
  • GitHub Actions or Cloud Build pipelines
  • Multi-environment support (dev, staging, prod)
  • Automated testing and evaluation
  • Deployment rollback mechanisms

🚀 Deployment Targets

1. Vertex AI Agent Engine

  • Fully managed runtime
  • Auto-scaling and load balancing
  • Built-in observability
  • Serverless architecture
  • Best for: Production-scale agents

2. Cloud Run

  • Containerized serverless
  • Pay-per-use pricing
  • Custom domain support
  • Traffic splitting
  • Best for: Web-facing agents

3. Google Kubernetes Engine (GKE)

  • Full container orchestration
  • Advanced networking
  • Resource management
  • Multi-cluster support
  • Best for: Complex multi-agent systems

4. Local/Docker

  • Development and testing
  • Custom infrastructure
  • On-premises deployment
  • Best for: POC and debugging

🔧 Technical Implementation

Installation:

# Agent Starter Pack (recommended)
pip install agent-starter-pack

# or direct from GitHub
uvx agent-starter-pack create my-agent

# ADK only
pip install google-cloud-aiplatform[adk,agent_engines]>=1.111

Create Agent (ADK):

from google.cloud.aiplatform import agent
from vertexai.preview.agents import ADKAgent

# Simple ReAct agent
@agent.adk_agent
class MyAgent(ADKAgent):
    def __init__(self):
        super().__init__(
            model="gemini-2.5-pro",
            tools=[search_tool, code_exec_tool]
        )

    def run(self, query: str):
        return self.generate(query)

# Multi-agent orchestration
class OrchestratorAgent(ADKAgent):
    def __init__(self):
        self.research_agent = ResearchAgent()
        self.analysis_agent = AnalysisAgent()
        self.writer_agent = WriterAgent()

    def run(self, task: str):
        research = self.research_agent.run(task)
        analysis = self.analysis_agent.run(research)
        output = self.writer_agent.run(analysis)
        return output

Using Agent Starter Pack:

# Create project with template
uvx agent-starter-pack create my-rag-agent \
    --template agentic_rag \
    --deployment cloud_run

# Generates complete structure:
my-rag-agent/
├── src/
│   ├── agent.py          # Agent implementation
│   ├── tools/            # Custom tools
│   └── config.py         # Configuration
├── deployment/
│   ├── Dockerfile
│   ├── cloudbuild.yaml
│   └── terraform/
├── tests/
│   ├── unit_tests.py
│   └── integration_tests.py
└── .github/workflows/    # CI/CD pipelines

Deploy to Cloud Run:

# Using ADK CLI
adk deploy \
    --target cloud_run \
    --region us-central1 \
    --service-account sa@project.iam.gserviceaccount.com

# Manual with Docker
docker build -t gcr.io/PROJECT/agent:latest .
docker push gcr.io/PROJECT/agent:latest
gcloud run deploy agent \
    --image gcr.io/PROJECT/agent:latest \
    --region us-central1 \
    --allow-unauthenticated

Deploy to Agent Engine:

# Using Agent Starter Pack
asp deploy \
    --env production \
    --target agent_engine

# Manual deployment
from google.cloud.aiplatform import agent_engines
agent_engines.deploy_agent(
    agent_id="my-agent",
    project="PROJECT_ID",
    location="us-central1"
)

📊 RAG Agent Implementation

Vector Search Integration:

from vertexai.preview.rag import VectorSearchTool
from google.cloud import aiplatform

# Set up vector search
vector_search = VectorSearchTool(
    index_endpoint="projects/PROJECT/locations/LOCATION/indexEndpoints/INDEX_ID",
    deployed_index_id="deployed_index"
)

# RAG agent with ADK
class RAGAgent(ADKAgent):
    def __init__(self):
        super().__init__(
            model="gemini-2.5-pro",
            tools=[vector_search, web_search_tool]
        )

    def run(self, query: str):
        # Retrieves relevant docs automatically
        response = self.generate(
            f"Answer this using retrieved context: {query}"
        )
        return response

Vertex AI Search Integration:

from vertexai.preview.search import VertexAISearchTool

# Enterprise search integration
vertex_search = VertexAISearchTool(
    data_store_id="DATA_STORE_ID",
    project="PROJECT_ID"
)

agent = ADKAgent(
    model="gemini-2.5-pro",
    tools=[vertex_search]
)

🔄 CI/CD Automation

GitHub Actions (auto-generated):

name: Deploy Agent
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Test Agent
        run: pytest tests/
      - name: Deploy to Cloud Run
        run: |
          gcloud run deploy agent \
            --source . \
            --region us-central1

Cloud Build Pipeline:

steps:
  # Build container
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-t', 'gcr.io/$PROJECT_ID/agent', '.']

  # Run tests
  - name: 'gcr.io/$PROJECT_ID/agent'
    args: ['pytest', 'tests/']

  # Deploy to Cloud Run
  - name: 'gcr.io/cloud-builders/gcloud'
    args:
      - 'run'
      - 'deploy'
      - 'agent'
      - '--image=gcr.io/$PROJECT_ID/agent'
      - '--region=us-central1'

🎯 Multi-Agent Orchestration

Hierarchical Agents:

# Coordinator agent with specialized sub-agents
class ProjectManagerAgent(ADKAgent):
    def __init__(self):
        self.researcher = ResearchAgent()
        self.analyst = AnalysisAgent()
        self.writer = WriterAgent()
        self.reviewer = ReviewAgent()

    def run(self, project_brief: str):
        # Coordinate multiple agents
        research = self.researcher.run(project_brief)
        analysis = self.analyst.run(research)
        draft = self.writer.run(analysis)
        final = self.reviewer.run(draft)
        return final

Parallel Agent Execution:

import asyncio

class ParallelResearchAgent(ADKAgent):
    async def research_topic(self, topics: list[str]):
        # Run multiple agents concurrently
        tasks = [
            self.specialized_agent(topic)
            for topic in topics
        ]
        results = await asyncio.gather(*tasks)
        return self.synthesize(results)

📈 Evaluation & Monitoring

Built-in Evaluation:

from google.cloud.aiplatform import agent_evaluation

# Define evaluation metrics
eval_config = agent_evaluation.EvaluationConfig(
    metrics=["accuracy", "relevance", "safety"],
    test_dataset="gs://bucket/eval_data.jsonl"
)

# Run evaluation
results = agent.evaluate(eval_config)
print(f"Accuracy: {results.accuracy}")
print(f"Relevance: {results.relevance}")

Cloud Trace Integration:

from google.cloud import trace_v1

# Automatic tracing
@traced_agent
class MonitoredAgent(ADKAgent):
    def run(self, query: str):
        # All calls automatically traced
        with self.trace_span("retrieval"):
            docs = self.retrieve(query)

        with self.trace_span("generation"):
            response = self.generate(query, docs)

        return response

🔒 Security & Best Practices

1. Service Account Management:

# Create minimal-permission service account
gcloud iam service-accounts create agent-sa \
    --display-name "Agent Service Account"

# Grant only required permissions
gcloud projects add-iam-policy-binding PROJECT_ID \
    --member="serviceAccount:agent-sa@PROJECT.iam.gserviceaccount.com" \
    --role="roles/aiplatform.user"

2. Secret Management:

from google.cloud import secretmanager

def get_api_key():
    client = secretmanager.SecretManagerServiceClient()
    name = "projects/PROJECT/secrets/api-key/versions/latest"
    response = client.access_secret_version(name=name)
    return response.payload.data.decode('UTF-8')

3. VPC Service Controls:

# Enable VPC SC for data security
gcloud access-context-manager perimeters create agent-perimeter \
    --resources=projects/PROJECT_ID \
    --restricted-services=aiplatform.googleapis.com

💰 Cost Optimization

Strategies:

  • Use Gemini 2.5 Flash for most operations
  • Cache embeddings for RAG systems
  • Implement request batching
  • Use preemptible GKE nodes
  • Monitor token usage in Cloud Monitoring

Pricing Examples:

  • Cloud Run: $0.00024/GB-second
  • Agent Engine: Pay-per-request pricing
  • GKE: Standard cluster costs
  • Gemini API: $3.50/1M tokens (Pro)

📚 Reference Architecture

Production Agent System:

┌─────────────────┐
│   Load Balancer │
└────────┬────────┘
         │
    ┌────▼────┐
    │Cloud Run│ (Agent containers)
    └────┬────┘
         │
    ┌────▼──────────┐
    │ Agent Engine  │ (Orchestration)
    └────┬──────────┘
         │
    ┌────▼────────────────┐
    │  Vertex AI Search   │ (RAG)
    │  Vector Search      │
    │  Gemini 2.5 Pro     │
    └─────────────────────┘

🎯 Best Practices for Jeremy

1. Start with Templates:

# Use Agent Starter Pack templates
uvx agent-starter-pack create my-agent --template agentic_rag

2. Local Development:

# Test locally first
adk serve --port 8080
curl http://localhost:8080/query -d '{"question": "test"}'

3. Gradual Deployment:

# Deploy to dev → staging → prod
asp deploy --env dev
# Test thoroughly
asp deploy --env staging
# Final production push
asp deploy --env production

4. Monitor Everything:

  • Enable Cloud Trace
  • Set up error reporting
  • Track token usage
  • Monitor response times
  • Set up alerting

📖 Official Documentation

Core Resources:

Tutorials:

When This Skill Activates

This skill automatically activates when you mention:

  • Agent development, ADK, or Agent Starter Pack
  • Multi-agent systems or orchestration
  • Containerized agent deployment
  • Cloud Run, GKE, or Agent Engine deployment
  • RAG agents or ReAct agents
  • Agent templates or scaffolding
  • CI/CD for agents
  • Production agent systems

Integration with Other Services

Google Cloud:

  • Vertex AI (Gemini, Search, Vector Search)
  • Cloud Storage (data storage)
  • Cloud Functions (triggers)
  • Cloud Scheduler (automation)
  • Cloud Logging & Monitoring

Third-party:

  • LangChain integration
  • CrewAI orchestration
  • Custom tool frameworks

Success Metrics

Track:

  • Agent response time (target: <2s)
  • Evaluation scores (target: >85% accuracy)
  • Deployment frequency (target: daily)
  • System uptime (target: 99.9%)
  • Cost per query (target: <$0.01)

This skill makes Jeremy a Google Cloud agent architecture expert with instant access to ADK, Agent Starter Pack, and production deployment patterns.

Prerequisites

  • Access to project files in {baseDir}/
  • Required tools and dependencies installed
  • Understanding of skill functionality
  • Permissions for file operations

Instructions

  1. Identify skill activation trigger and context
  2. Gather required inputs and parameters
  3. Execute skill workflow systematically
  4. Validate outputs meet requirements
  5. Handle errors and edge cases appropriately
  6. Provide clear results and next steps

Output

  • Primary deliverables based on skill purpose
  • Status indicators and success metrics
  • Generated files or configurations
  • Reports and summaries as applicable
  • Recommendations for follow-up actions

Error Handling

If execution fails:

  • Verify prerequisites are met
  • Check input parameters and formats
  • Validate file paths and permissions
  • Review error messages for root cause
  • Consult documentation for troubleshooting

Resources

  • Official documentation for related tools
  • Best practices guides
  • Example use cases and templates
  • Community forums and support channels

More by jeremylongshore

View all →

designing-database-schemas

jeremylongshore

Design and visualize efficient database schemas, normalize data, map relationships, and generate ERD diagrams and SQL statements.

887

d2-diagram-creator

jeremylongshore

D2 Diagram Creator - Auto-activating skill for Visual Content. Triggers on: d2 diagram creator, d2 diagram creator Part of the Visual Content skill category.

115

svg-icon-generator

jeremylongshore

Svg Icon Generator - Auto-activating skill for Visual Content. Triggers on: svg icon generator, svg icon generator Part of the Visual Content skill category.

334

fuzzing-apis

jeremylongshore

Perform automated fuzz testing on APIs to uncover vulnerabilities, crashes, and unexpected behaviors using diverse malformed inputs.

773

performing-penetration-testing

jeremylongshore

This skill enables automated penetration testing of web applications. It uses the penetration-tester plugin to identify vulnerabilities, including OWASP Top 10 threats, and suggests exploitation techniques. Use this skill when the user requests a "penetration test", "pentest", "vulnerability assessment", or asks to "exploit" a web application. It provides comprehensive reporting on identified security flaws.

263

performing-security-audits

jeremylongshore

This skill allows Claude to conduct comprehensive security audits of code, infrastructure, and configurations. It leverages various tools within the security-pro-pack plugin, including vulnerability scanning, compliance checking, cryptography review, and infrastructure security analysis. Use this skill when a user requests a "security audit," "vulnerability assessment," "compliance review," or any task involving identifying and mitigating security risks. It helps to ensure code and systems adhere to security best practices and compliance standards.

32

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

282789

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

205415

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

200282

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

210231

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

169197

rust-coding-skill

UtakataKyosui

Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.

165173

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.