Video summary

How to deploy an AI agent to Cloud Run (step by step)

Main summary

Key takeaways

Technology

Summary

The video demonstrates how to deploy a Python AI agent to Google Cloud Run using the Agent Development Kit (ADK) and tools exposed through a secure Model Context Protocol (MCP) server. The example is a Zoo Tour Guide that combines zoo-specific information with general facts from Wikipedia.

Key concepts and architecture

  • Cloud Run runs the agent in a container, scales up when requests arrive, and can scale to zero when idle. Google Cloud handles scaling, load balancing, TLS, logging, and service identity.
  • The agent uses three capabilities:
    • A small helper tool that saves the visitor’s first prompt in shared state.
    • An MCP tool set for querying the zoo’s MCP server.
    • A Wikipedia lookup tool connected through a LangChain adapter.
  • The ADK agent workflow has two specialists:
    1. A researcher chooses the zoo MCP server, Wikipedia, or both, and saves its findings for the next step.
    2. A presenter turns the research into a friendly response, leading with zoo-specific information.
  • A sequential workflow agent runs the researcher and then the presenter. A root agent acts as the entry point, greets the visitor, stores the initial prompt, and passes the conversation into the workflow.

Deployment guide

  1. Create a Google Cloud account and project, then open Cloud Shell and select the project.
  2. Enable the required Google Cloud services and create a project workspace.
  3. Set up a small, version-pinned requirements.txt with ADK and the libraries used by the example.
  4. Configure the model and MCP server URL. The video uses a .env file for the lab, while noting that production deployments should use environment variables or Secret Manager for sensitive configuration.
  5. Create a dedicated runtime service account and grant it the permissions it needs:
    • Vertex AI User to call models.
    • Cloud Run Invoker access to the MCP server when it is protected. The video flags missing invoker permission as a common cause of 403 errors.
  6. Build the agent in agent.py: load configuration, set up logging and tools, define the specialist agents and sequential workflow, and expose the root agent.
  7. Use the ADK deployment command—run through uvx in the demonstration—to build and push the container and create a Cloud Run service. Specify the project, region, service name, runtime service account, and the option to enable the ADK web UI.

Testing, security, and cleanup

  • For the lab, the deployment is configured to allow unauthenticated access, making the generated URL easy to open. The presenter recommends keeping production services private and using an authenticated proxy or backend integration instead.
  • In the ADK web UI, enable token streaming to watch responses arrive, then test with a greeting and a question about polar bears. The researcher should use the MCP server for zoo enclosure details and Wikipedia for general facts such as diet.
  • After testing, delete the Cloud Run service and, if created for the lab, the source-deploy Artifact Registry repository.

Main speaker and source

  • Smitha Kolan, presenter, Google Cloud Tech.

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video