MentorAgent 1.4.0 release notes
What's new in MentorAgent 1.4.0: actions registered in code, commands and queries, endpoints as actions, teams from YAML, and UI actions through the gate.
On this page
MentorAgent 1.4.0 was published on NuGet on 18 November 2026 (UTC). It is a minor version: it adds new features and fixes one defect, with no intended break. Every package is checked against the public API of 1.3.1, so code built on 1.3.1 compiles unchanged.
Each package requires the MentorAgent packages that it depends on at exactly this version: upgrade all five together. MentorAgent 1.4.0 runs on .NET 10. To upgrade, see Upgrade from 1.3.1.
Highlights
Section titled “Highlights”- Actions registered in code. Make a method an action from
Program.cs, without an attribute on the class, with the same roles and confirmations. - Commands and queries as actions. A type and its handler become one action, named after the type.
- Endpoints as actions. A minimal API endpoint or a controller's action becomes an action that runs the endpoint itself, its authorization first.
- Candidates from your services. The public methods of the namespaces you name become actions that start off, until a governor turns them on.
- Teams that are not written in C#. Teams from a source of your own, or from
*.team.yamlfiles. - UI actions pass through the gate. Action policies and observers now see the actions of a page.
- An announced action is checked after a tool call too. A reply that claims an action none of the turn's tools did is caught.
New features
Section titled “New features”Actions registered in code
Section titled “Actions registered in code”Some classes cannot carry attributes: they come from a package, or the team that owns them does not want MentorAgent in them. options.Actions.Add registers one of their methods as an action of the coordinator, and declares what the attribute would declare:
builder.Services.AddScoped<StockActions>();
builder.Services.AddMentorAgent(options =>
{
options.ScanAssemblies = [typeof(Program).Assembly];
options.Actions
.Add<StockActions>(nameof(StockActions.CountLowStock),
action => action
.Describe("Counts the products low on stock")
.ReadOnly())
.Add<StockActions>(nameof(StockActions.Restock),
action => action
.Describe("Restocks a product")
.RequireRoles("Manager")
.RequireConfirmation());
});
// From a package: no MentorAgent attribute on it
public sealed class StockActions(StockStore store)
{
public int CountLowStock() => store.CountBelow(10);
public string Restock(int productId, int quantity) =>
store.Add(productId, quantity);
}The builder has Describe, Category, RequireConfirmation, ReadOnly, RequireRoles, Off, NavigateTo and Hint. A registered action is like a [MentorAction] method: its roles, its confirmation, the default confirmation for writes, the IMentorActionGovernor, /mcp and the A2A card apply to it the same way.
A mistake stops the application when it starts, and the message names the method:
- a method that is not there, or that is overloaded, static or generic;
- a registration without a description;
- a method registered twice, or that is already an action by its attributes.
Commands and queries as actions
Section titled “Commands and queries as actions”An application that already sends commands and queries to handlers can offer them to the model as they are. AddCommand and AddQuery register a type and its handler:
builder.Services.AddScoped<CancelOrderHandler>();
builder.Services.AddScoped<FindOrderHandler>();
builder.Services.AddMentorAgent(options =>
{
options.ScanAssemblies = [typeof(Program).Assembly];
options.Actions
.AddCommand<CancelOrder, CancelOrderHandler>(
action => action
.Describe("Cancels an order that has not shipped")
.RequireRoles("Manager"))
.AddQuery<FindOrder, FindOrderHandler>(
action => action.Describe("Reads one order"));
});
public sealed record CancelOrder(int OrderId, string Reason);
public sealed class CancelOrderHandler(OrderStore store)
: IMentorCommandHandler<CancelOrder>
{
public Task HandleAsync(CancelOrder command, CancellationToken ct)
=> store.CancelAsync(command.OrderId, command.Reason, ct);
}
public sealed record FindOrder(int OrderId);
public sealed class FindOrderHandler(OrderStore store)
: IMentorQueryHandler<FindOrder, OrderView?>
{
public Task<OrderView?> HandleAsync(
FindOrder query, CancellationToken ct)
=> Task.FromResult(store.Find(query.OrderId));
}The handlers implement IMentorCommandHandler<TCommand>, IMentorCommandHandler<TCommand, TResult> or IMentorQueryHandler<TQuery, TResult>, new in Novior.MentorAgent.Abstractions.
- The name and the parameters come from the type. The action is named after the type in snake case, and its parameters are the type's public properties.
Name(…)gives another name to any action registered in code. - A query reads, a command writes. A query is always read-only. A command is a write, so it asks for a confirmation unless you declare otherwise.
- The same rules apply. Roles, confirmations, the governor, the action policies,
/mcp, the A2A card and team members apply as to a method registered in code.
Endpoints as actions
Section titled “Endpoints as actions”In Novior.MentorAgent.Server, an endpoint that your application already has becomes an action without writing it again:
builder.Services.AddAuthorization(o => o.AddPolicy("Billing",
p => p.RequireRole("Billing")));
builder.Services.AddMentorAgentServer();
// after var app = builder.Build();
app.MapPost("/invoices/{id:int}/void",
(int id, VoidRequest body, InvoiceStore store) =>
store.Void(id, body.Reason))
.RequireAuthorization("Billing")
.WithMentorAction("void_invoice", action => action
.Describe("Voids an invoice that is not paid"));
public sealed record VoidRequest(string Reason);[MentorAction] on a controller's action does the same. The action runs the endpoint itself, in the process, as the user of the turn:
- The endpoint's own checks first. Its authorization, then its filters, its binding and its validation. The middleware before routing, such as rate limiting and CORS, does not run for these calls.
- The roles come from the endpoint's authorization.
[Authorize(Roles = …)],RequireRole, a policy by name or the fallback policy. The action is offered only to a user who holds one of them, and a user without them is refused before any confirmation. Roles declared on the action replace them. - The verb decides the confirmation.
GETandHEADread. The other verbs write, and ask for a confirmation by default. - The model fills in the request. It gives the route values, the query values and one JSON body. An answer of 400 or more is a failed action, with its status.
- Not published. These actions are not on
/mcpnor on the A2A card.
A declaration that the action cannot honour stops the application when it starts, and names the endpoint. The Server's README lists each message and its fix.
ScanAssemblies no longer reads controllers. Up to 1.3.1, a [MentorAction] on a controller's action called the method on an instance from the container, past the endpoint's [Authorize] and filters, and failed when the controller was not registered as a service. Now it runs the endpoint, with AddMentorAgentServer(): see Upgrade from 1.3.1. Which classes are controllers is read from the metadata of their attributes, without creating them: an attribute of your application whose constructor throws, or whose type does not load, does not stop it.
Candidates from your services
Section titled “Candidates from your services”With options.AutoMentor.Enabled and the namespaces of a perimeter in options.AutoMentor.Namespaces, the public methods of the services there become candidates: actions of the coordinator that start off and ask for a confirmation. A candidate is offered to no model until an IMentorActionGovernor turns it on, and nothing outside the perimeter becomes an action, whatever a governor says.
[MentorExclude], on a class or a method, keeps it out.- A candidate's description is the
<summary>of its XML documentation comment, read from the.xmlfile next to its assembly. - Its roles are those of its
[Authorize(Roles = …)].
The README of the repository explains the perimeter in «Candidates from your services».
Teams that are not written in C#
Section titled “Teams that are not written in C#”An IMentorTeamSource, registered with AddMentorTeamSource<T>(), gives teams as MentorTeamDefinitions, with the fields of [MentorTeam] and [TeamMember]. A member's tools are named as the session's actions, and an Approver is the member whose verdict ends the discussion. The source is asked each time a coordinator is built, and its teams join the coordinator as the ones written in C# do.
In Novior.MentorAgent.Declarative, every *.team.yaml file of the folder, and every TeamDefinitions entry, gives a team, checked as a source's team is. A file that does not hold is left out, with the line and the column of the fault. An unknown key or a key written twice is a fault, and a team file is never read as an agent.
What does not hold is left out with its reason, in the log and in IMentorAgentSourceObserver.OnTeamsLoaded, a new method with an empty default. The new reason codes are name-taken and no-members. A member's tools can be writes, of a source's team or of one written in C#: each keeps its roles and its confirmation, and passes the gate once.
UI actions pass through the gate
Section titled “UI actions pass through the gate”On Path A, the coordinator now calls a page's UI actions through the gate, like every other action. Up to 1.3.1 they ran in a loop of their own, which no policy and no observer saw. Now:
- the action policies and their before-action hook are asked about them, and decide whether they are offered;
IMentorActionObserverreceives their decisions, with the action's description asDisplayName;- they get a span, and Stop reaches them;
- after
navigate_to, the next request of the same turn offers the actions of the page now shown.
A UI action still asks for no confirmation and needs no role of its own, and the widget shows its start and end as before. MentorActionRequest.Kind and MentorActionDecision.Kind, Server or UI, tell a UI action from an action of the application, and MentorActionDecision.PageName names the page.
A model that keeps calling UI actions is now stopped by the cap of the run, as for your own actions: 40 calls in a turn, the default of the agent's function-invoking client. Up to 1.3.1 the loop of UI actions stopped at 10.
An announced action is checked after a tool call too
Section titled “An announced action is checked after a tool call too”A model could read a record and then write that it had taken it in charge, without calling the tool that does it. CheckAnnouncedActions skipped every turn with a call, so it did not see it. Now the check also runs after a turn that called tools, and the question names them: only an action that none of them did counts. A reply that reports what they did or returned is not one.
A turn that handed the request to a specialist, a team or a remote agent, used a hosted tool or waits for an approval is still not checked. On gpt-4.1, over 18 turns that read records, the check cost one more call of about 440 tokens (386 to 643) in each turn with a call, and 0.5 to 0.7 seconds after the reply had reached the user. No reply was flagged by mistake.
An application's own IChatClient that answers without a model, for example when a budget is spent, can now say so: it sets MentorChatKeys.ModelNotCalled in the AdditionalProperties of its response, and of each streaming update, with the cause as the value. A turn none of whose requests reached a model is not checked.
Other features
Section titled “Other features”- Where the actions come from.
IMentorActionCatalog.GetRegistrations()returns oneMentorActionRegistrationper origin and class: itsOrigin, itsSource, the actions it gives and what it left out, by the rule's name. The origins are inMentorActionOrigins:attribute,fluent,command,query,endpoint,candidateandpage. EveryMentorActionInfonames itsOriginand itsRegistrationId, andMentorActionInfo.Methodis the method the action runs, when there is one. A catalogue that you wrote yourself compiles as before. - The pages in the catalogue. After the registrations of the code,
GetRegistrations()has one registration per page that declared UI actions, with the names declared since the application started. Only names are kept, within the limits ofMentorPageActionLimits. - Skills from a console. Wrapped in
MentorPreferredSkillsSource, a source's skills replace the application's own of the same name. Wrapped inMentorLiveSkillsSource, a source is asked at every session, so a skill that it withdraws is gone for the next one. WithSkillsRefreshInterval, each source is now cached on its own. - The tenant in every decision.
MentorActionDecision.TenantIdnames the tenant of the call, so an observer of several tenants tells the same user in two of them apart. - The rules of actions.
ACTION-RULES.mdhas 47 new rules, in the areasfluent,endpoint,candidate,page,teamandskill, andscan.controllers-are-endpoints,scan.attributes-not-createdandpolicy.offered-to-agents. The rules are listed by name in the 1.4.0 section of CHANGELOG.md. - The project template creates its project on MentorAgent 1.4.0.
Improvements
Section titled “Improvements”- The action policies decide about every agent's offer. What 1.3.1 changed for the offer is now a rule,
policy.offered-to-agents: every agent of the turn, a member of a team read from a*.team.yamlfile included, is offered only the actions that the policies allow. - A check of the public API. At pack time, every package is checked against the public API of 1.3.1. An intended break would be listed as Breaking in the CHANGELOG.
- Support. The policy is the one of 1.3.1: only the latest minor version gets fixes. See Versioning and support.
Each defect has a severity from S1, the most severe, to S4: see Versioning and support.
- BUG-234 (S3): after a navigation, the next request of the turn offered the UI actions of the page being left, and a call to one ran its handler on a page going away. Blazor disposes that page only after the next one has initialized. Now they are taken back before the navigation, in a turn with a Blazor circuit. Over the hub, SSE and A2A the page's actions still come with the client's snapshot.
Security
Section titled “Security”This version fixes no security advisory.
Breaking changes
Section titled “Breaking changes”This version has no intended breaking change. Four changes of behavior are worth checking when you upgrade: CheckAnnouncedActions also checks turns with a tool call, controllers are no longer read by ScanAssemblies, UI actions pass through your policies and observers, and Novior.MentorAgent.Declarative brings YamlDotNet 18.1.0. The steps are in Upgrade from 1.3.1.
Deprecations
Section titled “Deprecations”This version deprecates nothing.
Dependency updates
Section titled “Dependency updates”| Package | From | To | Why |
|---|---|---|---|
YamlDotNet (in Novior.MentorAgent.Declarative) | (none) | 18.1.0 | New, MIT license: it reads the team files. |
The other dependencies are unchanged: Microsoft.Agents.AI 1.27.0, Microsoft.Extensions.AI 10.11.0, ModelContextProtocol 2.3.0, A2A 1.0.0-preview3.
Known issues
Section titled “Known issues”The defects that are still open in 1.4.0, with what to do about each one, are on the Known issues page, together with the prerelease packages and the package versions to pin. The limits that are not defects are in Known limitations.
Upgrade from 1.3.1
Section titled “Upgrade from 1.3.1”- Upgrade the five packages together. Each package requires the MentorAgent packages that it depends on at exactly its own version.
- Check the cost of
CheckAnnouncedActions. It now adds one call of a few hundred tokens after a turn that called tools too, not only after a reply without a tool. GiveClassifierChatClienta small model, or setCheckAnnouncedActions = false. - Check your controllers with
[MentorAction]. They now run as endpoints, with their authorization and filters, and needAddMentorAgentServer(). - Check your action policies and observers. They now see UI actions. A policy that decides about every tool now decides about UI actions too: use
Kindto tell them apart. - If you use
Novior.MentorAgent.Declarativeand YamlDotNet. An older YamlDotNet that comes through another package moves to 18.1.0. A project that references an older version itself gets the downgrade error NU1605 until it references 18.1.0 or later. - Update the links you write by hand. If a page links
MentorAgent.cssandMentorAgent.jsitself, as theindex.htmlof a Blazor WebAssembly client or of a .NET MAUI app does, change?v=1.3.1to?v=1.4.0in both links.
If you upgrade from 1.3.0, first read Upgrade from 1.3.0 in the 1.3.1 notes: it fixes a security defect in action policies. From 1.2.0, first read Upgrade from 1.2.0.
Full list of changes
Section titled “Full list of changes”Every entry of this version is in the 1.4.0 section of CHANGELOG.md (external site), which is also the release notes on NuGet (external site).
See also
Section titled “See also”- Release notes — Every stable MentorAgent version, newest first, with its date and what it brings; how versions are numbered and supported, and how dependencies are followed.
- MentorAgent 1.3.1 release notes — MentorAgent 1.3.1 fixes a security defect in action policies: who is affected, what to do if you cannot upgrade yet, and the new support policy.
- MentorAgent 1.3.0 release notes — What MentorAgent 1.3.0 adds and fixes: actions turned on and off outside your code, tenants, any vector store, whole-conversation tests, and how to upgrade.
- How methods become actions — The rules by which MentorAgent turns your methods into actions, names them, turns them on or off, adds up roles and confirmations, and publishes them.
- Known issues — The open defects of the current MentorAgent version and how to avoid them, the prerelease packages it depends on, and the package versions to pin.
- Known limitations — What MentorAgent does not do by design, as opposed to a defect: platforms, hosted tools, open endpoints, default checks and A2A chains.
