# AgentRunRequest

> 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.agentrunrequest/
> Summary: AgentRunRequest: Request for a trial run made from the UI.

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

Request for a trial run made from the UI.

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

```csharp
public AgentRunRequest()
```

## Properties

### <a id="Tracon_AgentRunRequest_Approvals"></a> Approvals

Approval decisions for pending tool calls.

```csharp
public IReadOnlyList<ToolApprovalDecision> Approvals { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[ToolApprovalDecision](/api/tracon.toolapprovaldecision/)\>

#### Remarks

Approval is **the input to the next turn**: Microsoft
Agent Framework returns a pending call as
`ToolApprovalRequestContent` in the response, and the decision is
expected in the messages of the next run. There is therefore no
separate "continue" endpoint.

Decisions are processed only when [AgentRunRequest.SessionId](/api/tracon.agentrunrequest/#Tracon_AgentRunRequest_SessionId) is given: the
pending request lives in the session history and cannot be found in a
sessionless run.

### <a id="Tracon_AgentRunRequest_AttachmentIds"></a> AttachmentIds

Identifiers of attachments previously uploaded via `POST /api/attachments`.

```csharp
public IReadOnlyList<Guid> AttachmentIds { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[Guid](https://learn.microsoft.com/dotnet/api/system.guid)\>

#### Remarks

Each identifier must belong to the calling tenant; otherwise the
request is rejected with `400`. Binary content is not carried in
the message, only a small reference
(`AI.UriContent`) is added.

### <a id="Tracon_AgentRunRequest_Culture"></a> Culture

The culture to resolve the agent's instructions with (see
`AgentDefinition.InstructionsByCulture`). [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) uses the
agent's default instructions.

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

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

Read only from this field. The `Accept-Language` HTTP header is
deliberately **not** consulted: a browser header silently
changing the content sent to the model would be a surprise, and it
conflicts with's line that server-facing content is not
translated from ambient request state.

### <a id="Tracon_AgentRunRequest_Documents"></a> Documents

Reference text attached to this run, kept apart from the agent's instructions.

```csharp
public IReadOnlyList<AgentRunDocument> Documents { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[AgentRunDocument](/api/tracon.agentrundocument/)\>

#### Remarks

This is a convention and an audit trail, not a security guarantee -
see [AgentRunDocument](/api/tracon.agentrundocument/).

### <a id="Tracon_AgentRunRequest_InputResponses"></a> InputResponses

Answers to requests for user input that a tool raised in the previous turn (MCP elicitation).

```csharp
public IReadOnlyList<ToolInputResponse> InputResponses { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[ToolInputResponse](/api/tracon.toolinputresponse/)\>

#### Remarks

An MCP server can ask the user for information, or for confirmation, in the middle of a tool call.
The run ends in `AwaitingInput` and its response carries the request (the streaming response
sends an `inputs` frame right before `done`); the answer is **the next turn's
input**, the same pattern [AgentRunRequest.Approvals](/api/tracon.agentrunrequest/#Tracon_AgentRunRequest_Approvals) and [AgentRunRequest.ToolResults](/api/tracon.agentrunrequest/#Tracon_AgentRunRequest_ToolResults) use. There is
no separate "continue" endpoint. The tool call runs again from its start with the answer, so a server
must be able to be asked the same call twice.

Answers are processed only when [AgentRunRequest.SessionId](/api/tracon.agentrunrequest/#Tracon_AgentRunRequest_SessionId) is given: the pending request lives in the
session history and cannot be found in a sessionless run. An answer whose `requestId` is not a
pending request of the session, and one whose `content` does not fit the requested fields, are
rejected with `400` before the run starts; a request that was answered already is rejected with `409`.

### <a id="Tracon_AgentRunRequest_Lane"></a> Lane

The lane a queued run (`Prefer: respond-async`) is queued under.
See `JobLanes`. Ignored for a synchronous run — nothing is
queued. Left empty, the run uses `JobLanes.Default` (or whatever
`TraconSchedulingOptions.LaneByHandlerKey` maps
`JobHandlerKeys.AgentRun` to).

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

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

User message. May be left empty only if [AgentRunRequest.Approvals](/api/tracon.agentrunrequest/#Tracon_AgentRunRequest_Approvals) is sent.

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

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

Values for the target agent's [AgentDefinition.Parameters](/api/tracon.agentdefinition/#Tracon_AgentDefinition_Parameters) schema.

```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

A value for a name the schema does not declare is rejected, not
silently dropped - a typo in a parameter name would otherwise
disappear without a trace. A required parameter missing both a value
here and a default in the schema keeps the run from starting at all.

A queued run (`Prefer: respond-async`) carries them too: they are
checked here against the schema of the version the worker will run,
travel in the job's payload, and are checked again where the run executes.
Note that the job payload is not a protected column: the values are
stored there in plain form, beside the message text.

The run records the values it was bound with, defaults included. A replay
and a continuation repeat them.

### <a id="Tracon_AgentRunRequest_SessionId"></a> SessionId

Session identifier. If not given, the run is sessionless and no history
is carried.

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

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

Results of client-side tool calls.

```csharp
public IReadOnlyList<ClientToolResult> ToolResults { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[ClientToolResult](/api/tracon.clienttoolresult/)\>

#### Remarks

A client-side tool (`AddClientTool`) is registered as a
declaration only; the server never runs it. It produces a pending
call the model is waiting on, and the result is **the next
turn's input** — the same pattern [AgentRunRequest.Approvals](/api/tracon.agentrunrequest/#Tracon_AgentRunRequest_Approvals)
uses for `ToolApprovalRequestContent`. There is no separate
"continue" endpoint.

Results are processed only when [AgentRunRequest.SessionId](/api/tracon.agentrunrequest/#Tracon_AgentRunRequest_SessionId) is given: the
pending call lives in the session history and cannot be found in a
sessionless run.

## Methods

### <a id="Tracon_AgentRunRequest_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_AgentRunRequest_Equals_Tracon_AgentRunRequest_"></a> Equals\(AgentRunRequest?\)

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

`other` [AgentRunRequest](/api/tracon.agentrunrequest/)?

#### Returns

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

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

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

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

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

### <a id="Tracon_AgentRunRequest_op_Equality_Tracon_AgentRunRequest_Tracon_AgentRunRequest_"></a> operator ==\(AgentRunRequest?, AgentRunRequest?\)

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

`left` [AgentRunRequest](/api/tracon.agentrunrequest/)?

`right` [AgentRunRequest](/api/tracon.agentrunrequest/)?

#### Returns

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

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

`left` [AgentRunRequest](/api/tracon.agentrunrequest/)?

`right` [AgentRunRequest](/api/tracon.agentrunrequest/)?

#### Returns

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