PromptExecutionRecord

Records the outcome of a single prompt execution (possibly across retries). Leaf record — no substages.

Inheritors

Types

Link copied to clipboard
@SerialName(value = "Prompt execution: completed")
@Serializable
data class Completed(val promptName: String, val elapsedTime: Duration, val consumption: LLMConsumptionOrNA, val actionLog: JsonElement? = null, val previousAttempts: List<FailedAttempt> = emptyList()) : PromptExecutionRecord

Prompt execution completed successfully.

Link copied to clipboard
@SerialName(value = "Prompt execution: failed")
@Serializable
data class Failed(val promptName: String, val failure: AnalyzedFailure, val elapsedTime: Duration, val consumption: LLMConsumptionOrNA, val previousAttempts: List<FailedAttempt> = emptyList()) : PromptExecutionRecord

Prompt execution failed (exception thrown).

Properties

Link copied to clipboard
abstract override val consumption: LLMConsumptionOrNA

LLM consumption attributable to the final attempt. For an aggregate, see aggregatedConsumption.

Link copied to clipboard
abstract override val elapsedTime: Duration

Wall-clock elapsed time of the final attempt. For an aggregate, see aggregatedElapsedTime.

Link copied to clipboard
abstract override val previousAttempts: List<FailedAttempt>

Failed attempts preceding the final attempt; empty if no retries were performed. Order matches execution order.

Link copied to clipboard
abstract val promptName: String

Name of the executed prompt.

Functions

Link copied to clipboard

Final attempt + retry attempts. Returns NA only if every contributing value is NA.

Link copied to clipboard

Final attempt + retry attempts + retry wait delays.

Link copied to clipboard

Get the consumption of any record.

Link copied to clipboard

Retry attempts only (excludes the final attempt). NA if all retries had NA consumption.

Link copied to clipboard

Retry-attempt elapsed + retry wait delays (excludes the final attempt).

Link copied to clipboard

Check if a record (or its substages recursively) contains any solved agent run.