MetricKey

@Serializable
value class MetricKey<out Metric>(val id: String)

Typed key for identifying a metric within a MetricsMap.

The type parameter T ensures compile-time safety when retrieving metrics: metricsMap[ai.koog.agents.optimization.training.metrics.impl.ElapsedTimeMetric.KEY] returns ElapsedTimeMetric?.

Constructors

Link copied to clipboard
constructor(id: String)

Properties

Link copied to clipboard
val id: String

Stable string identifier of the metric, used as the serialized map key.

Functions

Link copied to clipboard
open override fun toString(): String

Returns the metric id.