> ## Documentation Index
> Fetch the complete documentation index at: https://docs.honeyhive.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Metrics

> Define and run evaluators, i.e. automated quality checks that score traces against criteria like accuracy, safety, or correctness.

## Schema introspection

Every command below with arguments supports two read-only flags for tooling and AI agents:

* `--show-file-schema`: print the JSON Schema for the full request object (the format `--filename` accepts).
* `--show-argument-schema <flag-name>`: print the JSON Schema for one argument's value. Pass the kebab flag name **without** the leading `--` (e.g. `type`, not `--type`).

Both write pure JSON to stdout and never call the API. They cannot be combined with any other command-specific flag.

## `list`

List all metrics

### Usage

```sh theme={null}
honeyhive metrics list [options]
```

**Accepted keys:** [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--id` | string | no | Filter by specific metric ID |
| `--type` | string | no | Filter by metric type |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.

## `create`

Create a new metric

### Usage

```sh theme={null}
honeyhive metrics create [options]
```

**Accepted keys:** [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--criteria` | string | yes | criteria |
| `--name` | string | yes | name |
| `--type` | string | yes | type Allowed: `PYTHON`, `LLM`, `HUMAN`, `COMPOSITE`. |
| `--categories` | json | no | categories |
| `--child-metrics` | json | no | Deprecated and ignored. Composite metrics are no longer supported. |
| `--description` | string | no | description |
| `--enabled-in-prod` / `--no-enabled-in-prod` | boolean | no | enabled\_in\_prod |
| `--filters` | json | no | filters |
| `--model-name` | string | no | model\_name |
| `--model-provider` | string | no | model\_provider |
| `--needs-ground-truth` / `--no-needs-ground-truth` | boolean | no | Deprecated and ignored. Ground-truth use is inferred from the evaluator definition. |
| `--return-type` | string | no | return\_type Allowed: `float`, `boolean`, `string`, `categorical`. |
| `--sampling-percentage` | number | no | sampling\_percentage |
| `--scale` | number | no | scale |
| `--threshold` | json | no | threshold |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.

## `update`

Update an existing metric

Update a metric's editable fields. Only fields included in the request body are modified.

### Usage

```sh theme={null}
honeyhive metrics update [options]
```

**Accepted keys:** [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--metric-id` | string | yes | The unique identifier of the metric to update |
| `--categories` | json | no | categories |
| `--child-metrics` | json | no | Deprecated and ignored. Composite metrics are no longer supported. |
| `--criteria` | string | no | criteria |
| `--description` | string | no | description |
| `--enabled-in-prod` / `--no-enabled-in-prod` | boolean | no | enabled\_in\_prod |
| `--filters` | json | no | filters |
| `--model-name` | string | no | model\_name |
| `--model-provider` | string | no | model\_provider |
| `--name` | string | no | name |
| `--needs-ground-truth` / `--no-needs-ground-truth` | boolean | no | Deprecated and ignored. Ground-truth use is inferred from the evaluator definition. |
| `--return-type` | string | no | return\_type Allowed: `float`, `boolean`, `string`, `categorical`. |
| `--sampling-percentage` | number | no | sampling\_percentage |
| `--scale` | number | no | scale |
| `--threshold` | json | no | threshold |
| `--type` | string | no | type Allowed: `PYTHON`, `LLM`, `HUMAN`, `COMPOSITE`. |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.

## `delete`

Delete a metric

### Usage

```sh theme={null}
honeyhive metrics delete [options]
```

**Accepted keys:** [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--metric-id` | string | yes | The unique identifier of the metric to delete |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.

## `run`

Run a metric evaluation

Execute a metric on a specific event

### Usage

```sh theme={null}
honeyhive metrics run [options]
```

**Accepted keys:** [Project API key](https://docs.honeyhive.ai/v2/workspace/api-keys.md#key-types)

### Options

| Flag | Type | Required | Description |
| - | - | - | - |
| `--event` | json | yes | event |
| `--metric` | json | yes | metric |

Also supports `--show-file-schema`, `--show-argument-schema <flag-name>`, and `--filename`. See [Schema introspection](#schema-introspection) for details.


## Related topics

- [Delete a metric](https://docs.honeyhive.ai/v2/api-reference-autogen/metrics/delete-a-metric.md)
- [Metrics Methods](https://docs.honeyhive.ai/v2/sdk-reference/typescript/ref/metrics/index.md)
- [Metric Versions](https://docs.honeyhive.ai/v2/cli-reference/ref/metric-versions.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.