GEMINI LABJP
NANOLITE — Nano Banana 2 Lite is here: Google's fastest and most cost-efficient Gemini Image model, made for running lightweight image generation cheaplyOMNIFLASH — Gemini Omni Flash is in public preview, a natively multimodal model that lets enterprises and developers build custom, dynamic video workflowsAGENTS — Managed Agents expand with background: true for async server-side runs and polling, remote MCP server integration, and refreshing credentials across interactionsMEMORY — The Memory Bank IngestEvents API is generally available, decoupling event ingestion from memory generation so you can stream content continuouslyTHROUGHPUT — Provisioned Throughput now lets you submit up to seven pending orders for the same model and regionDEPRECATE — Image generation models shut down on August 17, and the Grok 4.1 family on the Gemini Enterprise Agent Platform on August 20NANOLITE — Nano Banana 2 Lite is here: Google's fastest and most cost-efficient Gemini Image model, made for running lightweight image generation cheaplyOMNIFLASH — Gemini Omni Flash is in public preview, a natively multimodal model that lets enterprises and developers build custom, dynamic video workflowsAGENTS — Managed Agents expand with background: true for async server-side runs and polling, remote MCP server integration, and refreshing credentials across interactionsMEMORY — The Memory Bank IngestEvents API is generally available, decoupling event ingestion from memory generation so you can stream content continuouslyTHROUGHPUT — Provisioned Throughput now lets you submit up to seven pending orders for the same model and regionDEPRECATE — Image generation models shut down on August 17, and the Grok 4.1 family on the Gemini Enterprise Agent Platform on August 20
Articles/Dev Tools
Dev Tools/2026-03-14Beginner

Vertex AI Agent Builder Getting Started — Build Gemini Agents with No Code

Build Gemini-powered AI agents with Vertex AI Agent Builder. Covers datastore integration, tool definitions, testing, and Cloud Run deployment.

Vertex AI11Agent BuilderGemini75no-code2Google Cloud5

Vertex AI Agent Builder Getting Started — Build Gemini Agents with No Code

Vertex AI Agent Builder enables construction and deployment of Gemini-based custom agents without code. This guide covers setup through production operations.

Agent Builder Overview

Key Features

  • No-Code UI: Build agents without writing code
  • Multi-Datasource Support: Integrate Cloud Storage, BigQuery, and websites
  • Custom Tools: Integrate REST APIs and serverless functions
  • Conversation Management: Automatic multi-turn conversation handling
  • Built-in Testing: Real-time testing in Playground
  • API Deployment: Export as standard REST API
ℹ️
Vertex AI Agent Builder is accessible directly from the Google Cloud console with no special setup required.

Setup and Initial Configuration

Prerequisites

# Create Google Cloud project
gcloud projects create my-agent-project
gcloud config set project my-agent-project
 
# Enable required APIs
gcloud services enable \
  aiplatform.googleapis.com \
  cloudfunctions.googleapis.com \
  run.googleapis.com \
  storage-api.googleapis.com \
  bigquery.googleapis.com

Creating an Agent

  1. Visit Google Cloud Console
  2. Navigate to Vertex AIAgent Builder
  3. Click Create Agent
  4. Enter configuration:
    • Agent Name: e.g., customer-support-agent
    • Description: Describe agent purpose
    • Model: Select Gemini 2.5 Pro or Gemini 3 Pro
    • Region: asia-northeast1 (Japan) recommended

Setting Agent Instructions (System Prompt)

Basic Prompt Configuration

In Console UI, enter the following sections:

Agent Role:
You are a customer support agent. Based on the knowledge base,
provide answers to user questions.

Behavior Guidelines:
1. First, understand user intent
2. Search for relevant documents
3. Provide only reliable information
4. Suggest escalation to human agent when unable to answer

Language: English
Tone: Professional and helpful

Dynamic Prompt Setup with Python

from google.cloud import aiplatform
 
def create_agent_with_custom_prompt(project_id, region, agent_name, prompt_text):
    """Create agent with custom system prompt"""
 
    client = aiplatform.gapic.v1.AgentsClient(
        client_options={"api_endpoint": f"{region}-aiplatform.googleapis.com"}
    )
 
    location = client.common_location_path(project_id, region)
 
    # Agent configuration
    agent = {
        "display_name": agent_name,
        "description": "Custom Gemini Agent",
        "system_instruction": {
            "parts": [{"text": prompt_text}]
        },
        "model": "gemini-2.5-pro"
    }
 
    request = {
        "parent": location,
        "agent": agent
    }
 
    response = client.create_agent(request)
    return response
 
# Usage example
prompt = """You are a technical support agent.
Diagnose user technical issues and provide step-by-step solutions."""
 
agent = create_agent_with_custom_prompt(
    project_id="my-project",
    region="us-central1",
    agent_name="technical-support",
    prompt_text=prompt
)

Datastore Integration

