# WorkflowCheckpointRecord

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.workflowcheckpointrecord/
> Summary: WorkflowCheckpointRecord: Represents a single checkpoint of a workflow run.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

Represents a single checkpoint of a workflow run.

```csharp
public sealed record WorkflowCheckpointRecord : IEquatable<WorkflowCheckpointRecord>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.workflowcheckpointrecord/">WorkflowCheckpointRecord</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;WorkflowCheckpointRecord&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

[WorkflowCheckpointRecord.State](/api/tracon.workflowcheckpointrecord/#Tracon_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.

## Constructors

### <a id="Tracon_WorkflowCheckpointRecord__ctor"></a> WorkflowCheckpointRecord\(\)

```csharp
public WorkflowCheckpointRecord()
```

## Properties

### <a id="Tracon_WorkflowCheckpointRecord_CheckpointId"></a> CheckpointId

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

```csharp
public required string CheckpointId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_WorkflowCheckpointRecord_CreatedAt"></a> CreatedAt

Gets the creation time (UTC).

```csharp
public required DateTimeOffset CreatedAt { get; init; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)

### <a id="Tracon_WorkflowCheckpointRecord_Id"></a> Id

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

```csharp
public required Guid Id { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

### <a id="Tracon_WorkflowCheckpointRecord_ParentCheckpointId"></a> ParentCheckpointId

Gets the identifier of the previous checkpoint. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for the first checkpoint.

```csharp
public string? ParentCheckpointId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_WorkflowCheckpointRecord_RunId"></a> RunId

Gets the identifier of the run that produced this checkpoint.
[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if no run was in progress when the checkpoint
was written.

```csharp
public Guid? RunId { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)?

### <a id="Tracon_WorkflowCheckpointRecord_SessionId"></a> SessionId

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

```csharp
public required string SessionId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_WorkflowCheckpointRecord_State"></a> State

Gets the opaque run state.

```csharp
public required JsonElement State { get; init; }
```

#### Property Value

 [JsonElement](https://learn.microsoft.com/dotnet/api/system.text.json.jsonelement)

### <a id="Tracon_WorkflowCheckpointRecord_StateMafVersion"></a> StateMafVersion

Gets the Microsoft Agent Framework package version that produced
`State`.

```csharp
public string? StateMafVersion { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

#### Remarks

[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) means the row was written before this field
existed. Tracon does not promise that a checkpoint written by one
Microsoft Agent Framework version can be resumed by a different one;
this value lets a failed resume report exactly which version wrote
the state instead of guessing.

### <a id="Tracon_WorkflowCheckpointRecord_StateSchemaVersion"></a> StateSchemaVersion

Gets the Tracon schema generation that wrote `State`.

```csharp
public int? StateSchemaVersion { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)?

#### Remarks

[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) means the row was written before this field
existed — unlike `SessionRecord.StateSchemaVersion`,
checkpoints had no envelope stamp before this field was added.

### <a id="Tracon_WorkflowCheckpointRecord_TenantId"></a> TenantId

Gets the tenant the record belongs to.

```csharp
public required string TenantId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Methods

### <a id="Tracon_WorkflowCheckpointRecord_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_WorkflowCheckpointRecord_Equals_Tracon_WorkflowCheckpointRecord_"></a> Equals\(WorkflowCheckpointRecord?\)

```csharp
public bool Equals(WorkflowCheckpointRecord? other)
```

#### Parameters

`other` [WorkflowCheckpointRecord](/api/tracon.workflowcheckpointrecord/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_WorkflowCheckpointRecord_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_WorkflowCheckpointRecord_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_WorkflowCheckpointRecord_op_Equality_Tracon_WorkflowCheckpointRecord_Tracon_WorkflowCheckpointRecord_"></a> operator ==\(WorkflowCheckpointRecord?, WorkflowCheckpointRecord?\)

```csharp
public static bool operator ==(WorkflowCheckpointRecord? left, WorkflowCheckpointRecord? right)
```

#### Parameters

`left` [WorkflowCheckpointRecord](/api/tracon.workflowcheckpointrecord/)?

`right` [WorkflowCheckpointRecord](/api/tracon.workflowcheckpointrecord/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_WorkflowCheckpointRecord_op_Inequality_Tracon_WorkflowCheckpointRecord_Tracon_WorkflowCheckpointRecord_"></a> operator \!=\(WorkflowCheckpointRecord?, WorkflowCheckpointRecord?\)

```csharp
public static bool operator !=(WorkflowCheckpointRecord? left, WorkflowCheckpointRecord? right)
```

#### Parameters

`left` [WorkflowCheckpointRecord](/api/tracon.workflowcheckpointrecord/)?

`right` [WorkflowCheckpointRecord](/api/tracon.workflowcheckpointrecord/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
