# Fetch an improvement pass

GET

/v1/improvement-passes/{passId}

```sh
curl --request GET \
  --url https://example.com/v1/improvement-passes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
  --header 'Authorization: Bearer <token>'
```

Its status, the candidates it compared and what they cost, and once it ends, what it found. Needs `read` on its agent.

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.1.9/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**passId**

required

string format: uuid

The improvement pass id (a UUID).

## Responses

### 200

The pass.

application/json

An improvement pass: the runtime looking for better values for an agent version’s tunable settings (`x-kindgi-tunable`) on a test set, within a budget. Its best candidate becomes an improvement proposal.

object

**id**

required

string format: uuid

**agentId**

required

string

**fromVersion**

required

The version whose settings it tunes.

string

**scope**

required

One of: discriminator: kind

- **object**

  The agent’s default for the whole tenant.

  object

  **kind**

  required

  string

  Allowed values: tenant

- **object**

  An org’s projects.

  object

  **kind**

  required

  string

  Allowed values: org

  **orgId**

  required

  string format: uuid

- **object**

  One project.

  object

  **kind**

  required

  string

  Allowed values: project

  **projectId**

  required

  string format: uuid

- **object**

  A segment path within a project: it covers every run whose path starts with it.

  object

  **kind**

  required

  string

  Allowed values: segment

  **projectId**

  required

  string format: uuid

  **path**

  required

  Array\<object>

  \>= 1 items <= 8 items

  object

  **key**

  required

  Lowercase, like an identifier: `company`, `contact-role`.

  string

  /^\[a-z]\[a-z0-9\_-]{0,63}$/

  **value**

  required

  string

  \>= 1 characters <= 256 characters

**suiteId**

required

The test set it searches and proves on.

string

**tiers**

required

Array\<string>

Allowed values: settings prompt

**objective**

required

string

Allowed values: weightedYesShare weightedPrecisionAtK

**classWeights**

Which judgments its comparisons count. Absent from older servers: `restricted-only`.

string

Allowed values: as-recorded restricted-only

**model**

For a prompt pass: the provider and model that drafts the templates.

object

**providerId**

required

string

**model**

required

string

**candidates**

For a prompt pass: how many templates it drafts.

integer

\>= 1 <= 5

**budget**

required

object

**maxCostUsd**

required

The most the pass’s comparisons may cost, in US dollars.

number

\> 0 <= 100

**maxCandidates**

required

The most candidates it compares.

integer

\>= 1 <= 200

**requestedBy**

required

string

**status**

required

string

Allowed values: running completed failed cancelled

**candidatesEvaluated**

required

integer

**costUsd**

required

What its comparisons have cost so far (US dollars).

string

**outcome**

What a finished pass found. `proposed`: its best candidate beat the current values on the test set’s hold-out part, so it wrote an improvement proposal (`proposalId`) for a reviewer to decide. `nothing-found`: no candidate beat them by more than the noise, or within the budget (`reason`; `holdOut` has the best candidate’s numbers when one got that far). `failed`: `message` says why.

object

**kind**

required

string

Allowed values: proposed nothing-found failed

**proposalId**

string format: uuid

**reason**

string

**holdOut**

object

**baseline**

required

number | null

**candidate**

required

number | null

**delta**

required

number | null

**spread**

number

**message**

string

**cancelReason**

Why a `cancelled` pass stopped when nobody cancelled it: a comparison’s eval run was cancelled for it (that run’s `cancelReason`, e.g. `project-suspended`). It wrote no proposal. Absent when it was cancelled.

string

**comparisons**

Its comparisons so far, each an eval run to open: `reference` (the version as it is, on the search part), each `candidate` (the block and the values it changed, on the search part), and the `proof` (the proposal, on the hold-out part). Absent from older servers.

Array\<object>

object

**evalRunId**

string format: uuid

**role**

required

string

Allowed values: reference candidate proof

**part**

required

string

Allowed values: search hold-out

**blockId**

string

**changed**

object

**_key_**

additional properties

any

**score**

number | null

**failed**

string

**refused**

For a drafted template that was never compared: why the check refused it (what it reads or names that the agent doesn’t have, or its size).

Array\<object>

object

**path**

required

string

**message**

required

string

**hypothesis**

For a drafted template: what the drafter meant it to change.

string

**trigger**

The improve schedule and fire that started it (`GET /v1/schedules/{triggerId}/fires`); absent for a pass a person started.

object

**triggerId**

required

string

**fireId**

required

string

**createdAt**

required

string format: date-time

**updatedAt**

required

string format: date-time

**finishedAt**

string format: date-time

##### Example

```json
{
  "scope": {
    "kind": "tenant"
  },
  "tiers": [
    "settings"
  ],
  "objective": "weightedYesShare",
  "classWeights": "as-recorded",
  "status": "running",
  "outcome": {
    "kind": "proposed"
  },
  "comparisons": [
    {
      "role": "reference",
      "part": "search"
    }
  ]
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No such pass (or none the caller can read).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 501

`improve-unsupported`: this runtime runs no improvement passes.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`POST /v1/improvement-passes/{passId}/cancel`: Cancel an improvement pass](https://docs.kindgi.com/v0.1.9/reference/api/operations/improvementpassescancel.md)
- [Error code `improve-unsupported`](https://docs.kindgi.com/v0.1.9/reference/errors.md#improve-unsupported)
- [Every error code](https://docs.kindgi.com/v0.1.9/reference/errors.md)
