Skip to content

WorkflowCheckpointRecord

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Represents a single checkpoint of a workflow run.

public sealed record WorkflowCheckpointRecord : IEquatable<WorkflowCheckpointRecord>

objectWorkflowCheckpointRecord

IEquatable<WorkflowCheckpointRecord>

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

WorkflowCheckpointRecord.State is an opaque payload. Its content belongs to Microsoft Agent Framework and is polymorphic: it carries a $type discriminator, and that discriminator must be the first property of the object it appears in. Measured: a 7.5 KB checkpoint really does have the {"$type":0,...} discriminator first.

For this reason the value is stored in a PostgreSQL json column, not a jsonb column: jsonb reorders keys and would move the discriminator out of first place.

public WorkflowCheckpointRecord()

Gets the checkpoint identifier. The value belongs to AgentPrism, not to Microsoft Agent Framework: CreateAsync generates it and hands it back to MAF.

public required string CheckpointId { get; init; }

string

Gets the creation time (UTC).

public required DateTimeOffset CreatedAt { get; init; }

DateTimeOffset

Gets the record identifier. A time-ordered UUID (v7).

public required Guid Id { get; init; }

Guid

Gets the identifier of the previous checkpoint. null for the first checkpoint.

public string? ParentCheckpointId { get; init; }

string?

Gets the identifier of the run that produced this checkpoint. null if no run was in progress when the checkpoint was written.

public Guid? RunId { get; init; }

Guid?

Gets the identifier of the run session. Microsoft Agent Framework groups checkpoints under this value.

public required string SessionId { get; init; }

string

Gets the opaque run state.

public required JsonElement State { get; init; }

JsonElement

Gets the tenant the record belongs to.

public required string TenantId { get; init; }

string

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(WorkflowCheckpointRecord? other)

other WorkflowCheckpointRecord?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(WorkflowCheckpointRecord?, WorkflowCheckpointRecord?)

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

left WorkflowCheckpointRecord?

right WorkflowCheckpointRecord?

bool

operator !=(WorkflowCheckpointRecord?, WorkflowCheckpointRecord?)

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

left WorkflowCheckpointRecord?

right WorkflowCheckpointRecord?

bool