MentorAgent Docs
Menu

ReferencePackage: Novior.MentorAgent.Abstractions

MentorMetricsSnapshot record

The MentorMetricsSnapshot record of Novior.MentorAgent.Abstractions.Models: A point-in-time view of MentorAgent usage for the admin token & cost dashboard…

View as Markdown
On this page

A point-in-time view of MentorAgent usage for the admin token & cost dashboard (roadmap #9). Produced by IMentorMetrics.GetSnapshot(). Process-wide (single instance); for multi-instance production aggregation use OpenTelemetry (roadmap #8).

Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.

public sealed record MentorMetricsSnapshot : IEquatable<MentorMetricsSnapshot>

Terminal
dotnet add package Novior.MentorAgent.Abstractions

public MentorMetricsSnapshot()

public double DeflectionRate { get; }

Share of turns served without error/guardrail block (0–1).

public long ErrorCount { get; init; }

Turns that ended in an error.

public DateTimeOffset GeneratedAt { get; init; }

When this snapshot was produced (UTC).

public long GuardrailBlockCount { get; init; }

Messages blocked by the input guardrail — the safety check, a custom InputGuardrail, and RefuseOutOfScope refusals — plus replies withheld by the output check.

public decimal? InputCost { get; init; }

Estimated input cost — null when no pricing is configured for the model.

public string? ModelId { get; init; }

Primary chat model id used for pricing (null if unknown).

public IReadOnlyList<MentorModelUsage> Models { get; init; }

Per-model usage, cost and time series (roadmap #9) — typically the cheap chat model, the strong routing model and the embedding model. Empty on legacy snapshots; the aggregate fields above are the sum across these entries.

public decimal? OutputCost { get; init; }

Estimated output cost — null when no pricing is configured.

public long RequestCount { get; init; }

Model round-trips recorded.

public int SeriesBucketMinutes { get; init; }

Width of each MentorUsagePoint time-series bucket, in minutes (default 60).

public long ServedCount { get; init; }

Turns completed without an error or guardrail block — the deflection proxy.

public IReadOnlyList<MentorActionCount> TopActions { get; init; }

Most-invoked tools/actions, highest first.

public decimal? TotalCost { get; }

Estimated total cost, or null when pricing is not available.

public long TotalInputTokens { get; init; }

Cumulative input (prompt) tokens.

public long TotalOutputTokens { get; init; }

Cumulative output (completion) tokens.

public long TotalTokens { get; }

Cumulative total tokens.

public long TurnCount { get; init; }

User messages (turns) received.