Moving an Agent Development Kit (ADK) agent from a local prototype to a production environment requires a clear strategy for containerization and infrastructure management. Google Cloud provides two primary paths for hosting these agents: the serverless simplicity of Cloud Run or the full orchestration capabilities of Google Kubernetes Engine (GKE).

Choosing the right path depends on your requirements for scaling, security, and existing infrastructure. This guide details the implementation steps for both approaches to ensure your agentic workflows are practical.

In short

  • Cloud Run is the recommended starting point for most ADK deployments, offering a managed, serverless environment that handles scaling automatically.

  • GKE provides the necessary control for complex, high-throughput agent systems requiring custom container orchestration and advanced security policies.

  • Regardless of the target, ensure your service accounts are configured with the correct Vertex AI permissions to allow your agents to interact with models and tools securely.

Serverless Deployment with Cloud Run

Cloud Run abstracts away the underlying infrastructure, making it ideal for agents that do not require persistent state or complex networking. You can deploy your agent by using the ADK CLI directly, which builds the container image and pushes it to the registry in one operation.

For teams requiring custom build pipelines, you can define a build script that packages your agent code into a container. Once deployed, the Agent Engine provides a managed Python serverless host for your reasoning engines, allowing you to monitor performance through built-in observability tools and test your agent end-to-end in the playground.

Enterprise Orchestration with GKE

For enterprise-grade applications, GKE offers full control over container management and security. This approach is necessary when your agent system requires integration with private VPCs or specific Kubernetes-native security policies.

To deploy on GKE, you must first create a standard Docker repository in your target region. Ensure your Cloud Build service accounts have the Artifact Registry Writer role to push images successfully. Finally, map your Kubernetes Service Account to a Google Service Account with the specific roles required to call Vertex AI APIs, ensuring your agent has the necessary permissions to execute its tasks.