Build Your Investor Hunter AI Agent with ADK
Introduction and Setup
In this workshop, you will build a sophisticated Multi-Agent AI system designed to help you bulletproof your startup. Using the Google Agent Development Kit (ADK), you will create a "Virtual Board of Advisors" that stress-tests your pitch, validates your market assumptions against reports (mock in our workshops), and pulls live financial data to ensure your valuation holds up under scrutiny.
Depending on your experience with building agents, python programming language and Google Cloud, you can choose to follow this workshop in one of 3 ways:
- Use instructions & hints to write your own code
- Vibe code with instructions using your favourite AI Code assistant tool (you can try Google's Gemini CLI or Antigravity if you'd like!)
- Use provided code solutions (& amend them to your liking)
Additional notes
- If you will choose to work locally and not in Google Cloud Shell you need to have working python installation as well as Google Cloud CLI installed.
- ADK will provide you with a sample code to start with
- ADK documentation
- During this workshop we chose to go with pet business ideas and we provide you with prompts/queries/materials that will match that topic - feel free to change it to totally different topic. You can use Gemini or any other tool to generate different theme for your mock data.
Prerequisites
- Open Google Cloud Shell (or your local IDE if you prefer to work locally on your laptop). You can use your own Google Cloud Project or the one that was provided for you.
- Ensure you have your Google Cloud Project ID and a Google AI Studio API Key. (TODO: write instruction on how to obtain AI Studio API Key)
- In Google Cloud Shell or in your local IDE/terminal:
- Create virtual environment for python and install the required libraries:
Initialize ADK Project
Run the following commands to create your ADK project structure:
# Select Option 1 for first two ADK prompts, next provide your Google AI Studio API key
adk create investor_hunter
cd investor_hunter
All your work today will happen inside the agent.py file.
Inspect the created folder - notice the .env file - here you can change the API key if needed & provide various environment variables that will be used by your agents.
Level 1: The Brutal Honest Advocate
Your first task is to build the core of your advisory board. This agent acts as a "Devil's Advocate"—the person who finds every hole in your business model before a real investor does.
Task
Open agent.py and configure the root_agent to be your toughest critic.
Code Instructions
- Make sure
Agentclass is imported fromgoogle.adk.agents. - Define
root_agent. Give it ainstructiontelling it to be a skeptical, high-level consultant. Check out the guide on how to write good prompts. - Focus its critiques on: Burn rate, Unit Economics, and Moat.
- Experiment with models - set the
modelvariable to one of the following:gemini-2.5-flashgemini-2.5-progemini-3-flash-previewgemini-3.1-flash-lite-previewgemini-3.1-pro-preview
Task
Open agent.py and edit the code to configure the root_agent to evaluate startup ideas strictly.
đź’ˇ Need a hint?
You can read more about agent structure, in particular LLM agent in [here](https://google.github.io/adk-docs/agents/llm-agents/#defining-the-agents-identity-and-purpose).Example Code Solution
from google.adk.agents import Agent
# ==========================================
# LEVEL 1: THE BRUTAL DEVIL'S ADVOCATE
# ==========================================
# In Level 1, we define the persona. This agent doesn't have tools yet;
# it relies entirely on its internal logic to critique the founder's pitch.
root_agent = Agent(
name="devils_advocate",
model="gemini-2.5-flash",
instruction=(
"You are a skeptical startup advisor and a brutal devil's advocate. "
"Your goal is to stress-test the founder's idea by finding flaws in their "
"business model. Focus on burn rate, competition, and 'moats' (defensibility). "
"Be concise, direct, and do not hold back on criticism."
"Be fair - if the idea is good, acknowledge its strengths."
)
)
Test It
Run the following command in your terminal:
Open the provided localhost link and type your prompt, for example:
-
I am launching a premium cat toy subscription box. We have $500k in funding and plan to spend $400k on influencer marketing in month one to acquire users fast. (Expected behavior: The agent should ruthlessly attack the unsustainable customer acquisition cost.)
-
I'm building an app that connects dog owners with local parks. We will win because our UI is slightly better than Google Maps. (Expected behavior: The agent should point out the lack of defensibility.)
Level 2: The Market Truth-Seeker (RAG)
It is easy to fall into the trap of "market optimism." In this level, you will give your advisors access to mock market reports to ground your pitch in reality. We will be using mock data to ensure you will not have to wait long for indexing of the files to finish. We will use Vertex AI Search solution on Google Cloud. TBD: Provide link to the mock data files.
Task
Create a researcher_agent that uses a Vertex AI Search tool to verify your market size and competition claims.
Step 1: Create a bucket for files and connect it to Vertex Data Store, enable required APIs
- In new tab of your web browser, open Google Cloud console (you can use credentials provided to you by the organisers or use your own account & project).
- Go to the Cloud Storage in the Google Cloud console (tip: use search box at the top of the page) - create a bucket - the name must be globally unique, for location select
Region& pick your favourite one (Region picker, Available regions); you can leave all of the default settings as is. More information on buckets and their creation can be found here. Write down your bucket name. - Upload the file provided to you.
- Next, go to the AI Applications in the Google Cloud console (tip: use search box at the top of the page) - when prompted to Enable API - hit the blue button "Continue and activate the API" to enable it.
- Select the Data Store in left-hand pane and click New Data Store. Select Cloud Storage. Leave the default settings and select the bucket that you created. Review the documentation if you would like to learn more about configuration.
- Name your data store
pitch-war-room-data. - Wait for data being indexed (around 10mins) - this is a moment to stretch your legs, grab a coffee & learn what is the favourite pet of a person sitting next to you.
- You can check if import & processing was successful once you click on your newly created data store and select Activity tab.
- Enable Vertex AI API (click)
- Amend your .env file - we will switch from using Google AI Studio key, to enterprise grade Vertex AI API. It should look similar to this: (TBD: explain why)
Step 2: Connect Your Agent
Once your data store is created, copy the Data Store ID from the console.
Code Instructions
- Use the
data_store_idof your newly created datastore. - Create the
researcher_agent. It should only provide information when it has data to back it up. It should use VertexAiSearchTool. - Before running the code you need to authenticate to Google Cloud from the terminal:
gcloud auth application-default login. - If your pitch claims a $50B market and the data says $19B, this agent should correct you immediately.
đź’ˇ Need a hint?
You can learn more about Vertex AI Search [here](https://google.github.io/adk-docs/grounding/vertex_ai_search_grounding/#what-youll-learn).Example Code Solution
import os
from google.adk.agents import Agent
from google.adk.tools import DiscoveryEngineSearchTool
from google.adk.models.google_llm import Gemini
from google.genai import types
# ==========================================
# LEVEL 2 CONFIGURATION
# ==========================================
# Make sure to subsititute YOUR_PROJECT_ID and YOUR_DATASTORE_ID with proper values; if you # selected a region different from global, make sure to replace 'global' with your region as well.
DATASTORE_PATH = "projects/YOUR_PROJECT_ID/locations/global/collections/default_collection/dataStores/YOUR_DATASTORE_ID"
# 1. Initialize the Search Tool
# This tool allows the agent to "read" your documents in real-time.
search_tool = DiscoveryEngineSearchTool(data_store_id=DATASTORE_PATH)
# 2. Define the Truth-Seeker Agent
# We set this as the 'root_agent' so it's the one you interact with in the web UI.
root_agent = Agent(
name="market_truth_seeker",
model=shared_model,
instruction=(
"You are a data-driven market researcher. Your job is to verify startup "
"market claims against the provided research reports. If a founder "
"claims a market size or trend that contradicts the data, correct them "
"immediately using facts from the reports. Be concise and objective. "
"DO NOT attempt to check stock prices, live market caps, or valuations of public companies—"
"that is not your job. Simply focus on the market reports.\n\n"
"CRITICAL: If the user asks about public company valuations or stock tickers (like CHWY), "
"COMPLETELY IGNORE IT in your response. DO NOT even mention that you cannot check it. "
"Leave that part of the query entirely unaddressed so the Financial Analyst can handle it later.\n\n"
"CRITICAL: Do not make multiple parallel searches. Only execute ONE search at a time."
),
tools=[search_tool]
)
Test It
Restart your adk web (CTRL+C then adk web again) server and ask your questions (review the market_research.txt to verify what kind of information can be obtained from Vertex AI Search), for example:
- "Summarize the key barriers to entry in the pet-tech market according to the Q1 2026 internal report."
- "I am launching a new smart collar with a $15/month subscription. I project we will capture 20% of the $100 Billion global pet tech market." (Expected behaviour: The agent must aggressively correct the user on two fronts: the market is only $19.98 Billion, and 65% of owners refuse subscriptions over $9.99/month.)
- I'm building an Uber for dog walking. It's a blue-ocean market." (Expected behaviour: The agent should cite the 1,200 existing apps and the 94% failure rate due to high CAC)
Level 3: The Ultimate Pitch Coach (Multi-Agent System)
A great pitch needs to be compared against the "Gold Standards." You will now build a specialized analyst that fetches live stock market data for your public competitors.
Task
Build a multi-agent system where the Lead Coach delegates tasks to your Market Truth-Seeker and your new Financial Analyst.
Instructions
- Create a Python tool using
yfinanceto fetch live Market Caps. - Initialize the
lead_pitch_coachagent. - Link all agents together using the
sub_agents=[...]parameter.
đź’ˇ Need a hint on routing?
The `root_agent` doesn't need tools. It just needs the `sub_agents=[researcher_agent, analyst_agent]` parameter. ADK handles the conversation handoff automatically. Check out [ADK documentation](https://google.github.io/adk-docs/agents/multi-agents/#agent-hierarchy-parent-agent-sub-agents) for more information.Full Example Code Solution
import yfinance as yf
import os
from google.adk.agents import Agent
from google.adk.tools import DiscoveryEngineSearchTool
from google.adk.models.google_llm import Gemini
from google.genai import types
# ==========================================
# CONFIGURATION
# ==========================================
# Replace with the real Data Store Path from your Vertex AI console
# Format: projects/<ID>/locations/global/collections/default_collection/dataStores/<DS_ID>
DATASTORE_PATH = "projects/YOUR_PROJECT_ID/locations/global/collections/default_collection/dataStores/YOUR_DATASTORE_ID"
# 1. Initialize the Model with Auto-Retries
# This prevents 429 Resource Exhausted errors from crashing your server.
shared_model = Gemini(
model="gemini-2.5-flash",
retry_options=types.HttpRetryOptions(initial_delay=2, attempts=3)
)
# ==========================================
# TOOLS (The Advisor's Weapons)
# ==========================================
# 1. Market Research Tool (RAG)
# This tool lets the agent verify claims against your Q1 2026 market reports.
search_tool = DiscoveryEngineSearchTool(
data_store_id=DATASTORE_PATH
)
# 2. Financial Analyst Tool (Python Function)
# This fetches live stock data to compare a startup against public giants.
def get_competitor_valuation(ticker_symbol: str) -> str:
"""
Fetches the live market capitalization of a publicly traded competitor.
Args:
ticker_symbol (str): The stock ticker (e.g., 'UBER', 'CHWY', 'AAPL').
"""
try:
stock = yf.Ticker(ticker_symbol)
info = stock.info
cap = info.get('marketCap')
name = info.get('shortName', ticker_symbol)
if cap:
return f"{name} ({ticker_symbol}) has a live market cap of ${cap:,}."
return f"Could not find valuation for {ticker_symbol}."
except Exception as e:
return f"Financial data error: {str(e)}"
# ==========================================
# ADVISORY BOARD (The Sub-Agents)
# ==========================================
# The Market Truth-Seeker (Level 2)
researcher_agent = Agent(
name="market_truth_seeker",
model=shared_model,
instruction=(
"You are a cynical market researcher. Your job is to check the founder's "
"market size and competition claims against the internal reports. "
"If the founder is being too optimistic, correct them with the data. "
"DO NOT attempt to check stock prices, live market caps, or valuations of public companies—"
"that is not your job. Simply focus on the market reports.\n\n"
"CRITICAL: If the user asks about public company valuations or stock tickers (like CHWY), "
"COMPLETELY IGNORE IT in your response. DO NOT even mention that you cannot check it. "
"Leave that part of the query entirely unaddressed so the Financial Analyst can handle it later.\n\n"
"CRITICAL: Do not make multiple parallel searches. Only execute ONE search at a time."
),
tools=[search_tool]
)
# The Valuation Analyst (Level 3)
analyst_agent = Agent(
name="valuation_analyst",
model=shared_model,
instruction=(
"You are a numbers-focused financial analyst. You provide reality checks "
"by looking up the live valuations of public competitors. Be precise."
),
tools=[get_competitor_valuation]
)
# ==========================================
# THE WAR ROOM LEAD (Level 1 & 3 Root)
# ==========================================
# The Lead Pitch Coach acts as the "Root Agent" that the user talks to.
# It manages the other two agents to provide a full stress-test.
root_agent = Agent(
name="pitch_coach_lead",
model=shared_model,
instruction=(
"You are the Lead Pitch Coach. Your goal is to bulletproof the founder's pitch. "
"1. Listen to their startup idea.\n"
"2. Be a 'Brutal Devil's Advocate'—critique their burn rate and moat.\n"
"3. Delegate ONLY market size and industry numbers to 'market_truth_seeker'. Do NOT ask it about public valuations.\n"
"4. Delegate ONLY public competitor valuations to 'valuation_analyst'.\n"
"You MUST ensure both the market truth and the live public competitor valuations "
"have been checked before you give your final feedback to the user."
),
sub_agents=[researcher_agent, analyst_agent] # This enables multi-agent routing
)
Test It
Restart (CTRL+C) adk web. Pitch your startup to the coach. Ask it to verify your market assumptions and check the live valuation of a public competitor.
Example prompts: - I am pitching a direct-to-consumer premium dog food brand. I assume our total addressable market is at least $50 Billion. My goal is to eventually reach the scale and valuation of Chewy (CHWY). What do you think of this plan?
Level 4: Deploying to Cloud Run (Going Live)
Your Pitch Coach works perfectly on your local machine / cloud shell, but a real product needs to live in the cloud. In this final step, you will containerize your ADK application and deploy it to Google Cloud Run so it is accessible from anywhere on the internet.
Task
Enable the necessary Google Cloud APIs, create the deployment files (requirements.txt and Dockerfile), and use the Google Cloud CLI to deploy your agent.
Step 1: Enable additional Google Cloud APIs
To build and host your container, you must enable the necessary APIs on your project. Run this in your terminal:
gcloud services enable \
run.googleapis.com \
cloudbuild.googleapis.com \
artifactregistry.googleapis.com
Step 2: Prepare the Requirements
Create a new file named requirements.txt in your project folder and list your dependencies.
Step 3: Create the Dockerfile
Create a new file named Dockerfile (no file extension) in the same folder. This tells Cloud Run how to build and run your ADK server.
FROM python:3.11-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the project files into a named subfolder
COPY . ./investor_hunter/
# Cloud Run automatically sets the $PORT environment variable (defaults to 8080)
CMD adk web --port $PORT --host 0.0.0.0
Step 4: Create a Dedicated Service Account
For security best practices, we should run our cloud application with a dedicated Service Account using the principle of least privilege, rather than the default compute account.
Run these commands in your terminal to create a service account and grant it access to Vertex AI APIs:
# Set the project ID
export PROJECT_ID="YOUR_PROJECT_ID"
# 1. Create the service account
gcloud iam service-accounts create pitch-coach-sa \
--display-name="Pitch Coach Service Account"
# 2. Grant Vertex AI User access
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member="serviceAccount:pitch-coach-sa@$PROJECT_ID.iam.gserviceaccount.com" \
--role="roles/aiplatform.user"
# 3. Grant Vertex AI Search access
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member="serviceAccount:pitch-coach-sa@$PROJECT_ID.iam.gserviceaccount.com" \
--role="roles/discoveryengine.viewer"
Step 5: Deploy to Cloud Run
From the folder in which your Dockerfile is located run the deployment command in your terminal (commands below).
We pass GOOGLE_GENAI_USE_VERTEXAI=True so the ADK knows to use the enterprise Vertex API, and we bind our newly created service account securely to the instance!
When/if prompted:
- confirm Y to deploy the service
- confirm Y to allow unauthenticated invocations
gcloud run deploy pitch-coach-adk \
--source . \
--region europe-central2 \
--allow-unauthenticated \
--service-account pitch-coach-sa@$PROJECT_ID.iam.gserviceaccount.com \
--set-env-vars GOOGLE_GENAI_USE_VERTEXAI=True,GOOGLE_CLOUD_PROJECT="$PROJECT_ID"
Final Test
- The deployment will take about 2-3 minutes.
- Once finished, the terminal will output a Service URL (e.g.,
https://pitch-coach-adk-xyz.run.app). - Click that link! Your Multi-Agent Pitch Coach is now live on the internet - ready for testing.
Support & Resources
Congratulations! You have built a sophisticated Multi-Agent system using the Google Agent Development Kit (ADK) and deployed it to the cloud. You are now equipped to build production-grade AI tools for your startup.
📚 Official Documentation
- ADK GitHub Repository: GoogleCloudPlatform/external-agent-development-kit - This is the best place to check for new features and detailed architecture patterns.
- Gemini API Documentation: ai.google.dev - Deep dive into model capabilities, safety settings, and structured outputs.
- Vertex AI Search & Conversation: cloud.google.com/generative-ai-app-builder - Learn more about building enterprise RAG systems.
đź’ˇ Next Steps for Your Startup
- Optimize Your Prompts: Experiment with "Chain of Thought" prompting in your System Instructions to improve the Pitch Coach's reasoning.
- Add More Tools: Think about connecting your agent to your CRM (e.g., HubSpot) or your analytics dashboard (e.g., Mixpanel).
- Refine UI/UX: The
adk webinterface is great for testing, but you can use the ADK's API endpoints to power a custom frontend built in React, Flutter, or Next.js.
🤝 Stay in Touch
- Instructor: [Your Name / LinkedIn Link]
- Support: If you have questions about the ADK or this workshop, feel free to reach out via [Your Email/Twitter].
Thank you for participating! We can't wait to see what you build next.