Canary deployment
Build a Harness pipeline that deploys an agent service to Google Agent Runtime with a canary strategy.
The pipeline execution defines how Harness rolls out a new agent revision. For Google Agent Runtime, Harness deploys the new revision, then shifts traffic to it in stages so you can validate the new version before it takes all traffic. This page shows you how to configure the canary execution on the pipeline stage.
You need a registered agent service and an environment with a Google Agent Runtime infrastructure definition. For all prerequisites, go to Before you begin on the overview.
Select the execution strategy
On the Execution tab of the stage, select the execution strategy. Select Canary to scaffold the deploy and traffic shift steps, or select Blank Canvas to build the execution from an empty step group.

Default canary steps
When you select the Canary strategy, Harness adds a step group with two steps: a deploy step and a single traffic shift step that routes 100 percent of traffic to the new revision. Harness also adds a rollback step group with the rollback step.

Deploy step
The deploy step creates a deployment for the agent on Google Agent Runtime. On the first deployment for an agent, it creates the deployment. When a deployment already exists, it creates a new revision under the same deployment. The step publishes the new revision id as output that the traffic shift steps read.
The step type is DeployGoogleAgentRuntimeRevision. Configure the following fields:
Container Registry: A Harness connector for the registry that hosts the plugin image.
Image: The deploy plugin image,
harness/google-agent-runtime-plugin:1.0.0-linux-amd64.Wait for the revision to be ready: Enable this so the pipeline waits until the revision is ready before it continues.

Click to view full size
Traffic shift step
The traffic shift step routes a percentage of traffic to the revision produced by the deploy step. Add a step for each stage of the canary, for example 10 percent, 25 percent, 50 percent, and 100 percent.
The step type is ShiftGoogleAgentRuntimeTraffic. Configure the following fields:
Container Registry: A Harness connector for the registry that hosts the plugin image.
Image: The traffic shift plugin image,
harness/google-agent-runtime-plugin:1.0.0-linux-amd64.Target Revision ID: The revision produced by the deploy step,
<+steps.DeployGoogleAgentRuntimeRevision.agentDeployment.revisionId>.Weight (%): The percentage of traffic to route to the target revision for this shift.

Click to view full size
Rollback step
The rollback step reverts traffic to the previous revision. Harness adds it to the stage rollback steps so it runs when a deploy or traffic shift step fails.
The step type is RollbackGoogleAgentRuntimeRevision and the Image is harness/google-agent-runtime-plugin:1.0.0-linux-amd64.

Add staged traffic shifts
To roll out more gradually, add more traffic shift steps between the deploy step and the final 100 percent shift. Each step routes an increasing percentage of traffic to the new revision, for example 10 percent, 25 percent, 50 percent, and 100 percent. Between the shifts, you can add smoke tests, evals, approval gates, or release gates to validate each stage before more traffic moves to the new revision.

Run and monitor the deployment
Run the pipeline to deploy the agent. After the pipeline runs, open the agent service to review the deployment. The Summary tab lists every deployment that references the agent service, with its status and start time, and the Configuration tab shows the platform configuration, which you can edit.
Because the agent is a Harness deployment, approvals, OPA policies, and RBAC apply the same way they do for any other stage.
Next steps
You have deployed an agent service to Google Agent Runtime with a canary strategy. You can now add approvals and policies to the stage, or configure additional environments.
Step reference: Review the deploy and traffic-shift step parameters in detail.
Deploy to AWS Agent Core: Deploy an agent to Amazon Bedrock AgentCore instead.
Last updated
Was this helpful?