Codelab: Cloud Run Day 2025 - Workshop 1

1. Introduction

You will create an agent that can answer any query about the news and deploy it in Cloud Run. The news could be about any topic pertaining to only one location ‘Bengaluru'. Some of the queries can be:

  • Can you tell me about some latest news from Bengaluru?
  • Give me some recent news related to Bengaluru traffic.

You can deploy Agents on Cloud Run. We will create a simple agent that uses the model and a local tool, then deploy it.

What you will learn

  • How to set up a Google Cloud Project for Cloud Run.
  • How to build a simple AI agent using Google ADK.
  • How to define and use local tools within the agent.
  • How to package the agent using Docker.
  • How to deploy the agent as a service on Google Cloud Run.
  • How to interact with the deployed agent through a web UI.

What you will need

  • A gmail account
  • Chrome browser

2. Setup

  1. Complete all the setup instructions here
  2. Navigate into the directory for the 1st workshop:
cd Cloud-Run-Day-Workshop-2025/workshop1

3. Deploy the Agent to Cloud Run

Once you have all the files ready in your Cloud Shell editor, execute the following commands in the Cloud Shell terminal to deploy the service to Cloud Run:

gcloud run deploy news-assistant-agent \
--source . \
--region $REGION \
--project $PROJECT_ID \
--allow-unauthenticated \
--set-env-vars="GOOGLE_GENAI_USE_VERTEXAI=$GOOGLE_GENAI_USE_VERTEXAI,GOOGLE_API_KEY=$GOOGLE_API_KEY"

(Confirm the deployment by typing ‘Y' when/if prompted.)

4. Test the Agent

Upon successful deployment, the Cloud Shell will output the URL for the deployed Cloud Run service.

Screenshot of Cloud Run service URL output

When you open the link, you can directly interact with your agent using the ADK web UI:

Screenshot of the ADK Web UI

5. Cleanup

To avoid incurring future charges, delete the Cloud Run service that you have created.

gcloud run services delete news-assistant-agent --$REGION $GOOGLE_CLOUD_LOCATION  --quiet

6. Congratulations!

You have successfully built and deployed an AI News Agent to Google Cloud Run!