Table of Contents

Class AgentMetrics

Namespace
LMKit.Agents.Observability
Assembly
LM-Kit.NET.dll

Collects and exposes metrics about agent execution.

Tracks counts, durations, and other statistics that can be exported to monitoring systems.

public sealed class AgentMetrics
Inheritance
AgentMetrics
Inherited Members

Properties

Global

Gets the singleton instance for global metrics.

Methods

GetCounters()

Gets a snapshot of all counter values.

GetGauges()

Gets a snapshot of all gauge values.

GetHistograms()

Gets a snapshot of all histogram statistics.

IncrementAgentExecutions(string, bool)

Increments the agent execution count.

IncrementCounter(string, long, Dictionary<string, string>)

Increments a counter metric.

IncrementToolInvocations(string, bool)

Increments the tool invocation count.

RecordAgentDuration(string, TimeSpan)

Records agent execution duration.

RecordHistogram(string, double, Dictionary<string, string>)

Records a value in a histogram (for distributions).

RecordInferenceCount(string, int)

Records inference count for an execution.

RecordTokens(string, int, int)

Records token usage.

RecordToolDuration(string, TimeSpan)

Records tool invocation duration.

Reset()

Resets all metrics.

SetGauge(string, double, Dictionary<string, string>)

Sets a gauge value.