Skip to content

AgentRunRequest

Namespace AgentPrism · Assembly AgentPrism.AspNetCore.dll

Request for a trial run made from the UI.

public sealed record AgentRunRequest : IEquatable<AgentRunRequest>

objectAgentRunRequest

IEquatable<AgentRunRequest>

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.

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

public string? Message { get; init; }

string?

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