RunRecord
AgentPrism.Abstractions.dllSummary of a run. It acts as the header of the event stream.
public sealed record RunRecord : IEquatable<RunRecord>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”RunRecord()
Section titled “ RunRecord()”public RunRecord()Properties
Section titled “Properties”AgentName
Section titled “ AgentName”Gets the name of the agent that ran. For workflow runs this is the workflow name: the existing lists, statistics and user interface read this column, and leaving it empty would show workflow rows without a name.
public required string AgentName { get; init; }Property Value
Section titled “Property Value”AgentVersion
Section titled “ AgentVersion”Gets the definition version this run measured, or null when unknown.
public int? AgentVersion { get; init; }Property Value
Section titled “Property Value”int?
ChildRunCount
Section titled “ ChildRunCount”Gets the number of direct child runs.
public int ChildRunCount { get; init; }Property Value
Section titled “Property Value”CompletedAt
Section titled “ CompletedAt”Gets the completion time (UTC), or null while the run is in flight.
public DateTimeOffset? CompletedAt { get; init; }Property Value
Section titled “Property Value”Gets the run’s own cost. null when the model is unknown; when the model is known the value is populated even if the price is not.
public RunCost? Cost { get; init; }Property Value
Section titled “Property Value”Gets the depth in the tree. The root run is 0.
public int Depth { get; init; }Property Value
Section titled “Property Value”Gets the error information. Populated only for RunStatus.Failed.
public RunError? Error { get; init; }Property Value
Section titled “Property Value”EventCount
Section titled “ EventCount”Gets the number of events written for this run.
public long EventCount { get; init; }Property Value
Section titled “Property Value”ExperimentId
Section titled “ ExperimentId”Gets the experiment this run belongs to, or null outside an experiment.
public Guid? ExperimentId { get; init; }Property Value
Section titled “Property Value”Guid?
Gets the run id. A time-ordered UUID (v7).
public required Guid Id { get; init; }Property Value
Section titled “Property Value”IsStreaming
Section titled “ IsStreaming”Gets whether the run streamed.
public bool IsStreaming { get; init; }Property Value
Section titled “Property Value”Gets whether this row records an agent or a workflow.
public RunKind Kind { get; init; }Property Value
Section titled “Property Value”Labels
Section titled “ Labels”Gets the labels the run carries, or null when it carries none.
public IReadOnlyDictionary<string, string>? Labels { get; init; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, string>?
Remarks
Section titled “Remarks”A query dimension only. Labels never become metric tags — see IRunAttributionContext.Labels.
ModelId
Section titled “ ModelId”Gets the model used by the run. Cost and per-model reports need it. It is null when the agent definition carries no model.
public string? ModelId { get; init; }Property Value
Section titled “Property Value”ParentRunId
Section titled “ ParentRunId”Gets the id of the run that started this one, or null for a root run.
public Guid? ParentRunId { get; init; }Property Value
Section titled “Property Value”Guid?
ReplayOfRunId
Section titled “ ReplayOfRunId”Gets the source run id when this run is a replay, otherwise null.
public Guid? ReplayOfRunId { get; init; }Property Value
Section titled “Property Value”Guid?
Remarks
Section titled “Remarks”The lineage is one-way: the source run is immutable and does not know which runs replay it. Every replay of a source is found through this column.
RootRunId
Section titled “ RootRunId”Gets the id of the run at the root of the tree. null for a root run and always populated for a child run.
public Guid? RootRunId { get; init; }Property Value
Section titled “Property Value”Guid?
Remarks
Section titled “Remarks”Denormalized on purpose: a whole tree is fetched with a single indexed query on this column, with no recursive CTE over RunRecord.ParentRunId.
SessionId
Section titled “ SessionId”Gets the id of the session that was used.
public string? SessionId { get; init; }Property Value
Section titled “Property Value”StartedAt
Section titled “ StartedAt”Gets the start time (UTC).
public required DateTimeOffset StartedAt { get; init; }Property Value
Section titled “Property Value”Status
Section titled “ Status”Gets the current status of the run.
public required RunStatus Status { get; init; }Property Value
Section titled “Property Value”TenantId
Section titled “ TenantId”Gets the tenant the run belongs to.
public string? TenantId { get; init; }Property Value
Section titled “Property Value”TreeCost
Section titled “ TreeCost”Gets the total cost of this run and every run below it.
public RunTreeCost? TreeCost { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”This must not be added to RunRecord.Cost: the value already includes the run’s own cost, for the same reason as RunRecord.TreeUsage. For a run without children the two are equivalent.
TreeUsage
Section titled “ TreeUsage”Gets the total token usage of this run and every run below it.
public RunUsage? TreeUsage { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”This must not be added to RunRecord.Usage: the value already includes RunRecord.Usage. For a run without children the two are equal. The user interface shows them in separate columns, because “what did this run spend” and “what did this request spend in total” are different questions.
Gets the token usage, or null when the provider reported none.
public RunUsage? Usage { get; init; }Property Value
Section titled “Property Value”UserId
Section titled “ UserId”Gets the user the run belongs to, or null when it was not known.
public string? UserId { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The value is opaque and comes from IRunAttributionContext, never from the request body. Rows written before the column existed hold null; they are not backfilled.
Variant
Section titled “ Variant”Gets the experiment variant this run was assigned to, or null outside an experiment.
public string? Variant { get; init; }Property Value
Section titled “Property Value”WorkflowName
Section titled “ WorkflowName”Gets the name of the workflow. Populated only on RunKind.Workflow rows.
public string? WorkflowName { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(RunRecord?)
Section titled “ Equals(RunRecord?)”public bool Equals(RunRecord? other)Parameters
Section titled “Parameters”other RunRecord?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(RunRecord?, RunRecord?)
Section titled “ operator ==(RunRecord?, RunRecord?)”public static bool operator ==(RunRecord? left, RunRecord? right)Parameters
Section titled “Parameters”left RunRecord?
right RunRecord?
Returns
Section titled “Returns”operator !=(RunRecord?, RunRecord?)
Section titled “ operator !=(RunRecord?, RunRecord?)”public static bool operator !=(RunRecord? left, RunRecord? right)Parameters
Section titled “Parameters”left RunRecord?
right RunRecord?