AgentRunStatsMetric

@Serializable
@SerialName(value = "agentRunStats")
data class AgentRunStatsMetric(val key: MetricKey<AgentRunStatsMetric> = KEY, val totalRuns: Int = 0, val completedRuns: Int = 0, val failedRuns: Int = 0, val solvedRuns: Int = 0, val completionRatio: Ratio = Ratio.ZERO, val solvedRatio: Ratio = Ratio.ZERO) : Metric

Aggregated statistics for all agent runs within a stage recursively through substages.

Constructors

Link copied to clipboard
constructor(key: MetricKey<AgentRunStatsMetric> = KEY, totalRuns: Int = 0, completedRuns: Int = 0, failedRuns: Int = 0, solvedRuns: Int = 0, completionRatio: Ratio = Ratio.ZERO, solvedRatio: Ratio = Ratio.ZERO)

Types

Link copied to clipboard
object Companion

Key holder for AgentRunStatsMetric.

Properties

Link copied to clipboard

Agent runs that completed (regardless of whether they solved).

Link copied to clipboard
Link copied to clipboard
val failedRuns: Int = 0

Agent runs that ended in failure.

Link copied to clipboard
@Transient
open override val key: MetricKey<AgentRunStatsMetric>

The key that identifies this metric in a ai.koog.agents.optimization.training.metrics.MetricsMap.

Link copied to clipboard
Link copied to clipboard
val solvedRuns: Int = 0

Agent runs that completed with solved == true.

Link copied to clipboard
val totalRuns: Int = 0

Total number of agent runs found recursively under the stage.

Functions

Link copied to clipboard
open override fun recompute(currentStage: StageRecord, substages: List<TrainingRecord>, isStageUpdate: Boolean): AgentRunStatsMetric

Recompute this metric from the full list of substages records.