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:
- To obtain your Google AI Studio API key, follow these short steps:
- Sign In: Go to Google AI Studio and log in with your Google account (Accept the the required terms when prompted).
- Access API Keys: On the left-hand sidebar, click the "Get API key" icon
- Create Key:
- Click the blue "Create API key" button.
- Choose "Create API key in new project" (or select an existing Google Cloud project if you have one - for the provided accounts, select Import and choose the project that was given to you).
- Copy and Save: A pop-up will appear with your unique key. Click Copy and store it in a secure location, as you won't be able to see the full string again once you close the window.
Additional notes
- Security: Never hard-code your API key directly into public repositories (like GitHub). Use environment variables instead.
- Billing: If on your own account by default, you are on the Free Tier, which has generous rate limits for testing. You only need to set up billing if you require higher "Paid Tier" quotas. When using provided accounts, billing is already taken care of.
- To obtain your Google AI Studio API key, follow these short steps:
-
In Google Cloud Shell or in your local IDE/terminal:
- Create virtual environment for python and install the required libraries
- for Linux and macOS users:
- for Windows users:
- for Linux and macOS users:
- 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 in your newly created investor_hunter folder.
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.
If working in Cloud Shell, you may need to click on View -> Toggle hidden files to see the .env file.
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"— it 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.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. See mock data here (copy, paste & save as .txt file or generate your own). We will use Vertex AI Search solution on Google Cloud - grounding models with RAG reduces hallucinations and increases the reliability of the model's responses.
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 that you created (with data from here).
- 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 Stores in left-hand pane and click Create 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.
- If working in your own project enable Vertex AI API (click (if working in environment provided by us, it is already enabled)).
- 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:
Step 2: Connect Your Agent
Once your data store is created, copy the Data Store ID from the console - you will need it later on in the code.
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.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)
model = "gemini-2.5-flash"
# 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=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 server (CTRL+C then adk web again) and ask your questions (review the provided data sample 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 Agent delegates tasks to your Market Truth-Seeker Agent and your new Financial Analyst Agent.
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.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-3.1-flash-lite-preview",
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. Your ONLY job is to look up the "
"live valuations and market caps of public competitor companies (like CHWY) using "
"their stock tickers. You must provide precise valuation numbers."
),
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.\n"
"Step 1: ALWAYS delegate market size and industry assumptions to the 'market_truth_seeker'.\n"
"Step 2: ALWAYS delegate checking public competitor valuations (like CHWY) to the 'valuation_analyst'.\n"
"Step 3: Wait until you have received answers from BOTH sub-agents.\n"
"Step 4: Once you have data from both, synthesize it into a single, comprehensive response for the user.\n\n"
"Your final response to the user MUST be structured as follows:\n"
"1. **Market Reality Check**: Summarize what the truth seeker found.\n"
"2. **Valuation Reality Check**: Summarize the competitor's market cap.\n"
"3. **Devil's Advocate Critique**: Provide your brutal critique on their moat, burn rate, and business model feasibility."
),
sub_agents=[researcher_agent, analyst_agent] # This enables multi-agent routing
)
Test It
Restart your ADK web server (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 smart dog collar 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 a .dockerignore file
Before creating the Dockerfile, we need to ensure we don't upload our massive local environment or our secret API keys into the container image. Create a new file named .dockerignore (with the dot) in the same folder and add these two lines:
Step 4: 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 5: 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 6: 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 auth login
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",GOOGLE_CLOUD_LOCATION="global"
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 and deployed it to the Cloud. You are now equipped to build production-grade AI tools for your startup.
📚 Official Documentation
- ADK GitHub Repository: this is the best place to check for new features and detailed architecture patterns.
- ADK quickstart (open source documentation): this quickstart guides you through installing the ADK, setting up a basic agent with multiple tools, and running the agent.
- ADK 2.0. (Alpha Release): the newest version of ADK, which is still in Alpha phase. Not suitable for production workloads until it reaches GA.
- Gemini 3 API Developer Guide: deep dive into model capabilities, safety settings, and structured outputs.
- Agent Starter Pack: a collection of production-ready generative AI agent templates built for Vertex AI Agent Engine.
- Model Garden: check out the models available on Google Cloud, such as Anthropic, Mistral, open-source models and more.
- Vertex AI Search & Conversation: learn more about building enterprise RAG systems.
- Agent Engine: check out a set of services that enable developers to deploy, manage, and scale AI agents in production.
đź’ˇ Next Steps for Your Agent
- 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 or analytics dashboard for more grounded insights.
- Refine UI/UX: The adk web interface 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
- Support: If you have questions about the ADK or this workshop, feel free to reach out (Zuza, Kasia)
- Schedule a tech consultation for startups: Customer Engineering for Startups
Thank you for participating! We can't wait to see what you build next.