Gemini
This article explains how to connect the Demandbase server to a custom Google Agent Development Kit (ADK) agent, deploy the agent to Vertex AI Agent Engine, and register it with Gemini Enterprise so Google Workspace users can access Demandbase tools from Gemini.
Architecture
The integration consists of four components:
- ADK agent: A Python
LlmAgentbuilt withgoogle-adk. - Demandbase MCP server: A remote Streamable HTTP endpoint that exposes Demandbase intelligence tools.
- Vertex AI Agent Engine: A managed runtime that hosts the deployed agent.
- Gemini Enterprise: The interface where Google Workspace users interact with the agent.
Prerequisites
Make sure you have:
- Google Cloud project with Vertex AI enabled.
- Permission to create and deploy Vertex AI Agent Engine resources.
- A supported Python version for ADK.
- Demandbase MCP server credentials.
- Google Workspace admin access (required only if you plan to register the agent in Gemini Enterprise).
Step 1: Set Up the Environment
- Log in to Google Cloud.
- Install ADK and create a Python virtual environment.
- Verify that billing is enabled and your Google Cloud project is configured for Vertex AI.
Example setup:
gcloud auth login
gcloud config set project <YOUR_GCP_PROJECT_ID>
python3 -m venv .venv
source .venv/bin/activate
pip install google-adkStep 2: Create the ADK Project
Create the project using the standard ADK structure:
- Python entrypoint for the agent.
- Dependency file such as
requirements.txtorpyproject.tom. - Local config file for environment variables and secrets.
Important: Store MCP connection details and credentials outside source control.
Step 3: Connect the Demandbase MCP Server
Configure the ADK McpToolset to connect to the Demandbase MCP server. See Google's article Model Context Protocol Tools.
Configure the connection with these values:
- MCP server URL:
https://gateway.demandbase.com/mcp/servers/db-mcp - Protocol: Streamable HTTP
- Auth method: Bearer token in the
Authorizationheader
The MCP server exposes tools including:
search_internal_account_databasesearch_internal_person_databasecompany_global_directorycontact_global_directoryget_demandbase_reference_data
Example agent wiring:
from google.adk.agents import LlmAgent
from google.adk.tools import McpToolset
db_mcp = McpToolset(
server_url="https://gateway.demandbase.com/mcp/servers/db-mcp",
headers={
"Authorization": f"Bearer {MCP_BEARER_TOKEN}",
},
)
agent = LlmAgent(
model="gemini-2.0-flash",
name="demandbase_agent",
tools=[db_mcp],
)Step 4: Deploy to Vertex AI Agent Engine
Deploy the agent using the ADK CLI or your preferred deployment workflow. See Google article Scale your agents.
- Package the agent and its dependencies.
- Deploy the agent to Vertex AI Agent Engine.
- Record the resulting
reasoningEngineresource name. - Verify the deployment in the Google Cloud Console.
After deployment, verify that the agent can connect to the Demandbase MCP server and retrieve the available tools.
Step 5: Register the agent in Gemini Enterprise
Register the deployed agent in Gemini Enterprise. See Google's article Register and manage ADK agents hosted on Gemini Enterprise Agent.
- Open Google Cloud Console.
- Go to Vertex AI > Agent Builder > Gemini Enterprise.
- Open or create the Gemini Enterprise app you want to extend.
- Select Agents.
- Click + Add agent.
- Select Custom agent via Agent Engine.
- Paste the
reasoningEngineresource name from Vertex AI Agent Engine. - Configure the authorization credentials required for the Google Workspace integration.
Demandbase Support provides the following authorization values:
clientIdclientSecrettokenUriauthorizationUri
Step 6: Verify the Integration
- Open Gemini as a Google Workspace user.
- Confirm that the custom agent is available.
- Run a request that invokes a Demandbase MCP tool.
- If the request fails, review the Vertex AI Agent Engine logs.
Verification Method
Confirm that:
- The agent returns results from Demandbase tools.
- Gemini successfully authenticates Google Workspace users.
- The deployed Agent Engine resource is reachable from Gemini Enterprise.
Troubleshooting
- If the agent cannot reach the Demandbase MCP server, verify the bearer token and server URL.
- If Gemini registration fails, verify the OAuth credentials and the
reasoningEngineresource name. - If the agent deploys but tools don't appear, verify the
McpToolsetconfiguration. - If requests fail after registration, review Cloud Logging for Vertex AI Agent Engine and the agent runtime logs.
Recommended Rollout Checklist
Before making the integration available to users, verify that:
- Google Cloud project is configured.
- Vertex AI is enabled.
- ADK environment is created.
- Demandbase MCP credentials are configured.
- Agent is deployed to Vertex AI Agent Engine.
- Gemini Enterprise authorization is configured.
- Agent is available to Google Workspace users.
- End-to-end tool calls are verified.
Updated 17 days ago