# IMentorMetrics interface

> The IMentorMetrics interface of Novior.MentorAgent.Abstractions.Interfaces: Process-wide sink for operational usage metrics powering the admin token & cost…

- URL: https://docs.mentoragent.net/api/novior-mentoragent-abstractions-interfaces/imentormetrics
- Verified with: MentorAgent 1.2.0
- Last updated: 2026-10-27
- Packages: Novior.MentorAgent.Abstractions

Process-wide sink for operational usage metrics powering the admin token &amp; cost dashboard (roadmap \#9). Recording methods are called by the engine; [`IMentorMetrics.GetSnapshot`](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-interfaces/imentormetrics#getsnapshot) is read by the dashboard component and the admin endpoint. This is an operator/admin instrument and must never be surfaced in the end-user widget.

## Definition

Namespace: `Novior.MentorAgent.Abstractions.Interfaces`. Package: `Novior.MentorAgent.Abstractions`.

`public interface IMentorMetrics`

```shell
dotnet add package Novior.MentorAgent.Abstractions
```

## Methods

### `GetSnapshot`

`MentorMetricsSnapshot GetSnapshot()`

Builds a point-in-time snapshot (cost included only if pricing is configured).

### `RecordError`

`void RecordError()`

A turn ended in an error.

### `RecordGuardrailBlock`

`void RecordGuardrailBlock()`

A message was blocked by the input guardrail.

### `RecordServed`

`void RecordServed()`

A turn completed without an error or guardrail block (deflection).

### `RecordToolCall`

`void RecordToolCall(string toolName)`

A tool/action was invoked (feeds the "top actions" list).

### `RecordTurn`

`void RecordTurn()`

A user message (turn) was received.

### `Reset`

`void Reset()`

Resets all counters (e.g. to start a fresh measurement window).

---

- Previous: [IMentorAgent interface](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-interfaces/imentoragent.md)
- Next: [IMentorMetricsStore interface](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-interfaces/imentormetricsstore.md)
