# CanaryPolicy

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/http-api/schemas/canarypolicy/
> Summary: OpenAPI request or response schema for CanaryPolicy, including required fields, defaults, constraints, and linked nested types.

[← All HTTP schemas](/http-api/schemas/)

Defines automatic rollback and gradual traffic-increase rules for an experiment canary variant.

**Shape:** `object`

| Property | Required | Type | Description | Rules |
|---|---|---|---|---|
| `canaryVariant` | yes | `string` | Gets the canary variant name. It must exist in the experiment `Variants` list. | — |
| `maxErrorRateDelta` | no | `number (double)` | Gets the maximum absolute error-rate difference from the control, from 0.0 through 1.0. The canary rolls back when its rate is higher. No error-rate check runs when this value is `null`. | pattern `^-?(?:0\\|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$` |
| `minScore` | no | `integer (int32)` | Gets the minimum average canary score from 0 through 100. The canary rolls back below this threshold. No score check runs when this value is `null`. | pattern `^-?(?:0\\|[1-9]\d*)$` |
| `minSampleSize` | no | `integer (int32)` | Gets the minimum completed run count that both the canary and control variants must reach before a decision is made. | pattern `^-?(?:0\\|[1-9]\d*)$` |
| `rampSteps` | no | array of `integer (int32)` | Gets the canary-weight steps that increase over time, for example `[5, 25, 50, 100]`. An empty list disables gradual increases. The canary weight stays at the value set through `SaveAsync` and only rollback is evaluated. | — |
| `rampInterval` | no | `string` | Gets the minimum time between steps. | pattern `^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$` |
