Skip to content
Tracon

AgentRunRequest

Namespace Tracon · Assembly Tracon.AspNetCore.dll

Request for a trial run made from the UI.

public sealed record AgentRunRequest : IEquatable<AgentRunRequest>
Inheritance
object ← AgentRunRequest
Implements
IEquatable<AgentRunRequest>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
public AgentRunRequest()

Approval decisions for pending tool calls.

public IReadOnlyList<ToolApprovalDecision> Approvals { get; init; }

IReadOnlyList<ToolApprovalDecision>

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 is given: the pending request lives in the session history and cannot be found in a sessionless run.

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

public IReadOnlyList<Guid> AttachmentIds { get; init; }

IReadOnlyList<Guid>

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.

The culture to resolve the agent’s instructions with (see AgentDefinition.InstructionsByCulture). null uses the agent’s default instructions.

public string? Culture { get; init; }

string?

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.

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

public IReadOnlyList<AgentRunDocument> Documents { get; init; }

IReadOnlyList<AgentRunDocument>

This is a convention and an audit trail, not a security guarantee - see AgentRunDocument.

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

public IReadOnlyList<ToolInputResponse> InputResponses { get; init; }

IReadOnlyList<ToolInputResponse>

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 and 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 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.

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).

public string? Lane { get; init; }

string?

User message. May be left empty only if AgentRunRequest.Approvals is sent.

public string? Message { get; init; }

string?

Values for the target agent’s AgentDefinition.Parameters schema.

public IReadOnlyDictionary<string, string>? Parameters { get; init; }

IReadOnlyDictionary<string, string>?

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.

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

public string? SessionId { get; init; }

string?

Results of client-side tool calls.

public IReadOnlyList<ClientToolResult> ToolResults { get; init; }

IReadOnlyList<ClientToolResult>

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 uses for ToolApprovalRequestContent. There is no separate “continue” endpoint.

Results are processed only when AgentRunRequest.SessionId is given: the pending call lives in the session history and cannot be found in a sessionless run.

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(AgentRunRequest? other)

other AgentRunRequest?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(AgentRunRequest?, AgentRunRequest?)

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

left AgentRunRequest?

right AgentRunRequest?

bool

operator !=(AgentRunRequest?, AgentRunRequest?)

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

left AgentRunRequest?

right AgentRunRequest?

bool