MentorAgent Docs
Menu

ReferencePackage: Novior.MentorAgent.Abstractions

MentorActionDecision record

The MentorActionDecision record of Novior.MentorAgent.Abstractions.Models: One decision of MentorAgent's tool gate, as IMentorActionObserver receives it…

View as Markdown
On this page

One decision of MentorAgent's tool gate, as IMentorActionObserver receives it. MentorActionDecision.ToolName and MentorActionDecision.DisplayName mean what they mean on MentorActionStarted. The call's arguments are never part of it. More properties may be added.

Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.

public sealed record MentorActionDecision : IEquatable<MentorActionDecision>

Terminal
dotnet add package Novior.MentorAgent.Abstractions

public MentorActionDecision()

public MentorAgentKind? AgentKind { get; init; }

Which kind of agent asked for the action, or null on the MCP server, where the caller names the tool itself.

public string? AgentName { get; init; }

The name of the agent that asked for the action, when it has one.

public string? CallId { get; init; }

The model's id for the call; on the MCP server, the id of the JSON-RPC request.

public Guid? ConfirmationId { get; init; }

The ConfirmationRequest.ActionId of the confirmation, on the decisions that belong to one: it links MentorActionOutcome.ConfirmationRequested to the answer.

public ClaimsPrincipal? ConfirmedBy { get; init; }

On MentorActionOutcome.Confirmed, who confirmed: the caller of POST /mentor/approve; in a circuit, in the MAUI app and through the hub's RespondToApproval, the session's signed-in user.

public string? Detail { get; init; }

The application's own words for the decision: the reason an IMentorActionPolicy gave for stopping the call or asking for a confirmation, on MentorActionOutcome.Blocked, MentorActionOutcome.ConfirmationRequested and MentorActionOutcome.Denied (MentorActionReasons.NobodyToConfirm). null otherwise.

public required string DisplayName { get; init; }

The text shown to the user for the tool: the one IMentorStateService.OnActionExecuting carries.

public string? ExceptionType { get; init; }

On MentorActionOutcome.Failed and MentorActionOutcome.PolicyFailed, the full name of the exception's type. Never its message.

public required MentorActionOutcome Outcome { get; init; }

What the gate decided.

public required string ReasonCode { get; init; }

Why, as a code that stays the same from one version to the next: one of the constants of MentorActionReasons.

public IReadOnlyList<string> RequiredRoles { get; init; }

The roles the action requires, any one of which is enough; empty when it requires none.

public string? SessionId { get; init; }

An opaque id of the session the turn runs in — the circuit, the MAUI app's scope, the hub connection, the /mentor/chat request, the A2A task — the same for every decision taken in it. On the MCP server, a fingerprint of the MCP session id, never the id itself; null when the call has no session.

public required MentorActionSurface Surface { get; init; }

Where the call came from.

public required DateTimeOffset Timestamp { get; init; }

When the gate decided, in UTC.

public required string ToolName { get; init; }

The tool's technical name, as the model or the MCP client called it (for example cancel_order).

public string? TurnId { get; init; }

An opaque id of the user turn, new for every message: every call the model makes while answering it has the same one. null on the MCP server, where there is no turn.

public ClaimsPrincipal? User { get; init; }

Who asked for the action, or null when nobody is signed in.