Engineer AI Agents with Agent Development Kit (ADK): Challenge Lab - GSP540

A passionate full-stack developer from @ePlus.DEV
Search for a command to run...

A passionate full-stack developer from @ePlus.DEV
No comments yet. Be the first to comment.
Quick and practical tips to help users optimize tasks, improve skills, and solve common problems effectively across various areas like tech, lifestyle, productivity, and more.
Overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to
Overview This lab demonstrates how Gemini can interpret what is in an image and provide a description quickly. During the exercise, you will provide the following image as input and ask Gemini is: "Wh

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary npm bắt đầu quét mã độc ngay tại thời điểm publish và có thể giữ pack

Overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary OpenAI công bố báo cáo mới về cách AI đang làm thay đổi phạm vi công

In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.
When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.
To score 100% you must successfully complete all tasks within the time period!
This lab is recommended for students who enrolled in the Agent Development Kit (ADK) course. Are you ready for the challenge?
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the right is the Lab setup and access panel with the following:
The Open Google Cloud console button
The temporary credentials (username and password) that you must use for this lab
Other information, if needed, to step through this lab
Note that the lab timer is located near the top of the page, showing the remaining time.
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
Note: If you see the Choose an account dialog, click Use Another Account.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab setup and access panel.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab setup and access panel.
Click Next.
Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials.
Note: Using your own Google Cloud account for this lab may incur extra charges.
Click through the subsequent pages:
Accept the terms and conditions.
Do not add recovery options or two-factor authentication (because this is a temporary account).
Do not sign up for free trials.
After a few moments, the Google Cloud console opens in this tab.
Note: To access Google Cloud products and services, click the Navigation menu or type the service or product name in the Search field.
If you are looking for resources that will help you develop the skills required to complete this lab successfully, consider reviewing relevant sections from the following:
Note: The documentation links below may contain examples using Gemini API keys. For this lab, you must ignore those instructions and use Agent Platform as detailed in the tasks below.
| Category | Resources |
|---|---|
| Online Documentation |
Courses, Labs and Tutorials |
You have just joined Cymbal Travel, a premier travel agency dedicated to curating the perfect vacation experiences for their customers. Cymbal Travel uses a suite of AI agents to scour the web for travel updates, validate destination data, and audit marketing brochures for accuracy.
Your team has built prototypes for a "Travel Scout" and a "Brochure Auditor" using Google's Agent Development Kit (ADK). However, the prototypes are currently misconfigured, incomplete, or broken.
For example, the Brochure Auditor is supposed to be a multi-agent pipeline that both checks and fixes errors, but the previous engineer only implemented the "check" phase. The Travel Scout hasn't been given access to Google Search yet.
As a new Agent Engineer, your job is to repair and deploy these agents to ensure downstream systems receive consistent, accurate data.
You will be working in the adk_project directory, which contains:
my_google_search_agent: A "Travel Scout" meant to search for events (currently broken).
geo_validator: A "Destination Verifier" that returns unstructured text (needs a strict schema).
llm_auditor: A sophisticated multi-agent system for brochure auditing (needs configuration).
Your tasks include the following:
Initialize the Travel Scout (my_google_search_agent) to use the Google Search tool.
Run the agent to find upcoming events.
Enforce strict JSON schemas in the Destination Verifier (geo_validator).
Configure the Brochure Auditor (llm_auditor) pipeline by enabling the missing Reviser Agent.
In this task, you will install the Agent Development Kit (ADK) and set up your environment.
Open the Cloud Shell Terminal.
Update your PATH environment variable and install ADK by running the following commands in the Cloud Shell Terminal.
export PATH=$PATH:"/home/${USER}/.local/bin"
python3 -m pip install google-adk
To authenticate to Google Cloud and set up credentials for your project and user, run the following command:
gcloud auth application-default login
When prompted, type Y, and press ENTER.
To launch the Google Cloud sign-in flow, press CONTROL (for Windows and Linux) or COMMAND (for MacOS), and click the link in the terminal.
If prompted Do you want Code OSS - Cloud Shell to open the external website? click Open.
Choose the student email address.
When you're prompted to continue, click Continue.
To let the Google Cloud SDK access your Google Account and agree to the terms, click Allow.
Your verification code is displayed in the browser tab.
Click Copy.
Back in the terminal, where it says Enter authorization code, paste the code and press ENTER.
You are now authenticated to Google Cloud.
Download the source code for the lab:
gcloud storage cp gs://-bucket/adk_project.zip .
unzip adk_project.zip
cd adk_project
pip install -r requirements.txt
In this task, you will get the Travel Scout (my_google_search_agent) online. The previous engineer left the agent definition incomplete. It's supposed to use Google Search to find real-time travel info, but currently, it has no tools enabled.
From the Cloud Shell Terminal, Open the editor by selecting Open Editor.
This will open the Cloud Console Editor making it easier to navigate and edit the files.
Select the View tab and choose Toggle hidden files to see the hidden files that will need to be edited.
Navigate to adk_project/my_google_search_agent.
Important: Do not create or use API keys for this lab. You must use Agent Platform by configuring the .env file as instructed below.
Configure the environment (.env) to use Agent Platform with your provided Project ID and global location.
GOOGLE_GENAI_USE_ENTERPRISE=true
GOOGLE_CLOUD_PROJECT=
GOOGLE_CLOUD_LOCATION=global
MODEL=model_name
Note: Be sure to set GOOGLE_CLOUD_LOCATION to global. This is pertinent to the lab working successfully.
Modify agent.py to enable the google_search tool. (Tip: Pass tools=[google_search] in the Agent definition).
Navigate back to the project root and launch the ADK Dev UI (adk web).
cd ~/adk_project
adk web --allow_origins "regex:https://.*\.cloudshell\.dev"
To open the web server select the link http://127.0.0.1:8000.
Select my_google_search_agent and ask: What are some major events in Tokyo in 2025?Note: You must configure the agent to interpret the search results (grounding). Ensure the agent is actually performing a search action. Once you have successfully received a response grounded in Google Search results, verify the objective. Note: If you receive an error, select the + New Session option in the top right corner and try again.
Close the Web Server and return to the editor in Cloud Shell.
Stop the web server by typing CTRL+C in the Cloud Shell.
You can effectively test any of your agents using the CLI.
From the adk_project directory run adk run my_google_search_agent and ask it about the currency exchange rate for Japan.
Close out of the CLI by typing CTRL+C in the Cloud Shell.
The Destination Verifier (geo_validator) is currently returning free-form text. The Booking Engine team needs this agent to return a strict JSON object containing just the capital city.
Navigate to adk_project/geo_validator.
Important: Do not create or use API keys for this lab. You must use Agent Platform by configuring the .env file as instructed below.
Configure the environment (.env) to use Agent Platform with your provided Project ID and global location.
GOOGLE_GENAI_USE_ENTERPRISE=true
GOOGLE_CLOUD_PROJECT=
GOOGLE_CLOUD_LOCATION=global
MODEL=model_name
Modify agent.py to:
Define a Pydantic model CountryCapital (Tip: inherit from BaseModel and define a field capital: str).
Enforce this schema by passing it as the output_schema argument in the Agent definition.
Disable transfers by setting disallow_transfer_to_parent=True and disallow_transfer_to_peers=True in the agent definition.
Set Model: Ensure you use the latest Flash model: model_name
Run the agent programmatically: python3 geo_validator/agent.py
The output should be a JSON object (e.g., {"capital": "Paris"}), not a sentence.
The crown jewel of Cymbal Travel is the Brochure Auditor (llm_auditor), a sequential multi-agent system designed to ensure marketing accuracy.
It is supposed to work in two stages:
Critic Agent: Fact-checks a marketing claim against the web.
Reviser Agent: Rewrites the claim based on the Critic's findings.
However, the pipeline is currently broken. The previous engineer commented out the reviser_agent code, so the pipeline stops after crticism and never fixes the text. Your job is to restore the full pipeline.
Navigate to adk_project/llm_auditor.
Important: Do not create or use API keys for this lab. You must use Agent Platform by configuring the .env file as instructed below.
Configure the environment (.env) to use Agent Platform with your provided Project ID and global location.
GOOGLE_GENAI_USE_ENTERPRISE=true
GOOGLE_CLOUD_PROJECT=
GOOGLE_CLOUD_LOCATION=global
MODEL=model_name
Modify agent.py to enable the reviser_agent. The pipeline currently only has a critic; you need to uncomment the reviser import and add it to the sub_agents list.
Navigate back to the project root and launch the ADK Dev UI.
cd ~/adk_project
adk web --allow_origins "regex:https://.*\.cloudshell\.dev"
Select llm_auditor and submit the following false claim for auditing: Double check this: You can take a direct train from Hawaii to Japan.
The system should invoke the critic to debunk the claim and the reviser to provide the correct fact.
https://www.youtube.com/watch?v=iio0tycJklk
curl -LO raw.githubusercontent.com/ePlus-DEV/storage/refs/heads/main/labs/GSP540/lab.sh
source lab.sh
Script Alternative
curl -LO https://raw.githubusercontent.com/Orbit-of-Ops/Google-Cloud-Labs-Solutions/refs/heads/main/Engineer%20AI%20Agents%20with%20Agent%20Development%20Kit%20/GSP540.sh
sudo chmod +x GSP540.sh
./GSP540.sh
https://www.youtube.com/watch?v=sNMTX1NV7V8
curl -LO raw.githubusercontent.com/ePlus-DEV/storage/refs/heads/main/labs/GSP540/lab.sh
source lab.sh
Script Alternative
curl -LO https://raw.githubusercontent.com/Cloud-hustlers-official/lab-solutions/refs/heads/main/Engineer%20AI%20Agents%20with%20Agent%20Development%20Kit%20/GSP540.sh
sudo chmod +x GSP540.sh
./GSP540.sh