Skip to content

RunStartInfo

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Everything needed to open a new run.

public sealed record RunStartInfo : IEquatable<RunStartInfo>

objectRunStartInfo

IEquatable<RunStartInfo>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

public RunStartInfo()

Gets the name of the agent that runs. For workflow runs the workflow name is written instead; the reason is on RunRecord.AgentName.

public required string AgentName { get; init; }

string

Gets the definition version this run measured, or null when unknown.

public int? AgentVersion { get; init; }

int?

Gets the depth in the tree. The root run is 0.

public int Depth { get; init; }

int

Gets the experiment this run belongs to, or null outside an experiment.

public Guid? ExperimentId { get; init; }

Guid?

Gets whether the run streams.

public bool IsStreaming { get; init; }

bool

Gets whether this row records an agent or a workflow.

public RunKind Kind { get; init; }

RunKind

Gets the labels of the run, resolved from IRunAttributionContext, or null when there are none.

public IReadOnlyDictionary<string, string>? Labels { get; init; }

IReadOnlyDictionary<string, string>?

Gets the model to use, resolved from the agent definition, or null when it is unknown.

public string? ModelId { get; init; }

string?

Gets the id of the run that started this one, or null at the root.

public Guid? ParentRunId { get; init; }

Guid?

Gets the source run id when this run is a replay, or null for a normal run.

public Guid? ReplayOfRunId { get; init; }

Guid?

Gets the id of the run at the root of the tree, or null at the root.

public Guid? RootRunId { get; init; }

Guid?

Gets the run id. The caller produces it, so it knows the id straight away.

public required Guid RunId { get; init; }

Guid

Gets the session id.

public string? SessionId { get; init; }

string?

Gets the start time (UTC).

public required DateTimeOffset StartedAt { get; init; }

DateTimeOffset

Gets the initial status of the opened row. Defaults to RunStatus.Running.

public RunStatus Status { get; init; }

RunStatus

A queued run opens as RunStatus.Queued. When StartRunAsync is called a SECOND time with the same RunStartInfo.RunId — once the worker actually runs the job — the store treats it as an upsert: no new row is opened, the existing row is updated with this field, normally to RunStatus.Running.

Gets the tenant id.

public string? TenantId { get; init; }

string?

Gets the user the run belongs to, resolved from IRunAttributionContext, or null when it is unknown.

public string? UserId { get; init; }

string?

The value never comes from the request body. See IRunAttributionContext.UserId.

Gets the experiment variant this run was assigned to, or null outside an experiment.

public string? Variant { get; init; }

string?

Gets the name of the workflow, or null for agent runs.

public string? WorkflowName { get; init; }

string?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(RunStartInfo? other)

other RunStartInfo?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(RunStartInfo?, RunStartInfo?)

Section titled “ operator ==(RunStartInfo?, RunStartInfo?)”
public static bool operator ==(RunStartInfo? left, RunStartInfo? right)

left RunStartInfo?

right RunStartInfo?

bool

operator !=(RunStartInfo?, RunStartInfo?)

Section titled “ operator !=(RunStartInfo?, RunStartInfo?)”
public static bool operator !=(RunStartInfo? left, RunStartInfo? right)

left RunStartInfo?

right RunStartInfo?

bool