MentorAgent Docs
Menu

ReferencePackage: Novior.MentorAgent

MentorPreferredSkillsSource class

The MentorPreferredSkillsSource class of Novior.MentorAgent.Core: An AgentSkillsSource whose skills win a name: wrap a source in it, in…

View as Markdown
On this page

An AgentSkillsSource whose skills win a name: wrap a source in it, in MentorOptions.SkillSources, when the skills it gives must replace the application's own of the same name, and those of the other sources (rule skill.name-precedence). Without it the application's skills win, then the first source registered.

It is for a source the application trusts to decide, such as the console of an integration that manages the assistant's skills: the decision is the application's, made where it registers the source, never the source's. Every replacement is logged, naming the skill. Several preferred sources are asked first, in the order they were registered; MentorOptions.SkillFilter applies to their skills as to the others'.

Example
options.SkillSources =
[
    new MentorPreferredSkillsSource(consoleSkills),        // its skills replace yours of the same name
    new AgentFileSkillsSource("/srv/shared-skills"),       // yours win over these
];

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

public sealed class MentorPreferredSkillsSource : AgentSkillsSource

Terminal
dotnet add package Novior.MentorAgent

public MentorPreferredSkillsSource(AgentSkillsSource inner)

Wraps inner, whose skills then win a name.

public AgentSkillsSource Inner { get; }

The source whose skills win a name.

public override Task<IList<AgentSkill>> GetSkillsAsync(AgentSkillsSourceContext context, CancellationToken cancellationToken = default)