# RunStartInfo

> 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.runstartinfo/
> Summary: RunStartInfo: Everything needed to open a new run.

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

Everything needed to open a new run.

```csharp
public sealed record RunStartInfo : IEquatable<RunStartInfo>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.runstartinfo/">RunStartInfo</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;RunStartInfo&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>

## Constructors

### <a id="Tracon_RunStartInfo__ctor"></a> RunStartInfo\(\)

```csharp
public RunStartInfo()
```

## Properties

### <a id="Tracon_RunStartInfo_AgentName"></a> AgentName

Gets the name of the agent that runs. For workflow runs the workflow name
is written instead; the reason is on [RunRecord.AgentName](/api/tracon.runrecord/#Tracon_RunRecord_AgentName).

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

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

Gets the definition version this run measured, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when unknown.

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

 [int](https://learn.microsoft.com/dotnet/api/system.int32)?

### <a id="Tracon_RunStartInfo_ContinuedFromRunId"></a> ContinuedFromRunId

Gets the id of the run this one continues after an interruption or a resume, or
[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for a run that is not a continuation.

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

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

Like [RunStartInfo.UserId](/api/tracon.runstartinfo/#Tracon_RunStartInfo_UserId) and [RunStartInfo.Labels](/api/tracon.runstartinfo/#Tracon_RunStartInfo_Labels), the link survives a
second `StartRunAsync` with the same [RunStartInfo.RunId](/api/tracon.runstartinfo/#Tracon_RunStartInfo_RunId) that carries
none: the store keeps the value the first write stored. The party that
opens a continuation writes its row first, with the link; the engine that
runs it then writes the row again and does not know the link.

### <a id="Tracon_RunStartInfo_Depth"></a> Depth

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

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

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

Gets the experiment this run belongs to, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) outside an experiment.

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

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

Gets whether the run streams.

```csharp
public bool IsStreaming { get; init; }
```

#### Property Value

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

Gets whether this row records an agent or a workflow.

```csharp
public RunKind Kind { get; init; }
```

#### Property Value

 [RunKind](/api/tracon.runkind/)

### <a id="Tracon_RunStartInfo_Labels"></a> Labels

Gets the labels of the run, resolved from
[IRunAttributionContext](/api/tracon.irunattributioncontext/), or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when
there are none.

```csharp
public IReadOnlyDictionary<string, string>? Labels { get; init; }
```

#### Property Value

 [IReadOnlyDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [string](https://learn.microsoft.com/dotnet/api/system.string)\>?

### <a id="Tracon_RunStartInfo_ModelId"></a> ModelId

Gets the model to use, resolved from the agent definition, or
[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when it is unknown.

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

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

Gets the provider of `ModelId`, resolved from the agent's
primary `ModelBinding`, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when it is
unknown.

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

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

Gets the id of the run that started this one, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) at the root.

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

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

Gets the source run id when this run is a replay, or
[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for a normal run.

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

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

Gets the id of the run at the root of the tree, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) at the root.

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

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

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

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

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

Gets the session id.

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

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

Gets the start time (UTC).

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

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

Gets the initial status of the opened row. Defaults to [RunStatus.Running](/api/tracon.runstatus/).

```csharp
public RunStatus Status { get; init; }
```

#### Property Value

 [RunStatus](/api/tracon.runstatus/)

#### Remarks

A queued run opens as [RunStatus.Queued](/api/tracon.runstatus/). When
`StartRunAsync` is called a SECOND time with the same
[RunStartInfo.RunId](/api/tracon.runstartinfo/#Tracon_RunStartInfo_RunId) — once the worker actually runs the job, or once a workflow run that
waited in its process for a concurrency slot has its slots — the store
treats it as an upsert: no new row is opened, the existing row is updated
with this field, normally to [RunStatus.Running](/api/tracon.runstatus/).

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

Gets the tenant id.

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

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

Gets the user the run belongs to, resolved from
[IRunAttributionContext](/api/tracon.irunattributioncontext/), or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when it
is unknown.

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

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

The value never comes from the request body. See
[IRunAttributionContext.UserId](/api/tracon.irunattributioncontext/#Tracon_IRunAttributionContext_UserId).

### <a id="Tracon_RunStartInfo_Variant"></a> Variant

Gets the experiment variant this run was assigned to, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) outside an experiment.

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

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

Gets the name of the workflow, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for agent runs.

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

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

### <a id="Tracon_RunStartInfo_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_RunStartInfo_Equals_Tracon_RunStartInfo_"></a> Equals\(RunStartInfo?\)

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

`other` [RunStartInfo](/api/tracon.runstartinfo/)?

#### Returns

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

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

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

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

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

### <a id="Tracon_RunStartInfo_op_Equality_Tracon_RunStartInfo_Tracon_RunStartInfo_"></a> operator ==\(RunStartInfo?, RunStartInfo?\)

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

`left` [RunStartInfo](/api/tracon.runstartinfo/)?

`right` [RunStartInfo](/api/tracon.runstartinfo/)?

#### Returns

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

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

`left` [RunStartInfo](/api/tracon.runstartinfo/)?

`right` [RunStartInfo](/api/tracon.runstartinfo/)?

#### Returns

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