Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.
MentorDeclarativeOptions class
The MentorDeclarativeOptions class of Novior.MentorAgent.Declarative: Where AddMentorAgentDeclarative() looks for YAML agent definitions.
On this page
Where AddMentorAgentDeclarative() looks for YAML agent definitions.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Declarative. Package: Novior.MentorAgent.Declarative.
public sealed class MentorDeclarativeOptions
dotnet add package Novior.MentorAgent.DeclarativeConstructors
Section titled “Constructors”public MentorDeclarativeOptions()
Properties
Section titled “Properties”ConfigurationSection
Section titled “ConfigurationSection”public string? ConfigurationSection { get; set; }
Name of the configuration section whose values the YAML may reference. Default: null — no configuration is exposed.
Do not be tempted to widen this. The Agent Framework's factory loads the configuration you give it into the Power Fx engine as variables, one per key, in its constructor. Every key therefore has to be a valid Power Fx identifier, and a single one that is not takes the whole factory down before a single definition is read — this was found the hard way, with a key named ${name} that came from an unrelated configuration provider and produced ArgumentException: Invalid name: ${name}. Naming one section bounds the blast radius to keys you control.
o.ConfigurationSection = "AgentSettings"; // only AgentSettings:* reaches the YAMLDefinitions
Section titled “Definitions”public IList<string> Definitions { get; }
YAML definitions supplied directly, for agents that come from a database, a configuration service or a test. Loaded in addition to MentorDeclarativeOptions.Directory.
Directory
Section titled “Directory”public string? Directory { get; set; }
Directory to scan, relative to the application's base directory or absolute.
This is a deploy-time path. A definition file chooses the model, writes the system instructions and names the tools the agent may call — it is code, not configuration. Point this at a folder that ships with the application; never at an upload folder, a user profile directory, or anything assembled from request input.
Recursive
Section titled “Recursive”public bool Recursive { get; set; }
Scan subdirectories as well. Default: false.
SearchPattern
Section titled “SearchPattern”public string SearchPattern { get; set; }
File pattern inside MentorDeclarativeOptions.Directory. Default: *.agent.yaml.
