How to Configure Deployment Targets (Agent Runtime, Cloud Run, GKE) in agents-cli-manifest.yaml
Set the deployment_target field under create_params in agents-cli-manifest.yaml to one of the supported values—agent_runtime, cloud_run, gke, or none—to control where your agent is deployed.
The agents-cli-manifest.yaml file serves as the central configuration for projects scaffolded by the google/agents-cli tool. This manifest controls how your agent is built and deployed, with the deployment target parameter determining whether your agent runs on Agent Runtime, Cloud Run, GKE, or locally.
Understanding the Deployment Target Configuration
The deployment target is specified within the create_params section of the manifest. According to the source code in src/google/agents/cli/scaffold/base_templates/_shared/agents-cli-manifest.yaml, this field is templated as:
create_params:
deployment_target: "{{cookiecutter.deployment_target}}"
Supported Deployment Targets
The complete list of valid identifiers is defined in src/google/agents/cli/scaffold/agents/adk/.template/templateconfig.yaml:
deployment_targets: ["agent_runtime", "cloud_run", "gke", "none"]
These four options represent distinct runtime environments:
- agent_runtime: Deploy to Google's dedicated Agent Runtime infrastructure
- cloud_run: Deploy to Cloud Run as a fully managed serverless container
- gke: Deploy to Google Kubernetes Engine for cluster-based orchestration
- none: Configure for local development without remote deployment
Configuring the Deployment Target
When you scaffold a new project using agents-cli create, the tool generates the manifest with your selected target. To configure or change the target manually, edit the deployment_target value in agents-cli-manifest.yaml.
Example configuration:
name: "my-agent"
acli_version: "0.4.0"
agent_directory: "my_agent"
region: "us-east1"
base_template: "python"
language: "python"
create_params:
deployment_target: "cloud_run" # Options: agent_runtime, cloud_run, gke, none
session_type: "none"
cicd_runner: "github"
How the Manifest Drives CI/CD Pipelines
The deployment_target value propagates through Jinja2 templates in the generated CI/CD workflows. In the Python scaffolding templates located at src/google/agents/cli/scaffold/base_templates/python/.github/workflows/, the build pipeline uses conditional logic based on the cookiecutter variable:
{%- if cookiecutter.deployment_target == 'cloud_run' %}
# Cloud Run-specific steps
{%- elif cookiecutter.deployment_target == 'gke' %}
# GKE-specific steps
{%- elif cookiecutter.deployment_target == 'agent_runtime' %}
# Agent Runtime steps
{%- endif %}
This templating ensures that Docker image tags, gcloud commands, and Kubernetes manifests are automatically adjusted to match your selected target without manual edits to the workflow files.
Changing Deployment Targets in Existing Projects
To switch targets after scaffolding, modify the value in your manifest and commit the changes. For example, to migrate from Cloud Run to GKE:
# Update the manifest
sed -i 's/deployment_target: "cloud_run"/deployment_target: "gke"/' agents-cli-manifest.yaml
# Commit the change
git add agents-cli-manifest.yaml
git commit -m "Switch deployment target to GKE"
The next CI/CD run will automatically generate GKE-compatible deployment artifacts, including updated Docker tags and kubectl apply commands, rather than Cloud Run service deployments.
Summary
- The
agents-cli-manifest.yamlfile controls deployment behavior through thecreate_params.deployment_targetfield. - Valid values are defined in the template configuration:
agent_runtime,cloud_run,gke, andnone. - Configuration changes propagate automatically through Jinja2 templates in generated CI/CD pipelines.
- No manual editing of workflow files is required when switching targets—only the manifest needs updating.
Frequently Asked Questions
What are the valid values for deployment_target?
The deployment_target field accepts four string values defined in src/google/agents/cli/scaffold/agents/adk/.template/templateconfig.yaml: agent_runtime for Google's Agent Runtime, cloud_run for Cloud Run, gke for Google Kubernetes Engine, and none for local development only.
Can I switch deployment targets after scaffolding?
Yes. Simply edit the deployment_target value in your agents-cli-manifest.yaml file and commit the change. The templating system re-renders the CI/CD pipelines automatically during the next build, requiring no manual modifications to the workflow files themselves.
How does the deployment target affect the generated CI/CD files?
The target value drives Jinja2 conditionals in the scaffolding templates. For example, if set to cloud_run, the generated workflows include gcloud run deploy commands; if set to gke, they include kubectl apply steps. These conditionals are evaluated at build time based on the manifest value.
What is the difference between agent_runtime and cloud_run?
Agent Runtime is a specialized environment optimized for agent execution with specific runtime capabilities, while Cloud Run is a general-purpose serverless container platform. The agent_runtime target deploys to Google's dedicated agent infrastructure, whereas cloud_run deploys standard container images to the Cloud Run service.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →