MentorAgent Docs
Menu

Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.

ReferencePackage: Novior.MentorAgent

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.

Namespace: Novior.MentorAgent.Core. Package: Novior.MentorAgent.

public sealed record MentorAgentSourceContext : IEquatable<MentorAgentSourceContext>

Terminal
dotnet add package Novior.MentorAgent

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

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.