> ## Documentation Index
> Fetch the complete documentation index at: https://critiqor-71f5274a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# critiqor check — Run Agent Deployment Policy Checks

> critiqor check validates your evaluation history against configurable thresholds. Use it to gate deployments on trust score and hallucination risk limits.

`critiqor check` reads your saved evaluations and validates them against reliability thresholds that you define. Use it to gate deployments, enforce reliability standards in CI, or verify that your agent meets a required quality bar before shipping.

## Syntax

```bash theme={null}
critiqor check [OPTIONS]
```

## What It Does

The command reads your evaluation file and checks whether the results meet your specified thresholds. It exits `0` if all checks pass and a non-zero code if any threshold is not met. You can define thresholds directly as flags or supply a policy file for reusable, version-controlled configuration.

## Options

| Flag                           | Type    | Default                      | Description                                             |
| ------------------------------ | ------- | ---------------------------- | ------------------------------------------------------- |
| `--evaluations`                | path    | `critiqor_evaluations.jsonl` | Path to the evaluation file to check.                   |
| `--agent-id`                   | string  | *(none)*                     | Filter checks to a specific agent.                      |
| `--policy`                     | path    | *(none)*                     | Path to a JSON or YAML policy file defining thresholds. |
| `--minimum-trust-score`        | integer | *(none)*                     | Minimum trust score (0–100) required to pass.           |
| `--maximum-hallucination-risk` | integer | *(none)*                     | Maximum hallucination risk (0–100) allowed.             |

## Examples

```bash theme={null}
# Run with explicit thresholds
critiqor check --minimum-trust-score 75 --maximum-hallucination-risk 20

# Filter by agent
critiqor check --agent-id my_agent --minimum-trust-score 80

# Use a policy file
critiqor check --policy policy.json
```

### Example `policy.json`

```json theme={null}
{
  "minimum_trust_score": 75,
  "maximum_hallucination_risk": 25
}
```

## Exit Codes

| Code     | Meaning                                      |
| -------- | -------------------------------------------- |
| `0`      | All checks passed — every threshold was met. |
| Non-zero | One or more thresholds were not met.         |

## CI Integration

Because `critiqor check` uses standard exit codes, it works in any shell-based CI pipeline. Add it as a step after your evaluation workflow to block a deployment when reliability drops below your threshold.

Run `critiqor finalize --no-dashboard` first to ensure your evaluation file is up to date before the check runs:

```bash theme={null}
critiqor finalize --no-dashboard && critiqor check --policy policy.json
```

<Warning>
  Make sure you have finalized your most recent session with `critiqor finalize` before running policy checks. Unfinalized sessions are not included in the evaluation file and will not be reflected in the check results.
</Warning>
