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

# Evidence and traces

> Trace every routed call: which model answered it, how the task ended, what it cost, and each step it took.

Every call is recorded with the rule that decided it and the model that answered. Routing shows that record at five levels, from a whole rule down to one call.

| Where | What it answers |
| - | - |
| The **Rules** tab | For each rule: the success rate of each of its models over the last 30 days, and the calls it decided in the last 7 days |
| A rule's **Evidence** tab | What the rule is doing now: who answers what share, how those tasks end, what a verified task costs on each model |
| A task's **trace** | One task step by step: the model behind each call, the tools it called, the time and the cost |
| A session's calls | The routing badge on each call. See [In a session](#in-a-session). |
| The response | The `x-senselab-route` header on every call. See [On the response](#on-the-response). |

![The Rules tab with two rules: each rule's route, the success rate of each of its models with the number of verified tasks, and its calls in the last 7 days](https://mintcdn.com/senselab/c_8gAHLjSuszMzeE/images/sensei/routing-rules-record.png?fit=max\&auto=format\&n=c_8gAHLjSuszMzeE\&q=85\&s=3b3383dddf48232180c9c12b42534c97)

Automatic moves of a split are on the **Activity** tab, each with the numbers that caused it. See [Adapt](https://docs.sense-lab.ai/sensei/routing/rules.md#adapt).

Everyone on the account can read all of this. Only an admin can change a rule.

## Open a rule's evidence

Open **Routing**, click a rule on the **Rules** tab, and pick **Evidence**. The tab is marked **none yet** while the rule has no results.

![A rule's Evidence tab on the 7-day window: the sentence, the graph from the rule to the two models to how the tasks ended, Models compared and Calls over time](https://mintcdn.com/senselab/c_8gAHLjSuszMzeE/images/sensei/routing-evidence.png?fit=max\&auto=format\&n=c_8gAHLjSuszMzeE\&q=85\&s=0a7ecbbedbbf24c52b7cfcb380bd3cdc)

The evidence is for the rule as it is saved, which is the one calls are routed by. While the form holds an edit you have not saved, the tab says which version it shows.

| Control | What it does |
| - | - |
| **1 hour**, **24 hours**, **7 days**, **30 days** | The window every figure on the tab is measured over. It opens on 24 hours. |
| **Live** | The tab reads again every 5 seconds on the two short windows, every 15 on 7 days and every 30 on 30 days, while the page is in view |
| **Pause** and **Resume** | Stops and restarts the reading. The refresh button reads once. |

When the tab opens it replays the newest calls once and says so. After that, nothing moves unless a call was answered or a task got an outcome.

A window with no calls says when the rule last decided one and offers the next wider window. In **Observe**, a rule routes nothing, so the tab says how many calls it would have decided in the last 7 days. A rule that refuses calls has no traffic to draw.

## What the Evidence tab shows

### The answer in a sentence

The tab starts with what the window's numbers add up to, for example:

> Sensei is ahead: 82% ±9 against gpt-5's 61% ±12, further apart than the samples' margins. A verified task costs $0.04 on Sensei and $0.19 est. on gpt-5.

When the two margins overlap it says **No clear difference yet** and names no winner. With too few verified tasks it says how many each model has.

If calls to a model failed in the window, a red notice above the sentence says how many and what the newest failure said, in the provider's own words where it gave any.

### The graph

Three columns, left to right:

| Column | Content |
| - | - |
| **Calls this rule decided** | The rule, its calls in the window and how many failed |
| **Answered by** | One box for each model: its share of the calls, the share the rule gives it now, its success rate with the number of verified tasks, its failed calls, and its cost in all and per verified task. A model that only answered as a fallback is marked **fallback**. |
| **How the tasks ended** | The count of tasks for each ending |

A link from the rule to a model is as thick as that model's share of the calls. A link from a model to an ending is as thick as those tasks' share of all tasks. A dot that travels a link is one call being answered or one task getting its outcome. A red dot is a call that failed.

| Ending | Meaning |
| - | - |
| Worked | The task was verified as done |
| Partly worked | The task was verified as done in part |
| Did not work | The task was verified as not done |
| Unfinished | The task never got to an answer: the editor was closed, the run was stopped, or the last call failed. It counts neither for nor against the model. |
| Not verified yet | Still running, or nothing has given it an outcome yet |

A task is one ask with every call of its tool loop. It is verified when it has an [outcome](https://docs.sense-lab.ai/sensei/outcomes.md) from you, the editor hook, CI, a harness or Sensei's read.

### Models compared

![Models compared: for each model its calls and share against the rule's target, success rate with its margin and the 30-day rate, tasks, cost per verified task, spend and latency](https://mintcdn.com/senselab/c_8gAHLjSuszMzeE/images/sensei/routing-evidence-models.png?fit=max\&auto=format\&n=c_8gAHLjSuszMzeE\&q=85\&s=cdcc55aca82887c15cd95383c57b9873)

| Column | Meaning |
| - | - |
| Calls | Calls the model answered in the window and its share of them. The tick on the bar is the share the rule gives it now. A session keeps the model it first drew, so the two meet over time and not at once. Under it: calls that failed, calls it took after a cap was reached, and calls it took as a fallback. |
| Success rate | Verified tasks that worked, out of verified tasks, with the margin a sample of that size leaves. Unfinished tasks are not counted. On a window shorter than 30 days, a second line gives the 30-day rate. |
| Tasks | How the tasks it took part in ended |
| Cost / verified task | Spend in the window divided by verified tasks |
| Spend | What the model's calls cost in the window |
| Latency | The median time to answer a call, and the time 95% of calls came in under |

The 30-day rate is the one that **Adapt on results** and the **Success rate** condition read. A task that two models answered counts for both.

Costs are worded three ways. A plain amount is what was drawn from your balance. An amount marked **est.** is for calls on your own provider key: the provider bills those, so the page prices their tokens at the provider's list rate. **Included** means your plan covers the calls. A call that failed is **not billed**.

### Calls over time

One bar for each 5 minutes on the 1-hour window, each hour on 24 hours, each 6 hours on 7 days and each day on 30 days. A bar has a segment for each model, and failed calls on top in red.

### Newest tasks

The 25 newest tasks the rule decided calls for, newest first. One row is one task, however many calls its tool loop made.

![Newest tasks: when, the start of the ask, the model that answered, steps, time, cost and the outcome with who gave it](https://mintcdn.com/senselab/c_8gAHLjSuszMzeE/images/sensei/routing-evidence-tasks.png?fit=max\&auto=format\&n=c_8gAHLjSuszMzeE\&q=85\&s=6b01902df4e9f8812fcdd4ca4b9065a3)

| Column | Content |
| - | - |
| When | When its newest call ended |
| Task | The start of the ask, with the project and the client that sent it |
| Answered by | The model that answered most of its calls, and any others |
| Steps | Its calls, failed ones included |
| Took | From its first call beginning to its newest ending |
| Cost | What its calls cost |
| Result | The outcome and who gave it, such as **success · harness**, or **not verified yet**. Failed calls are counted here with what the error said. |

A row the last reading changed is tinted for a moment. Click a row to open the task's trace.

### Moves on this rule

On a rule that adapts, the tab ends with the rule's latest ramps, rollbacks and holds, each with its reason. After you change an adapting rule both models start again from no verified tasks, and the calls already made stay in Evidence.

## A task's trace

Click a task under **Newest tasks**. Its trace opens beside the list, and on a narrow window over it. A task that is still under way grows a step at a time.

![A task's trace: the ask and who made the calls, the four figures, the result, and eight steps, each with its model, its place on the task's clock, the command it ran, its time and its cost](https://mintcdn.com/senselab/c_8gAHLjSuszMzeE/images/sensei/routing-trace.png?fit=max\&auto=format\&n=c_8gAHLjSuszMzeE\&q=85\&s=5bbb7ea9cd573d55d85c6e3aa9896f40)

The header has the ask, who made the calls, the project and when it started. **Session** opens the whole session in a new tab. Who made the calls is read from what the client sends: its user agent, or an `x-senselab-client` header. It is the editor's name, **Other editor**, or **Agent or script** for a program nobody reads live, which is what a [run](https://docs.sense-lab.ai/sensei/runs/overview.md) is.

| Figure | Meaning |
| - | - |
| Steps | The task's calls, with the model that answered them, the number of models when there was more than one, or the number that failed |
| Took | From the first call beginning to the last one ending, and how much of that was spent in the model. The rest is the time between calls: the client running the tools the model asked for, or waiting for a person. |
| Tokens | Input and output, with the share of input that came from cache. Every call sends the whole conversation again, so input is each call's context added up. |
| Cost | What the task cost, and the cost per step |

**Result** has the outcome, who gave it and its summary, or **Not verified yet**.

### Step by step

Every call of the task is a step, in order, whichever rule decided it. The line above the list counts what the steps did, such as "3 reads · 1 edit · 2 commands".

A step shows:

* The model that answered, in the colour it has on the graph. **instead of** names the model the rule drew when another had to answer, and **cap reached** marks a call the rule's cap sent to the fallback.
* A bar on the task's clock: where the call fell between the first call beginning and the last one ending. The gaps between bars are time spent outside the model.
* The tools the step called, as chips: a file read or edited, a command, a search. The first three show until you open the step.
* How it ended: **Answered** with the start of the answer, an error, **stopped early** when the client stopped reading, or **cut by output limit**.
* Any [nudge](https://docs.sense-lab.ai/sensei/sessions.md#nudges) on the call.
* Its time and cost.

A step's tools are read from the call that follows it. So the last step of a task under way reads **Called tools; no call has followed yet** until the next call arrives. The line stays on a task whose last call asked for tools and was never followed, as on the last step in the picture above.

Click a step to open it.

![A step opened: Budget, Routed by with the rule's name, Waited, Tokens, Recalled, the start of the reasoning, and the request id](https://mintcdn.com/senselab/c_8gAHLjSuszMzeE/images/sensei/routing-trace-step.png?fit=max\&auto=format\&n=c_8gAHLjSuszMzeE\&q=85\&s=fa820b57d31ddc0f22fda442da1d0d27)

| Line | Content |
| - | - |
| Budget | The step's number in the task and the task's step budget |
| Routed by | The rule that decided the call, by name, or the default |
| Waited | The time since the call before ended |
| Tokens | Input, with how much came from cache, and output |
| Recalled | How many [Learnings](https://docs.sense-lab.ai/sensei/learnings.md) the call started with, and their names |
| Reasoning | The start of the reasoning the model let be read. For a model on your key, this is the summary its provider gives, where it gives one. |
| Answer | The start of the answer |
| Pull request | The pull request the step opened, when it opened one |
| Request | The call's id, the same as the `x-senselab-request-id` header. Quote it when you report a problem. |

A trace holds the first 400 steps of a task. The session has the rest.

### What a trace is built from

A trace is read from the record of each call. For every call, whichever model answered it, that record keeps the routing decision, the model, the times, tokens, cost and status, and these excerpts:

| Excerpt | Length |
| - | - |
| The ask of the task | The first 600 characters |
| The reasoning the model let be read | The first 400 characters. Text shaped like a credential is not kept. |
| The answer | The first 400 characters |
| The tools the model called | Their kind and target: the file, the command or the pattern |
| What an error said | The first 300 characters |

The full conversation is not part of a trace. See [Privacy](https://docs.sense-lab.ai/sensei/privacy.md) for what else Sensei keeps.

## In a session

On the **Sessions** page, each call under **Call by call** has a routing badge with the model that answered and why, such as `sensei · default` or `openai/gpt-5 · rule:r-8f2a`. In **Observe**, hovering it also says what the rule would have done.

![Call by call on a session: each call's routing badge names the model that answered and the rule that decided](https://mintcdn.com/senselab/c_8gAHLjSuszMzeE/images/sensei/session-routing.png?fit=max\&auto=format\&n=c_8gAHLjSuszMzeE\&q=85\&s=b288f6991f66eaa30d5948fe4b1a6069)

The sessions list can be filtered by the model that served the session. See [Sessions](https://docs.sense-lab.ai/sensei/sessions.md).

## On the response

Every response carries an `x-senselab-route` header, so your own code can log how each call was routed without the dashboard.

```json theme={null}
{"route":"rule:r-8f2a","served_by":"byok:openai","project":"payments","plan":"team","basis":"subscription","k":3,"n":25,"interventions":[],"retrieved":6}
```

| Field | Meaning |
| - | - |
| `route` | `rule:<id>` for the rule that decided, `rule:<id>:cap` when that rule's cap sent the call to its fallback, `default` when no rule matched, and `named` when the call skipped the rules |
| `served_by` | `sensei`, `sensei:<project>` when the project's own model answered, or `byok:<provider>` for a model on your provider key |
| `failed_over` | The models that could not answer before this one did. Present only when that happened. |
| `k`, `n` | The step in the task and the task's step budget |
| `retrieved` | How many Learnings the call started with |
| `interventions` | What Sensei added to the call, nudges included |
| `project`, `plan`, `basis` | The project the key belongs to, the account's plan and how it is billed |

A rule's id is in the policy document. See [Settings](https://docs.sense-lab.ai/sensei/routing/overview.md#settings).

## Runs

The model calls of a run are routed and recorded like any other call. A run's task appears under **Newest tasks** of the rule that decided it, made by **Agent or script**, and its trace has a step for every model call the run made. The run's own page names the models that answered under **Served by**. See [Choose the model](https://docs.sense-lab.ai/sensei/runs/models.md#see-which-model-did-the-work).


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