MentorAgentSourceContext record
The MentorAgentSourceContext record of Novior.MentorAgent.Core: What a IMentorAgentSource is given to build its agents.
On this page
What a IMentorAgentSource is given to build its agents.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Core. Package: Novior.MentorAgent.
public sealed record MentorAgentSourceContext : IEquatable<MentorAgentSourceContext>
dotnet add package Novior.MentorAgentConstructors
Section titled “Constructors”public MentorAgentSourceContext(IChatClient ChatClient, IReadOnlyList<AIFunction> Tools)
What a IMentorAgentSource is given to build its agents.
Parameters
ChatClient: The same chat client the coordinator uses, already wrapped in MentorAgent's middleware pipeline (token counting, routing, observability). Build agents on this one, not on a fresh client, or their usage disappears from the metrics.Tools: Every Level-1 tool, already wrapped in the gate. An agent built from a declarative definition runs its own function-calling loop inside the workflow, where the coordinator's middleware never reaches — so the gate has to travel with the function. Hand these to the agent as-is andRequiredRoles, human approval, action feedback and per-tool metrics keep working exactly as they do for a C# specialist. Building your ownAIFunctionfrom the same method instead would silently bypass all four.
Properties
Section titled “Properties”ChatClient
Section titled “ChatClient”public IChatClient ChatClient { get; init; }
The same chat client the coordinator uses, already wrapped in MentorAgent's middleware pipeline (token counting, routing, observability). Build agents on this one, not on a fresh client, or their usage disappears from the metrics.
public IReadOnlyList<AIFunction> Tools { get; init; }
Every Level-1 tool, already wrapped in the gate. An agent built from a declarative definition runs its own function-calling loop inside the workflow, where the coordinator's middleware never reaches — so the gate has to travel with the function. Hand these to the agent as-is and RequiredRoles, human approval, action feedback and per-tool metrics keep working exactly as they do for a C# specialist. Building your own AIFunction from the same method instead would silently bypass all four.
