
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
Deploy your agent
/ 35
Query your agent
/ 35
View and delete agents
/ 30
In this lab, you will learn to deploy ADK agents to Agent Engine for a scalable, fully managed environment for your agentic workflows.
This allows you to focus on the agents' logic while infrastructure is allocated and scaled for you.
In this lab you will learn:
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 will be made available to you.
This Qwiklabs hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Note: If you already have your own personal Google Cloud account or project, do not use it for this lab.
Note: If you are using a Pixelbook, open an Incognito window to run this lab.
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 left is the Lab Details pane with the following:
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.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details pane.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
Vertex AI Agent Engine (formerly known as LangChain on Vertex AI or Vertex AI Reasoning Engine) is a fully managed Google Cloud service enabling developers to deploy, manage, and scale AI agents in production.
You can learn more about its benefits in the Vertex AI Agent Engine documentation.
With your Google Cloud console window selected, open Cloud Shell by pressing the G key and then the S key on your keyboard. Alternatively, you can click the Activate Cloud Shell button () in the upper right of the Cloud console.
Click Continue.
When prompted to authorize Cloud Shell, click Authorize.
In the upper right corner of the Cloud Shell Terminal panel, click the Open in new window button .
In the Cloud Shell Terminal, enter the following to open the Cloud Shell Editor to your home directory:
Update your PATH
environment variable and install ADK by running the following commands in the Cloud Shell Terminal.
Paste the following commands into the Cloud Shell Terminal to copy a file from a Cloud Storage bucket, and unzip it, creating a project directory with code for this lab:
Install additional lab requirements with:
Run the following commands to create a .env file in the adk_to_agent_engine directory. (Note: To view a hidden file beginning with a period, you can use the Cloud Shell Editor menus to enable View > Toggle Hidden Files):
Copy the .env file to the agent directory to provide your agent necessary authentication configurations once it is deployed:
ADK's command line interface provides shortcuts to deploy agents to Agent Engine, Cloud Run, and Google Kubernetes Engine (GKE). You can use the following base commands to deploy to each of these services:
adk deploy agent_engine
(with its command line args described under the @deploy.command("agent_engine")
decorator)adk deploy cloud_run
(with its command line args described under the @deploy.command("cloud_run")
decorator)adk deploy gke
(with its command line args described under the @deploy.command("gke")
decorator)The adk deploy agent_engine
command wraps your agent in a reasoning_engines.AdkApp class and deploys this app to Agent Engine's managed runtime, ready to receive agentic queries.
When an AdkApp
is deployed to Agent Engine, it automatically uses a VertexAiSessionService
for persistent, managed session state. This provides multi-turn conversational memory without any additional configuration. For local testing, the application defaults to a temporary, InMemorySessionService
.
To deploy an Agent Engine app using adk deploy agent_engine
, complete the following steps:
In the adk_to_agent_engine/transcript_summarization_agent directory, click on the agent.py file to review the instructions of this simple summarization agent.
To deploy an agent, you must provide its requirements. In Cloud Shell Editor, right-click on the transcript_summarization_agent directory. (You may need to click Allow to enable the right-click menu.)
Select New File...
Name the file like a standard Python requirements file: requirements.txt
Paste the following into the file:
Save the file.
In the Cloud Shell Terminal, run the deploy command:
You can follow the status from the log file that will be linked from the command's output. During deployment, the following steps are occurring:
*.pkl
: a pickle file corresponding to local_agent.requirements.txt
: this file from the agent folder defining package requirements.dependencies.tar.gz
: a tar file containing any extra packages.Note: Deployment should take about 10 minutes, but you can continue with this lab while it deploys.
Each of the adk deploy ...
commands requires certain arguments to be set. For the most up-to-date arguments, click the linked commands in the list at the top of this task and look for the arguments marked as "Required".
Some required arguments, like --project
and --region
from the adk deploy agent_engine
deployment can load their values from the agent's .env
file if present.
Answer the following questions based on the arguments for adk deploy agent_engine
:
Highlights from Expected Output:
Click Check my progress to verify the objective.
To query the agent, you must first grant it the authorization to call models via Vertex AI.
To see the service agent and its assigned role, navigate to IAM in the console.
Click the checkbox to Include Google-provided role grants.
Find the AI Platform Reasoning Engine Service Agent (service-PROJECT_NUMBER@gcp-sa-aiplatform-re.iam.gserviceaccount.com
), and click the edit pencil icon in this service agent's row.
Click + Add another role.
In the Select a role field, enter Vertex AI User. If you deploy an agent that uses tools to access other data, you would grant access to those systems to this service agent as well.
Save your changes.
Back in the Cloud Shell Editor, within the adk_to_agent_engine directory, open the file query_agent_engine.py.
Review the code and comments to notice what it is doing.
Review the transcript passed to the agent, so that you can evaluate if it's generating an adequate summary.
In the Cloud Shell Terminal, run the file from the adk_to_agent_engine directory with:
Example output (yours results may be a little different):
Click Check my progress to verify the objective.
When your agent has completed its deployment, return to a browser tab showing the Cloud Console and navigate to Agent Engine by searching for it and selecting it at the top of the Console.
In the Region dropdown, make sure your location for this lab (
You will see your deployed agent's display name. Click on it to enter its monitoring dashboard.
Notice both the Metrics and Session tabs that will each give you insights into how your agent is being used.
When you are ready to delete your agent, select Deployment details from the top of its monitoring dashboard.
Back in your browser tab running the Cloud Shell Terminal, paste the following command, but don't run it yet:
From the Agent Engine Deployment info panel, copy the Name field, which will have a format like: projects/qwiklabs-gcp-02-76ce2eed15a5/locations/us-central1/reasoningEngines/1467742469964693504
.
Return to the Cloud Shell Terminal and replace the end of the command REPLACE_WITH_AE_ID
with the resource name you've copied.
Press Return to run the deletion command.
Example Output:
In the Cloud Console, return to the Agent Engine dashboard to see that the agent has been deleted.
To view the simple Python SDK code to list and delete agents, view the contents of the file adk_to_agent_engine/agent_engine_utils.py.
Click Check my progress to verify the objective.
In this lab, you’ve learned:
You can learn more about building agents with Agent Development Kit from other labs in this series:
...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 August 19, 2025
Lab Last Tested August 19, 2025
Copyright 2023 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 will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one