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

# Benchmark in Command Center

> The Benchmarks pages, the scenario form, launching runs, and stopping or deleting them

Everything about benchmarks lives in **Command Center → Benchmarks**. This page is the reference for each screen. For a guided first run, see the [Quickstart](https://docs.2501.ai/0.23/benchmark/quickstart.md).

![Benchmarks](https://mintcdn.com/2501/Nw-5R3i4HUHiTxUb/images/benchmarks_list_016.png?fit=max\&auto=format\&n=Nw-5R3i4HUHiTxUb\&q=85\&s=00e9c7f18cb7c6c3affc1049f88fef11)

Benchmarks: every scenario's pass rate and trend over time.

## The pages

| Page | What it shows |
| - | - |
| **Benchmarks** | Average pass rate and compliance over a time range, with the change from the previous period; a trend chart; every scenario with its pass rate, trend, and history; and the recent benchmarks. Filter by time range and engine. **New scenario** and **Run benchmark** start here. |
| **A scenario** | Its run history - verdict, compliance, tokens, engines, time to resolve - and the average tokens per run, with **Edit scenario**, **Target setup**, **Target restore**, **Post ticket**, and **Run now**. |
| **A benchmark** | Each scenario in it with its live stage, tokens, duration, and compliance. **Stop** and **Delete benchmark** are here. |
| **A scenario run** | One run's verdict, compliance, engines, timings, and every validation check with what it inspected. |

Tokens read as `in · out · cache`, for example `11K in · 8K out · 45K cache`. **in** is the input that was not served from the prompt cache, **out** is the output, and **cache** is the input that the prompt cache served. The three numbers add up to the run's total. Counts from 1,000 up are rounded to the nearest thousand (`K`), and from 1,000,000 up to one decimal (`M`). Hover a line for the exact numbers. The task, job and agent pages show tokens the same way.

![Completed benchmark summary and scenario results](https://mintcdn.com/2501/Nw-5R3i4HUHiTxUb/images/benchmark_summary_019.png?fit=max\&auto=format\&n=Nw-5R3i4HUHiTxUb\&q=85\&s=7ad55b68fde9a45133a167ceb9f3fd63)

A benchmark summary brings together pass rate, compliance and scenario results.

## The scenario form

**New scenario** and **Edit scenario** open the same form, with seven sections:

| Section | What you fill in |
| - | - |
| **Scenario definition** | Name, description, and the ticket the agent receives: ticket title and ticket description. An optional **Monitoring Alert** row takes the service, the state (`WARNING`, `CRITICAL` or `UNKNOWN`) and the probe output a monitoring alert carries; fill in the service and the output together, or leave both blank for no alert. It is used by runs [through Ecritel](#running-through-ecritel). |
| **Evaluated agents** | The agents to benchmark. Each agent's host becomes a target: setup, restore, and `host_state` blocks appear per host. Removing an agent removes its host's blocks. Leave it empty for a scenario that only grades gateway behaviour. |
| **Reserved hosts** | While this scenario runs, it is the only one running on these hosts - see [Reserved hosts](https://docs.2501.ai/0.23/benchmark/scenario.md#reserved-hosts). |
| **Variables** | Name/value pairs shared by every phase. Write `${name}` in any command. |
| **Target setup** | The commands that break the machine, per host. |
| **Validation** | The rules that grade the run - see [Validation rules](https://docs.2501.ai/0.23/benchmark/validation.md). |
| **Target restore** | The commands that put the machine back, per host. |

Target setup, Validation, and Target restore each have a **Form / JSON** toggle. The JSON is the [scenario format](https://docs.2501.ai/0.23/benchmark/scenario.md): switch to it to paste an example or edit many steps at once.

While editing, each setup and restore block has a **Run it** button that saves the block and runs it on its host, so you can build a phase step by step. The status selector sets `draft`, `published`, or `disabled`, and **History** lists every saved version.

Only an **Admin** can create, edit, or delete scenarios.

## Testing setup and restore

On a scenario's page, **Target setup** and **Target restore** run just that phase, with each step's status and output. Nothing is sent to an agent and nothing is graded, so these runs never appear in the results.

These buttons run the phase on every host, in the order the scenario declares its steps, with one block per host. The step in progress shows a spinner and its elapsed time. When a step fails, the phase stops, and the steps it did not reach show **Not run**.

Use them to:

* check new commands before a graded run,
* leave a host broken on purpose to look at it (**Target setup** alone),
* clean up a host an interrupted run left dirty (**Target restore** alone).

**Post ticket** sends the ticket to the agent and grades the run, with no target setup before it and no target restore after it. Run **Target setup** first, then **Post ticket**, then **Target restore** when you are done looking at the host. The run's page marks it **Agent only**.

These phase runs go one at a time per organization, and wait for any benchmark using the same host.

## Running a benchmark

* **Run now** on a scenario's page runs that scenario as a one-scenario benchmark.
* **Run Benchmark** on the Benchmarks page picks several scenarios - draft and published - for one benchmark.

Both dialogs let you choose:

| Option | Effect |
| - | - |
| **Gateway** | **Runner** (default) creates the ticket inside 2501. **ServiceNow** creates a real incident - see [below](#running-through-servicenow). **Ecritel** raises a real monitoring alert - see [below](#running-through-ecritel). |
| **Main engine**, **Secondary engine** | Override the evaluated agents' models for this benchmark. The agents themselves are not changed. |
| **Gateway engine** | Override the model the gateway routes the ticket with. |
| **Run sequentially** | Run the scenarios one at a time, in order. |

Leave an engine on **Leave unchanged** to use the current configuration. Whatever you choose is frozen at launch, along with each scenario's current version.

Without **Run sequentially**, each scenario holds every host it targets or reserves until it has restored them: scenarios sharing a host run one at a time, scenarios on different hosts run together.

A benchmark holds up to 50 scenarios.

### Running through ServiceNow

With the ServiceNow gateway, each run creates a real incident on your instance and waits up to 10 minutes for your ServiceNow gateway to pick it up. This tests the whole path a customer ticket takes, including ingestion.

The organization's ServiceNow gateway needs three extra metadata keys:

| Key | Purpose |
| - | - |
| `servicenow_assigned_group_id` | The assignment group the incident is created in. |
| `servicenow_caller_id` | The caller set on the incident. |
| `environment` | The environment tag that routes the incident to this organization. |

Point benchmarks at an assignment group that real incidents do not use.

### Running through Ecritel

With the Ecritel gateway, each run raises an alert in Ecritel's event manager (E2M), on one of the scenario's hosts. E2M groups it into an event chain, your Ecritel gateway picks the chain up on its next pull, opens the job and the helpdesk issue, and writes the outcome back to that issue. This tests the whole path a real alert takes.

* The run uses the organization's Ecritel gateway and the same connection it pulls with. There is nothing extra to configure.
* A scenario with a **Monitoring Alert** stands for an alert Nagios raises. The run raises the alert's service, state (`WARNING`, `CRITICAL` or `UNKNOWN`) and probe output, as Nagios reports them when the setup breaks the host. The alert sets the issue's state and severity, and the job gets the same French description a real alert gives it, with no instructions.
* A scenario with no Monitoring Alert stands for a ticket a person opens, instructions included. The gateway does not take such tickets yet, so the run raises the ticket as an alert: its description becomes the probe output, so the instructions reach the job. A title in the form `HOST - SERVICE - STATE` gives the service and the state, otherwise the title is the service and the state is `CRITICAL`.
* The scenario needs at least one host. The alert is raised on the first name, of the host the run is narrowed to or else of the scenario's hosts in order, that is an item in Ecritel's CMDB, so E2M finds the equipment and its administration level. A host the CMDB does not know, such as an API lane, is passed over. Add the CMDB name to a host's additional names if none is there. A graded run checks this before its setup.
* The service becomes the issue subject, which Ecritel caps at 255 characters together with the host name and a run tag. A longer service fails the run before any alert is raised.
* The alert carries a run tag (`[2501-bench:...]`), and the gateway only picks up a tagged chain once the benchmark has recorded it, so the run keeps the models you chose.
* 2501 waits up to 2 minutes for E2M to chain the alert, then up to 10 minutes for the gateway to open the job.
* `gateway_messages` and `gateway_summary` rules read the notes the gateway wrote on the helpdesk issue.

The alert's chain is left open in E2M when the run ends.

A scenario that breaks a host Ecritel monitors also sets off a real monitoring alert, whichever gateway the run uses. The Ecritel gateway does not turn that alert into a job or a helpdesk issue. It leaves out every alert that starts on one of the run's hosts while the run is going on or in the 30 minutes after it ends, including an alert the run did not cause. Those alerts stay in E2M, so watch E2M for these hosts during a run. If the run could not restore a host, its alert becomes a job and a helpdesk issue once the run ends.

## Stopping a run

**Stop** on a benchmark cancels every scenario in it; **Stop** on a scenario run cancels that run. A stopped run still runs **Target restore**, so the host is put back.

## When restore fails

If **Target restore** fails, the run says **Restore failed** and the benchmark page flags the scenario **host left dirty**. Later runs on that host would score against a broken machine. Fix the restore, then run **Target restore** from the scenario's page to clean the host - see [Keeping scenarios healthy](https://docs.2501.ai/0.23/benchmark/maintaining.md).

## If the engine restarts

A run caught mid-way by an engine restart, such as a rollout, resumes where it stopped and ends with a normal verdict. Its host is put back as usual.

* If the run had already started **Target setup**, 2501 runs **Target restore** first, then runs the setup again.
* 2501 never posts the ticket or a plan answer twice. If the restart cut a post short, the run ends as **Error** and the host is restored.
* If you clicked Stop while the engine was down, the run ends as **Cancelled** and the host is restored.

> [!NOTE]
>
> A scenario with no restore commands, or a run with the restore phase off, runs a cut-short setup again without a reset. Design setup to be safe to repeat - see [Designing scenarios](https://docs.2501.ai/0.23/benchmark/designing.md).

## Deleting

* **Delete benchmark** on a benchmark's page permanently deletes it with its runs and the jobs, tasks, and tickets they created. It cannot be undone.
* **Delete** on a scenario removes the scenario. Its past runs stay in the results.
* To retire a scenario without losing it, set it to `disabled` instead: it stays visible and editable, but cannot be launched.


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