Google Vertex Agent¶
Google Vertex Agent
is a third-party agent hosted on the Vertex AI Agent Builder of the Google Cloud platform. These agents leverage Google's foundation models, search, and conversational AI capabilities to automate tasks, personalize interactions, and improve efficiency across various industries.
Our AI Refinery SDK allows seamless integration with a user's customized Google Vertex Agent
using the GoogleAgent
class. This integration brings the full power of the Google Vertex Agent
to applications, enhancing performance and capabilities on our AI Refinery platform.
Creating Google Vertex Agent ¶
Users can customize an Google Vertex Agent
through the Vertex AI Agent Builder. Google provides a dedicated Agent Development Kit (ADK) that helps you build and customize your agents. To build and configure your agents, you will need to:
- Sign Up for a Google Cloud Platform account.
- Obtain your account credentials: You can create and save your service account credentials to your account. The generated set of credentials is saved locally in a JSON-formatted file named
creds.json
. You will need these to configure your agent in AIR later. - Build your agents in the Vertex AI Agent Builder. The platform provides a quickstart guide, several agent-building tutorials, and a comprehensive list of pre-built agents to draw inspiration from.
- After you build your agent, obtain its resource name, which is the unique identifier for your agent and allows you to connect to it externally. The resource name can be obtained after navigating to the newly built agent and follows the format below: You will also need this resource name to configure your agent in AIR later.
Onboarding Google Vertex Agent¶
To use the Google Vertex agents through our AI Refinery SDK, users need the following parameters:
Variable | Description |
---|---|
creds.json |
JSON-formatted filewith a standardized structure containing your Google authentication credentials. You export this file directly from your Google Cloud Platform account. |
resource_name |
Unique identifier that specifies the agent instance in the Google Cloud Platform. You also obtain that from the Google Cloud Platform. |
Workflow Overview¶
The workflow of the GoogleAgent
class consists of four components:
- Initialization: An agent is created in the Vertex AI Agent Builder and registered in AI Refinery with the specified configuration.
- Sending a Query: A user query is forwarded from AI Refinery to the
Google Vertex Agent
running on the Google Cloud platform. - Google-Side Processing: The
Google Vertex Agent
decides whether to use predefined tools, knowledge bases, or other resources and processes the query in the Google Cloud platform. - Receiving and Parsing the Response: The
Google Vertex Agent
returns the processed results as its final response to AI Refinery.
Usage and Quickstart¶
To quickly set up an AI Refinery project with a GoogleAgent
, the user should first create their own Google Vertex Agent
in Vertex AI Agent Builder. Once the agent is ready, use the YAML configuration template below to integrate it into the AI Refinery project.
Specifically, ensure the following configurations are included:
- Add a utility agent with
agent_class: GoogleAgent
underutility_agents
. - Ensure the
agent_name
you chose for yourGoogleAgent
is listed in theagent_list
underorchestrator
.
Before running your agent script, make sure you point the agent to your previously downloaded Google credentials file creds.json by running the following command:
Template YAML Configuration of GoogleAgent
¶
See the YAML template below for the GoogleAgent
configuration.
orchestrator:
agent_list:
- agent_name: "Google Trends Agent"
utility_agents:
- agent_class: GoogleAgent
agent_name: "Google Trends Agent"
agent_description: "The Google Trends Agent uses the Google Search tool to find trending terms from Google Trends website."
config:
resource_name: "projects/my_project_id/locations/my_project_location/resources/my_resource_type/ my_resource_id" # Required: The resource name of the agent in the Google Cloud Platform
contexts: # Optional: Additional context that may be provided to the agent
- "date"
- "chat_history"