Cloud Storage Integration

  1. Create Knowledge Base:

    • In Agent Builder → Datastores
    • Click Create DatastoreCloud Storage
    • Specify GCS bucket path (e.g., gs://my-knowledge-base/docs)
  2. Prepare Documents:

# Upload documents
gsutil cp -r ./documents/* gs://my-knowledge-base/docs/
  1. Configure Search:
    • Search Type: Hybrid (keyword + semantic)
    • Chunk Size: 1000 tokens
    • Overlap: 200 tokens

BigQuery Integration

-- Example BigQuery table
CREATE TABLE `my-project.agent_data.products` (
  product_id STRING,
  product_name STRING,
  description STRING,
  price FLOAT64,
  stock_quantity INT64,
  created_at TIMESTAMP
);
 
-- Insert sample data
INSERT INTO `my-project.agent_data.products` VALUES
  ('PROD001', 'Python Basics Book', 'Python beginner guide', 28.00, 150, CURRENT_TIMESTAMP()),
  ('PROD002', 'API Design Guide', 'REST API best practices', 35.00, 80, CURRENT_TIMESTAMP());

In Agent Builder, specify BigQuery datasource:

  • Path: projects/my-project/datasets/agent_data/tables/products
  • Query Type: Auto-generated (LLM dynamically generates queries)

Website Crawling

  1. Datastore Settings:

    • Select Website
    • Enter crawl target URL (e.g., https://docs.example.com)
    • Crawl depth: 3 levels
  2. Update Schedule:

    • Auto-update: Daily at 2 AM
⚠️
When crawling copyrighted content, verify robots.txt and site terms of use.

Defining Custom Tools

Cloud Functions Integration

# Cloud Functions: product_lookup.py
import functions_framework
import json
from google.cloud import bigquery
 
client = bigquery.Client()
 
@functions_framework.http
def lookup_product(request):
    """Look up product information"""
 
    request_json = request.get_json()
    product_id = request_json.get('product_id')
 
    if not product_id:
        return json.dumps({
            "status": "error",
            "message": "product_id is required"
        }), 400
 
    # BigQuery query
    query = f"""
    SELECT
      product_id,
      product_name,
      description,
      price,
      stock_quantity
    FROM `my-project.agent_data.products`
    WHERE product_id = '{product_id}'
    LIMIT 1
    """
 
    results = list(client.query(query).result())
 
    if results:
        product = results[0]
        return json.dumps({
            "status": "success",
            "product": {
                "id": product['product_id'],
                "name": product['product_name'],
                "description": product['description'],
                "price": float(product['price']),
                "stock": int(product['stock_quantity'])
            }
        }), 200
    else:
        return json.dumps({
            "status": "not_found",
            "message": f"Product {product_id} not found"
        }), 404
 
# Deploy
# gcloud functions deploy lookup_product \
#   --runtime python311 \
#   --trigger-http \
#   --allow-unauthenticated

Tool Definition in Agent Builder UI

  1. Click Add Tool
  2. Select REST API
  3. Enter configuration:
{
  "name": "product_lookup",
  "description": "Get product information by product ID",
  "endpoint": "https://REGION-my-project.cloudfunctions.net/lookup_product",
  "method": "POST",
  "parameters": [
    {
      "name": "product_id",
      "type": "string",
      "description": "Product ID (e.g., PROD001)",
      "required": true
    }
  ],
  "response_schema": {
    "type": "object",
    "properties": {
      "status": {"type": "string"},
      "product": {
        "type": "object",
        "properties": {
          "id": {"type": "string"},
          "name": {"type": "string"},
          "price": {"type": "number"},
          "stock": {"type": "integer"}
        }
      }
    }
  }
}

Testing in Playground

Basic Testing

  1. Open "Playground" panel on the right side of Agent Builder UI
  2. Enter test message:
    Tell me about PROD001
    
  3. Click Send
  4. Review agent response

Test Cases

Query: Show me products under $30
Expected:
- Query BigQuery
- Search matching products
- Display in table format

Query: Which products have stock > 100?
Expected:
- Search multiple products
- Comparative analysis
- Display as list
ℹ️
Playground enables real-time agent testing. Conduct thorough testing before deployment.

Deployment to API Endpoint

Manual Deployment

  1. Click Deploy in Agent Builder UI
  2. Select deployment method:
    • API Endpoint: Publish as REST API
    • Chat Application: Vertex AI chat widget
    • Slack: Integrate with Slack workspace

Deploy to Cloud Run

# Get agent ID
AGENT_ID="projects/my-project/locations/us-central1/agents/abc123"
 
# Deploy to Cloud Run
gcloud run deploy my-agent \
  --image gcr.io/cloud-ai-solutions/agent-runtime:latest \
  --environment-variables AGENT_ID=$AGENT_ID \
  --region us-central1 \
  --allow-unauthenticated

Calling API from Python

REST API Client

import requests
 
class AgentAPIClient:
    """Vertex AI Agent API client"""
 
    def __init__(self, endpoint_url, api_key):
        self.endpoint = endpoint_url
        self.api_key = api_key
 
    def send_message(self, user_message, session_id=None):
        """Send message to agent"""
 
        headers = {
            "Authorization": f"Bearer {self.api_key}",
            "Content-Type": "application/json"
        }
 
        payload = {
            "user_input": user_message,
            "session_id": session_id or "default-session"
        }
 
        response = requests.post(
            f"{self.endpoint}/chat",
            headers=headers,
            json=payload
        )
 
        if response.status_code == 200:
            return response.json()
        else:
            raise Exception(f"API Error: {response.status_code}")
 
    def get_session_history(self, session_id):
        """Get session conversation history"""
 
        headers = {
            "Authorization": f"Bearer {self.api_key}"
        }
 
        response = requests.get(
            f"{self.endpoint}/sessions/{session_id}/history",
            headers=headers
        )
 
        return response.json() if response.status_code == 200 else []
 
# Usage example
client = AgentAPIClient(
    endpoint_url="https://REGION-my-project.run.app",
    api_key="your-api-key"
)
 
# Send message
response = client.send_message(
    user_message="Compare prices of PROD001 and PROD002",
    session_id="user-123"
)
 
print("Agent response:", response.get("response"))
print("Tools used:", response.get("tools_used", []))
 
# Check session history
history = client.get_session_history("user-123")
for msg in history:
    print(f"{msg['role']}: {msg['content']}")

Monitoring and Analytics

Cloud Logging

# View logs
gcloud logging read \
  "resource.type=cloud_run_revision AND \
   resource.labels.service_name=my-agent" \
  --limit 50
 
# Filter for errors only
gcloud logging read \
  "severity=ERROR AND resource.type=cloud_run_revision" \
  --limit 20

Python Log Analysis

from google.cloud import logging as cloud_logging
from datetime import datetime, timedelta
 
def analyze_agent_usage(project_id, hours=24):
    """Analyze agent usage statistics"""
 
    logging_client = cloud_logging.Client(project=project_id)
 
    # Get logs from last 24 hours
    start_time = datetime.utcnow() - timedelta(hours=hours)
 
    filter_str = f"""
    timestamp >= "{start_time.isoformat()}Z" AND
    resource.type="cloud_run_revision" AND
    jsonPayload.agent_id="{project_id}"
    """
 
    entries = logging_client.list_entries(filter_=filter_str)
 
    stats = {
        "total_messages": 0,
        "successful_queries": 0,
        "failed_queries": 0,
        "average_response_time": 0,
        "tools_used": {}
    }
 
    response_times = []
 
    for entry in entries:
        payload = entry.payload
        stats["total_messages"] += 1
 
        if payload.get("status") == "success":
            stats["successful_queries"] += 1
        else:
            stats["failed_queries"] += 1
 
        if "response_time_ms" in payload:
            response_times.append(payload["response_time_ms"])
 
        for tool in payload.get("tools_used", []):
            stats["tools_used"][tool] = stats["tools_used"].get(tool, 0) + 1
 
    if response_times:
        stats["average_response_time"] = sum(response_times) / len(response_times)
 
    return stats
 
# Usage example
usage = analyze_agent_usage("my-project")
print(f"Total messages: {usage['total_messages']}")
print(f"Success: {usage['successful_queries']}, Failed: {usage['failed_queries']}")
print(f"Avg response time: {usage['average_response_time']:.2f}ms")
print(f"Tools used: {usage['tools_used']}")

Best Practices

1. Phased Implementation

Phase 1: Minimal Setup
- Simple system prompt
- Single datasource
- Basic testing

Phase 2: Feature Expansion
- Multiple datasources
- Custom tools
- Comprehensive testing

Phase 3: Production
- Monitoring/logging
- Performance optimization
- Security hardening

2. Security Configuration

# Minimize service account permissions
gcloud iam roles create agent-runtime-role \
  --permissions=bigquery.dataEditor,storage.objectViewer,run.invoker
 
# Encrypt conversation history with CMEK
gcloud firestore databases create \
  --database-type=firestore-native \
  --cmek-config=projects/my-project/locations/global/keyRings/my-keyring/cryptoKeys/my-key
⚠️
Always implement authentication/authorization in production and configure appropriate access controls for databases.

Looking back

Vertex AI Agent Builder enables construction of:

  • Customer Support: FAQ-based automated responses
  • Sales Support: CRM data integration
  • Technical Support: Knowledge base search
  • Data Analysis: Automated BigQuery analysis

The no-code UI dramatically improves development efficiency while delivering enterprise-grade functionality.

Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

Dev Tools2026-03-14
Vertex AI Gemini Production Guide— Enterprise-Scale Deployment Implementation
Deploy Gemini at enterprise scale on Vertex AI. Covers service account auth, provisioned throughput, prompt filtering, Cloud Run integration, monitoring, and cost management for production workloads.
Dev Tools2026-06-24
Folding a Local Gemma 4 into Daily Work — Practical Notes on the Ollama API and Response Speed
Taking a local Gemma 4 you can now run interactively and folding it into real work: how to hit Ollama's local API from a script, tricks to improve perceived response speed, and a two-tier fallback that automatically routes to the cloud Gemini API — code included.
Dev Tools2026-06-24
Running Gemma 4 Locally on Windows — A Hands-On LLM in Two Commands with Ollama
How to run Google's lightweight open model Gemma 4 locally on a Windows laptop. With Ollama, you go from install to running in effectively two commands. Plus how to split work between the cloud Gemini API and a local Gemma.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →