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 LlmAgent built with google-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

  1. Log in to Google Cloud.
  2. Install ADK and create a Python virtual environment.
    1. ADK Python Github
    2. ADK open source docs
    3. ADK Quickstart (Vertex AI)
  3. 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-adk

Step 2: Create the ADK Project

Create the project using the standard ADK structure:

  • Python entrypoint for the agent.
  • Dependency file such as requirements.txt or pyproject.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 Authorization header

The MCP server exposes tools including:

  • search_internal_account_database
  • search_internal_person_database
  • company_global_directory
  • contact_global_directory
  • get_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.

  1. Package the agent and its dependencies.
  2. Deploy the agent to Vertex AI Agent Engine.
  3. Record the resulting reasoningEngine resource name.
  4. 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.

  1. Open Google Cloud Console.
  2. Go to Vertex AI > Agent Builder > Gemini Enterprise.
  3. Open or create the Gemini Enterprise app you want to extend.
  4. Select Agents.
  5. Click + Add agent.
  6. Select Custom agent via Agent Engine.
  7. Paste the reasoningEngine resource name from Vertex AI Agent Engine.
  8. Configure the authorization credentials required for the Google Workspace integration.

Demandbase Support provides the following authorization values:

  1. clientId
  2. clientSecret
  3. tokenUri
  4. authorizationUri

Step 6: Verify the Integration

  1. Open Gemini as a Google Workspace user.
  2. Confirm that the custom agent is available.
  3. Run a request that invokes a Demandbase MCP tool.
  4. 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 reasoningEngine resource name.
  • If the agent deploys but tools don't appear, verify the McpToolset configuration.
  • 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.


Did this page help you?