# WorkflowRunRequest

> 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.workflowrunrequest/
> Summary: WorkflowRunRequest: The information needed to run a workflow.

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

The information needed to run a workflow.

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

```csharp
public WorkflowRunRequest()
```

## Properties

### <a id="Tracon_WorkflowRunRequest_DefinitionVersion"></a> DefinitionVersion

The version of the workflow's stored definition to run.
[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) (the default) runs the current definition.

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

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

The same rule as [WorkflowResumeRequest.DefinitionVersion](/api/tracon.workflowresumerequest/#Tracon_WorkflowResumeRequest_DefinitionVersion): the run compiles
that version and records it on its row, so a later resume or response uses it too. A
version the workflow does not have fails the run (its row opens, closes
[RunStatus.Failed](/api/tracon.runstatus/), and no model is called); the run never falls back to the
current definition. A workflow defined in code has no versions and ignores the value.

The HTTP API does not set it. Recovery sets it: a queued run that is started again
because the interrupted attempt wrote no checkpoint names the version that attempt
recorded, so an edit made while the job waited does not change what runs.

### <a id="Tracon_WorkflowRunRequest_Message"></a> Message

The user message to feed into the graph.

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

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

Values for the parameters the workflow declares
([WorkflowDefinition.Parameters](/api/tracon.workflowdefinition/#Tracon_WorkflowDefinition_Parameters)), by name.

```csharp
public IReadOnlyDictionary<string, string>? Parameters { 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)\>?

#### Remarks

The runner validates them against the workflow's schema and fails the
run before the first model call when a required value is missing, a name
is not declared, a value is over the configured `MaxParameterValueLength`,
or a participant agent needs a required parameter the workflow cannot
supply. The HTTP endpoint checks the same rules first only to answer
`400` before the stream opens; this runner is the authority, so a
caller that skips HTTP gets the same refusal.

The final values (these, with the schema defaults applied) are recorded
with the run, and a resume or a response to the run uses them again.

### <a id="Tracon_WorkflowRunRequest_RunId"></a> RunId

The run identifier. If given, the record is opened with this
identifier; a streaming endpoint uses this to know the identifier
before writing the first frame.

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

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

The execution session's identifier. Generated if left empty.

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

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

The value **comes from the client and is untrusted input**.
Since checkpoints are grouped under this value, using it without
validation means access to another execution's state.

### <a id="Tracon_WorkflowRunRequest_WorkflowName"></a> WorkflowName

The name of the workflow to run.

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

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

### <a id="Tracon_WorkflowRunRequest_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_WorkflowRunRequest_Equals_Tracon_WorkflowRunRequest_"></a> Equals\(WorkflowRunRequest?\)

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

`other` [WorkflowRunRequest](/api/tracon.workflowrunrequest/)?

#### Returns

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

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

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

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

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

### <a id="Tracon_WorkflowRunRequest_op_Equality_Tracon_WorkflowRunRequest_Tracon_WorkflowRunRequest_"></a> operator ==\(WorkflowRunRequest?, WorkflowRunRequest?\)

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

`left` [WorkflowRunRequest](/api/tracon.workflowrunrequest/)?

`right` [WorkflowRunRequest](/api/tracon.workflowrunrequest/)?

#### Returns

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

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

`left` [WorkflowRunRequest](/api/tracon.workflowrunrequest/)?

`right` [WorkflowRunRequest](/api/tracon.workflowrunrequest/)?

#### Returns

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