Gemini Enterprise Agent Platform
The Gemini Enterprise Agent Platform is the area of the Google Cloud Platform that allows users to develop and deploy AI Agents.
The platform focuses on 4 areas. Build, which contains Agent Garden, ADK, MCP Servers, RAG Engine, Vector Search, and Search. Scale contains Deployments, Memory Bank, and Sessions. Govern hosts Agent Registry, Policies, Gateways, and Security. Finally, Optimize contains Topology and Evaluation.
Let’s dive down into the AI Agent build.
Build
The first section of the build is the Agent Garden.
Agent Garden is a library of pre-defined agents for developers to select for use. It contains agent-based solutions in the form of end-to-end templates for functions like customer support, data analysis, financial advisory, etc.
The user can find agents based on functionality.
You can choose from categories on the left-hand side or use a search bar for specific functionality.
For example, if I wanted to find a pre-built agent with Multimodal capabilities, I could click it, and the agent would appear on the right-hand side.
Or you can search for agents by keywords
ADK
The Agent Development Kit (ADK) provides developers with a framework to develop and deploy AI Agents using standard programming platforms like Python, TypeScript, Go, or Java. ADK is a library that can be imported directly into your program.
You can build Multi-Agent processes where the main agent can delegate tasks to sub-agents.
Unified Tooling & MCP: Built-in hooks to connect agents to APIs, databases, external tools, or custom Python code using standard interfaces like the Model Context Protocol (MCP).
ADK Example
pip install google-adk
Create an agent project
Run the adk create command to start a new agent project.
$ adk create my_agent
Choose a model for the root agent:
1. gemini-2.5-flash
2. Other models (fill later)
Choose model (1, 2): 1
1. Google AI
2. Vertex AI
Choose a backend (1, 2): 2
Enter Google Cloud project ID [cloud-project-examples]: cloud-project-examples
Enter Google Cloud region [us-central1]:
Agent created in /home/john_iacovacci1/my_agent:
- .env
- __init__.py
- agent.py
Python code agent.py
from google.adk.agents.llm_agent import Agent
root_agent = Agent(
model='gemini-2.5-flash',
name='root_agent',
description='A helpful assistant for user questions.',
instruction='Answer user questions to the best of your knowledge',
)
echo 'GOOGLE_API_KEY="AQ.Ab8RN6KCxLagGx6QpKI05tTxkIZ2On_JCU5zDWQZ6izBcUO10w"' > .env
from google.adk.agents.llm_agent import Agent
# Mock tool implementation
def get_current_time(city: str) -> dict:
"""Returns the current time in a specified city."""
return {"status": "success", "city": city, "time": "10:30 AM"}
root_agent = Agent(
model='gemini-2.5-flash', # <-- Change this from 'gemini-flash-latest'
name='root_agent',
description="Tells the current time in a specified city.",
instruction="You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool for this purpose.",
tools=[get_current_time],
)
Module Import
from google.adk.agents.llm_agent import Agent
Imports the Agent class library
Agent class allows for the model to understand instructions, manage memory and call functions
Tool Definition (Function & Docstring)
def get_current_time(city: str) -> dict:
"""Returns the current time in a specified city."""
return {"status": "success", "city": city, "time": "10:30 AM"}
(city: str) -> dict: provides format for models tool input
"""Returns the current time in a specified city.""" - Describes what the tool will do.
{"status": "success", "city": city, "time": "10:30 AM"} - provides a format for the tools output
Agent Configuration
root_agent = Agent(
model='gemini-2.5-flash',
name='root_agent',
description="Tells the current time in a specified city.",
instruction="You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool for this purpose.",
tools=[get_current_time],
)
model='gemini-2.5-flash' tells the program what model you want to use.
name='root_agent' - Standard naming convention identifier for the agent. When sub-agents are used this helps with routing and tracing.
description="Tells the current time in a specified city.", - Tells what the agent will do.
instruction="You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool for this purpose.",
Provides the model prompts, the role, purpose, guidance and constraints.
tools=[get_current_time] - Provides the model with a specific python tool it should use.
Working program
pip install geopy timezonefinder
import urllib.request
import json
from geopy.geocoders import Nominatim
from timezonefinder import TimezoneFinder
from google.adk.agents.llm_agent import Agent
# Initialize spatial lookups once outside the function
geolocator = Nominatim(user_agent="adk_time_agent")
tf = TimezoneFinder()
def get_current_time(city: str) -> dict:
"""Returns the current local time in any specified city worldwide."""
try:
# 1. Look up city latitude and longitude
location = geolocator.geocode(city)
if not location:
return {"status": "error", "message": f"Could not locate city '{city}'."}
# 2. Find the exact IANA timezone string for those coordinates
timezone_str = tf.timezone_at(lng=location.longitude, lat=location.latitude)
if not timezone_str:
return {"status": "error", "message": f"Could not determine timezone for '{city}'."}
# 3. Query the Time API using the dynamically discovered timezone
api_url = f"https://timeapi.io/api/v1/time/current/zone?timeZone={timezone_str}"
req = urllib.request.Request(api_url, headers={'User-Agent': 'Mozilla/5.0'})
with urllib.request.urlopen(req) as response:
data = json.loads(response.read().decode())
return {
"status": "success",
"city": location.address,
"time": data["time"],
"date": data["date"],
"timezone": timezone_str
}
except Exception as e:
return {"status": "error", "message": f"Could not retrieve time for {city}: {str(e)}"}
root_agent = Agent(
model='gemini-2.5-flash',
name='root_agent',
description="Tells the current time in any specified city worldwide.",
instruction="You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool. If the tool returns an error, inform the user clearly.",
tools=[get_current_time],
)
geolocator = Nominatim(user_agent="adk_time_agent") tf = TimezoneFinder()
The geopy Python library is used with the Nominatim API to allow users to find locations around the Globe.
TimezoneFinder() is a Python library used to map GPS locations.
location = geolocator.geocode(city)
if not location:
return {"status": "error", "message": f"Could not locate city '{city}'."}
Provides locations of city entered
timezone_str = tf.timezone_at(lng=location.longitude, lat=location.latitude)
Finds the time zone the city is located in
api_url = f"https://timeapi.io/api/v1/time/current/zone?timeZone={timezone_str}"
req = urllib.request.Request(api_url, headers={'User-Agent': 'Mozilla/5.0'})
with urllib.request.urlopen(req) as response:
data = json.loads(response.read().decode())
return {
"status": "success",
"city": location.address,
"time": data["time"],
"date": data["date"],
"timezone": timezone_str
}
Goes to the TimeAPI.io to pull time within that zone.
$ adk run my_agent
[user]: What time is it in Kyoto?
[root_agent]: The current time in Kyoto, Japan is 00:20:22 on 2026-07-28.
[user]: What time is it in Los Angeles
[root_agent]: The current time in Los Angeles, United States is 08:21:04 on 2026-07-27.
MCP Servers
Model Context Protocol is a standard designed to simplify the way models work with external tools and APIs.
When models connect to APIs, they need to understand how to connect to the API and the specific commands needed. API requests are not flexible, making it cumbersome for AI models to use.
MCP provides a standard protocol in which AI models, APIs, and systems can communicate. MCP servers can be designed around APIs to advertise what the API does, as well as the inputs needed.
Some of the real-world categories where MCP Servers are used.
In code development and control, they can be used for integrating with GitHub or MySQL.
Google Workspace for calendaring, Jira for ticket management, or Salesforce for CRM.
Server and file access as well as Google Search.
Connecting to Data Warehouse capabilities like BigQuery.
Tool Servers allow for executable functions for a model like send_email. Resource Servers provide information regarding data and files. Prompt servers allow for pre-written prompts to be used.
Depending on where the code runs, MCP servers are divided into two main transport types:
Servers can be set up for local access on a user's machine or hosted on a cloud run process using HTTP for communication.
AI Agents/Models communicate with MCP Servers, which inform agents of available tools and required inputs.
MCP Servers then provide the Agent with the list
Agents send requests with parameters.
MCP servers send back results of those requests.
Example of MCP Servers available on the Cloud platform.
Google provides a list of pre-built MCP Servers for use.
Lets looks at the BiqQuery MCP Server
import os
from google.adk.agents import Agent
from google.adk.integrations.agent_registry import AgentRegistry
from google.adk.models import Gemini
from google.auth import default
from google.genai import types
_, project_id = default()
Server python code will import libraries and set project ID
LOCATION = os.environ.setdefault("GOOGLE_CLOUD_LOCATION", "global")
MCP_SERVER_NAME = os.environ.get(
"MCP_SERVER_NAME", "agentregistry-00000000-0000-0000-2b31-90dd2ce0ddc8"
)
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "True"
Next it will set up environmental variables and routing for end points.
registry = AgentRegistry(project_id=project_id, location=LOCATION)
mcp_toolset = registry.get_mcp_toolset(
f"projects/cloud-project-examples/locations/global/mcpServers/agentregistry-00000000-0000-0000-2b31-90dd2ce0ddc8"
)
Registers server and defines tools
root_agent = Agent(
name="sample",
description="You are a helpful AI Assistant who can answer questions.",
model=Gemini(
model="gemini-3.6-flash",
retry_options=types.HttpRetryOptions(attempts=3),
),
tools=[mcp_toolset],
)
Sets up sample agent
Defines the model
Provides tool information
When root_agent receives a user prompt:
The prompt and tool schemas sent to model.
Model determines if MCP tools to be called.
If a call is needed, ADK executes the request from MCP server URL
Returns result back to Model
MCP vs. Traditional APIs (Rewrite)
The Model Context Protocol (MCP) acts as an abstraction layer above standard APIs. Traditional APIs like REST do the backend work, but the AI model only interacts through the uniform MCP interface.
Before MCP, connecting an AI agent to multiple tools meant writing custom code for each service's API schema. If you wanted an agent to read a database, execute a GitHub action, and create a Jira ticket, you had to hand-build a separate integration for each one, managing individual endpoints and maintaining long system prompts to keep them all working together.
With MCP custom work is replaced by standard MCP servers built for each tool. Through the uniform MCP interface, the Al model discovers available functions and determines how to use them natively, no longer needing service specific logic. The backend API calls still happen, but MCP sits above them as a consistent layer the model can reason about.
Today, you can develop and test agent workflows locally using a CLI or web UI, then deploy them to a cloud runtime. An example of this would be Vertex AI or Google Kubernetes Engine.
RAG Engine
Retrieval-Augmented Generation(RAG) allows users to access APIs and infrastructure that provide specific data points you wish the model to prioritize.
RAG Engine provides access to non-public company or private data as well as targeted specific data sources.
Large Language Models (LLMs) use pre-trained information and can lead to hallucinations when using sourced information that is not 100% verified.
RAG connects an LLM to external data sources at the time of model use. The information can consist of more up-to-date data or fact-based data, while LLMs can use unverified data.
The RAG process consists of
Retrieve: The engine searches external data sources like databases, documents, or websites based on the user's query.
Augment: The information retrieved is then combined with the user's query, expanding the original request.
Generate: The new request is sent to the LLM, which will generate a more accurate response based on the targeted data sources.
As previously stated, RAG allows specific data access for the AI Agents.
Some of the key functionalities that it uses are ingestion, indexing, document parsing, chunking or splitting data, and embedding for enhanced searching.
The benefits include reduced hallucinations, up-to-date information, and Data Security.
The Data Store tool leverages RAG to provide structured, unstructured, and web data to the agent. Unstructured PDFs, HTML, or Word files can be accessed, as well as structured tabular data like csv’s and tables, as well as web domains.
RAG allows agents to access the data that the developer wishes the agent to focus on as a priority over its training data.
The Retrieve part searches the Data Store to provide relevant information. The Augment takes that information and adds it to user input. Generate delivers the response.
Example of RAG Corpus from Cloud Storage Bucket
A Corpus is a searchable container that holds data for RAG.
I can hold PDFs, digital text, Plain Text, Markdown and csv files.
Also, html pages, office files(docx, pptx), google files (docs and slides), code files(py, js, java, json, yaml)
Raw files are ingested into a Corpus and parses them into manageable chunks that models can retrieve quickly.
Conversational AI Agents
Now let's use AI Applications to build a conversational Agent.
We will use a RAG architecture to allow our LLM model to access a private data store containing financial data.
The model we will use is the Gemini 2.5 Flash, which is a multimodal model used for high-volume and low-latency applications.
The Playbook mode will be used for generative agents.
RAG will be used to access a Google Cloud Storage drive of unstructured data like pdf’s and Word docs
Discovery Engine API needs to be enabled from Cloud Shell
gcloud services enable discoveryengine.googleapis.com aiplatform.googleapis.com
Now let's go to the AI Applications menu and Hit Create App
We will Create a Conversational Agent
Hit Create App
Enter a Display Name - Finance Advisor Agent
Location - global
Time Zone - (GMT 5:00) America/New_York
Leave Playbook checked and hit Create
Use Playbook for conversation where Gen AI used to process user requests.
Next will will configure the playbook
Playbook name - Financial Advisor
Set a Goal
Goal -Help users analyze stock performance and retrieve financial metrics from SEC annual reports
Provide Instructions
Instructions - Greet the user, then ask which stock they want to analyze today
Then click Save
Now click +Data store
Tool Name - Finance Reports
Type - Data store
Description - Tool to retrieve financial metrics (Revenue, Net Income, Operating Expenses) for Stocks e.g. Apple, Google, and Microsoft
Then hit Save
Next Click on Create data store
Click Cloud Storage (unstructured data)
Data store name - Finance Data
Synchronization frequency - One time
Select a folder or a file you want to import - Use browse to select your cloud storage bucket
Hit Create
It will take a long time for this process
Next add data stores
Select the data source hit Confirm
Hit Save to save the tool
Go To Playbook Basic page
Update your instructions - Use ${TOOL: Finance Reports} for any request regarding Annual Metrics (, Microsoft, or Google's financial reportings.”),
Click SAVE
Using the 3 dots in the upper right hand corner of your screen select Toggle simulator
II can ask about Apple results and agent will send an answer based on documents on share
AI Agent sessions and Memory banks
Core Distinctions & Primary Roles
Summary:
The difference between AI Agents and traditional chatbots comes down to reasoning, planning, using tools, remembering information, and acting autonomously. Retrieval-Augmented Generation allows users to access APIs and infrastructure that provide specific data points you wish the model to prioritize, and Model Context Protocol provides a standardized way to connect agents to tools and APIs. Programs like Google’s ADK and Agent Platform provide frameworks for deploying agentic systems.
No comments:
Post a Comment