Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Persist and verify your Lab A evaluation artifacts
/ 50
Deploy the ADK agent to Agent Runtime and complete the managed evaluation run
/ 50
Persist and verify your Lab A evaluation artifacts
/ 50
Deploy the ADK agent to Agent Runtime and complete the managed evaluation run
/ 50
Lab Information
| Lab Manual Last Updated Date | November 27, 2026 |
| Last Tested Date and Time | November 27, 2026, 02:41:35 |
| Completion in Last 24 Hours | 75 |
Evaluating generative AI agents before production deployment requires measuring both deterministic tool execution and open-ended conversational quality. In this lab, you evaluate agents built with the Agent Development Kit (ADK) using two complementary workflows. First, you run local build-time evaluation with ADK's built-in evaluation framework in Lab A. Then, you run cloud-managed evaluation on Gemini Enterprise Agent Platform in Lab B using synthetic user simulation, custom metrics, Agent Runtime deployment, and automatic loss analysis.
When the lab starts, Terraform pre-provisions an Agent Platform Workbench (e2-standard-4) instance and a Cloud Storage delivery bucket for your project.
Specifically, the Workbench instance is named Lab_A_evaluate_adk_agents.ipynb and Lab_B_eval_geap.ipynb) and supporting agent files in your Workbench home directory and exports your lab configuration.
Throughout both notebooks, Gemini inference uses GOOGLE_CLOUD_LOCATION set to global), while regional resources—such as your Agent Runtime deployment and the evaluation SDK client in Lab B—run in
In this lab, you learn how to perform the following tasks:
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:
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 pane with the following:
In the Lab Setup section, right-click Open Google Cloud console and select Open link in new window (or alternatively 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.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Setup pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Setup pane.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
In this task, you open the pre-provisioned Agent Platform Workbench environment and confirm that the two lab notebooks and supporting data files are present in your JupyterLab home directory. Running evaluations inside Workbench gives your code automatic authentication through the instance service account without storing local key files.
In the Google Cloud Console, on the Navigation menu (), click Agent Platform > Notebooks > Workbench. Alternatively, you can type "Agent Platform Workbench" in the top search bar and click the first result.
Find the
The JupyterLab interface for your Workbench instance will open in a new browser tab.
In the JupyterLab File Browser, confirm that the following files and folders appear in your home directory:
Lab_A_evaluate_adk_agents.ipynbLab_B_eval_geap.ipynbtravel_data.pycustomer_service_agent/customer_service_agent_v1/If all listed files are present, proceed to Task 2.
Only if any starter files are missing, open a terminal in JupyterLab by clicking File > New > Terminal and copy the staged files from the lab Cloud Storage bucket into your home directory:
Refresh the File Browser to confirm that both notebooks, travel_data.py, and both agent directories now appear in your home directory.
Expected Output: The JupyterLab File Browser displays Lab_A_evaluate_adk_agents.ipynb, Lab_B_eval_geap.ipynb, travel_data.py, customer_service_agent/, and customer_service_agent_v1/.
Under the Hood: During instance provisioning, the Workbench post-startup script configured /etc/profile.d/lab_env.sh and copied the pre-configured notebooks using gcloud storage.
Specifically, the script set GOOGLE_CLOUD_REGION to GEMINI_FLASH_MODEL_ID to
Before deploying an agent to a managed runtime, developers run a fast inner-loop evaluation locally to catch tool-calling regressions and response-quality issues early. In this task, you work through Lab_A_evaluate_adk_agents.ipynb to build a Cymbal Home & Garden customer service agent, grade it with deterministic reference metrics and LLM-judge rubrics, test multi-turn user simulation, and verify an instruction fix across agent versions.
google-adk[eval], google-cloud-aiplatform[evaluation], rouge-score, and tabulate).customer_service_agent package, import the agent, and send a sample purchase-history prompt through InMemoryRunner. The generated customer_service_agent/agent.py file uses model Expected Output: The local test prints a [tool call] event for get_purchase_history with customer_id: CUST001, followed by a [tool result] event and the agent's response listing orders ORD-101 and ORD-102.
eval_config.reference.json, eval_config.judge.json, and eval_config.rubric.json, executing adk eval after each configuration:
tool_trajectory_avg_score) and ROUGE-1 word overlap (response_match_score).final_response_match_v2) using rubric_based_final_response_quality_v1) intentionally fails completeness on the first refund turn because the agent asks for a refund reason before disclosing order details, demonstrating how strictly rubrics grade written criteria.session_input.json, eval_config_without_metrics.json, eval_config_with_metrics.json, and conversation_scenarios.json.adk eval_set create and adk eval_set add_eval_case cells to generate customer_service_agent/cs_user_sim.evalset.json, inspect the scenario, and run both the dry-run simulation and the scored simulation (hallucinations_v1 and safety_v1).customer_service_agent_v1 package (which lacks the instruction to ask for a refund reason first), create eval_config.trajectory.json, and run adk eval on both customer_service_agent_v1 and customer_service_agent.Expected Output: In Part 4, customer_service_agent_v1 fails tool_trajectory_avg_score because it calls issue_refund prematurely on the first turn, whereas customer_service_agent asks for the reason first and passes the trajectory check.
Storing your generated agent packages, evaluation configurations, simulated eval set, and evaluation history in Cloud Storage preserves build-time regression artifacts outside the ephemeral Workbench disk.
In JupyterLab, open a terminal by clicking File > New > Terminal.
Upload your generated customer_service_agent and customer_service_agent_v1 directories to the lab Cloud Storage bucket:
List the uploaded files in Cloud Storage to confirm all Lab A artifacts were persisted:
Expected Output: The gcloud storage ls output displays agent.py, cs_user_sim.evalset.json, eval_config.reference.json, eval_config.judge.json, eval_config.rubric.json, eval_config.trajectory.json, and the .adk/ evaluation history directory under gs://
Under the Hood: ADK's adk eval CLI executes agent sessions in-process on the Workbench VM while routing model inference and LLM-judge scoring through GOOGLE_GENAI_USE_VERTEXAI=1 and GOOGLE_CLOUD_LOCATION=global.
Specifically, all agent and judge calls for adk eval run writes structured trace history under .adk/eval_history/ for regression auditing.
Click Check my progress to verify the objective.
While local ADK evaluation accelerates inner-loop development, production agents deployed to Agent Runtime require server-side scenario generation, scalable user simulation, custom metric registration, and failure clustering. In this task, you run Lab_B_eval_geap.ipynb to evaluate an ADK travel concierge agent (travel_agent orchestrating flight_agent and hotel_agent) using the Vertex AI Gen AI Evaluation SDK (client.evals).
Client, the Agent Runtime deployment (deploy_adk_agent), and the runtime staging bucket (gs://{{{project_0.project_id | PROJECT_ID}}}-agent-engine) run in {{{project_0.default_region | Region}}}.global): Both the local agent and the deployed Agent Runtime container set GOOGLE_CLOUD_LOCATION=global to call {{{project_0.startup_script.gemini_flash_model_id | gemini_flash_model_id}}}. Managed evaluation calls pass allow_cross_region_model=True to authorize cross-region judge routing, and generate_loss_clusters uses a dedicated global_client initialized in location="global".google-cloud-aiplatform[adk,agent_engines,evaluation] and google-adk).global.travel_data.py and defines flight_agent, hotel_agent, and the parent travel_agent.deploy_adk_agent(travel_agent, LOCATION)). This deployment takes approximately 5 to 10 minutes.Expected Output: The deployment cell finishes by printing Deployed: projects/.../locations/
client.evals.generate_conversation_scenarios to generate 7 adversarial multi-turn travel scenarios.
The call uses model allow_cross_region_model=True.client.evals.run_inference with user_simulator_config (max_turn: 4) to simulate multi-turn conversations and print a readable transcript.multi_turn_efficiency).tone_check / tone-check).client.evals.evaluate with both custom metrics plus MULTI_TURN_TOOL_USE_QUALITY and MULTI_TURN_TASK_SUCCESS at evaluation_service_qps=2, then inspect the summary and per-case DataFrames.global_client.evals.generate_loss_clusters against MULTI_TURN_TOOL_USE_QUALITY to group failing traces into L1/L2 taxonomy categories.Expected Output: The evaluation tables display summary and per-case scores across all 7 scenarios, and loss analysis prints the failure taxonomy clusters with item counts and descriptions.
client.evals.create_evaluation_run against agent_engine.api_resource.name with dest=EVAL_RUN_GCS_BUCKET, then run the poll_evaluation_run(eval_run, client) cell.Expected Output: The polling cell clears intermediate status updates and prints Evaluation job completed in ... seconds. followed by the managed evaluation summary report.
In your JupyterLab terminal, verify that the SDK staging artifacts and managed evaluation outputs exist in your Agent Engine Cloud Storage bucket:
In the Google Cloud console, navigate to Navigation menu > Agent Platform > Agents > Deployments and verify that your region is set to
Confirm that your deployed travel_agent Agent Runtime instance appears in the deployments list.
Expected Output: The gcloud storage ls command lists the Agent Runtime staging files and evaluation run output objects in gs://
Under the Hood: During a managed evaluation run, the Eval Management Service delegates execution to the Vertex AI Service Agent (roles/aiplatform.serviceAgent and roles/storage.admin).
The service invokes your regional Agent Runtime endpoint in global endpoint), executes simulated user turns, computes predefined and custom registered metrics, clusters failure modes, and writes structured results to Cloud Storage.
Click Check my progress to verify the objective.
In this lab, you evaluated ADK agents across the full lifecycle: locally with ADK's built-in evaluation framework in Lab A, and remotely with Gemini Enterprise Agent Platform managed evaluation tools in Lab B. You scored agent behavior with reference, LLM-judge, rubric, and custom registered metrics, simulated adversarial multi-turn users, deployed an agent to Agent Runtime, and diagnosed failure patterns with automatic loss analysis.
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated: November 19, 2026
Lab Last Tested: November 19, 2026
When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2026 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We can notify you via email when it becomes available
Great!
We can contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one