AgentSkillsProvider Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| AgentSkillsProvider(AgentSkill[]) |
Initializes a new instance of the AgentSkillsProvider class. Duplicate skill names are automatically deduplicated (first occurrence wins). |
| AgentSkillsProvider(IEnumerable<AgentSkill>, AgentSkillsProviderOptions, ILoggerFactory) |
Initializes a new instance of the AgentSkillsProvider class. Duplicate skill names are automatically deduplicated (first occurrence wins). |
| AgentSkillsProvider(AgentSkillsSource, AgentSkillsProviderOptions, ILoggerFactory, Boolean) |
Initializes a new instance of the AgentSkillsProvider class from a custom AgentSkillsSource. Unlike other constructors, this one does not apply automatic deduplication, allowing callers to customize deduplication behavior via the source pipeline. |
| AgentSkillsProvider(IEnumerable<String>, AgentFileSkillScriptRunner, AgentFileSkillsSourceOptions, AgentSkillsProviderOptions, ILoggerFactory) |
Initializes a new instance of the AgentSkillsProvider class that discovers file-based skills from multiple directories. Duplicate skill names are automatically deduplicated (first occurrence wins). |
| AgentSkillsProvider(String, AgentFileSkillScriptRunner, AgentFileSkillsSourceOptions, AgentSkillsProviderOptions, ILoggerFactory) |
Initializes a new instance of the AgentSkillsProvider class that discovers file-based skills from a single directory. Duplicate skill names are automatically deduplicated (first occurrence wins). |
AgentSkillsProvider(AgentSkill[])
Initializes a new instance of the AgentSkillsProvider class. Duplicate skill names are automatically deduplicated (first occurrence wins).
public AgentSkillsProvider(params Microsoft.Agents.AI.AgentSkill[] skills);
new Microsoft.Agents.AI.AgentSkillsProvider : Microsoft.Agents.AI.AgentSkill[] -> Microsoft.Agents.AI.AgentSkillsProvider
Public Sub New (ParamArray skills As AgentSkill())
Parameters
- skills
- AgentSkill[]
The skills to include.
Applies to
AgentSkillsProvider(IEnumerable<AgentSkill>, AgentSkillsProviderOptions, ILoggerFactory)
Initializes a new instance of the AgentSkillsProvider class. Duplicate skill names are automatically deduplicated (first occurrence wins).
public AgentSkillsProvider(System.Collections.Generic.IEnumerable<Microsoft.Agents.AI.AgentSkill> skills, Microsoft.Agents.AI.AgentSkillsProviderOptions? options = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.Agents.AI.AgentSkillsProvider : seq<Microsoft.Agents.AI.AgentSkill> * Microsoft.Agents.AI.AgentSkillsProviderOptions * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Agents.AI.AgentSkillsProvider
Public Sub New (skills As IEnumerable(Of AgentSkill), Optional options As AgentSkillsProviderOptions = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)
Parameters
- skills
- IEnumerable<AgentSkill>
The skills to include.
- options
- AgentSkillsProviderOptions
Optional provider configuration.
- loggerFactory
- ILoggerFactory
Optional logger factory.
Applies to
AgentSkillsProvider(AgentSkillsSource, AgentSkillsProviderOptions, ILoggerFactory, Boolean)
Initializes a new instance of the AgentSkillsProvider class from a custom AgentSkillsSource. Unlike other constructors, this one does not apply automatic deduplication, allowing callers to customize deduplication behavior via the source pipeline.
public AgentSkillsProvider(Microsoft.Agents.AI.AgentSkillsSource source, Microsoft.Agents.AI.AgentSkillsProviderOptions? options = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default, bool ownsSource = false);
new Microsoft.Agents.AI.AgentSkillsProvider : Microsoft.Agents.AI.AgentSkillsSource * Microsoft.Agents.AI.AgentSkillsProviderOptions * Microsoft.Extensions.Logging.ILoggerFactory * bool -> Microsoft.Agents.AI.AgentSkillsProvider
Public Sub New (source As AgentSkillsSource, Optional options As AgentSkillsProviderOptions = Nothing, Optional loggerFactory As ILoggerFactory = Nothing, Optional ownsSource As Boolean = false)
Parameters
- source
- AgentSkillsSource
The skill source providing skills.
- options
- AgentSkillsProviderOptions
Optional configuration.
- loggerFactory
- ILoggerFactory
Optional logger factory.
- ownsSource
- Boolean
true to transfer ownership of source to the provider so that it is
disposed when the provider is disposed; false (the default) to leave ownership with the
caller. Set this to true only when the provider is the sole owner of the source.
Applies to
AgentSkillsProvider(IEnumerable<String>, AgentFileSkillScriptRunner, AgentFileSkillsSourceOptions, AgentSkillsProviderOptions, ILoggerFactory)
Initializes a new instance of the AgentSkillsProvider class that discovers file-based skills from multiple directories. Duplicate skill names are automatically deduplicated (first occurrence wins).
public AgentSkillsProvider(System.Collections.Generic.IEnumerable<string> skillPaths, Microsoft.Agents.AI.AgentFileSkillScriptRunner? scriptRunner = default, Microsoft.Agents.AI.AgentFileSkillsSourceOptions? fileOptions = default, Microsoft.Agents.AI.AgentSkillsProviderOptions? options = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.Agents.AI.AgentSkillsProvider : seq<string> * Microsoft.Agents.AI.AgentFileSkillScriptRunner * Microsoft.Agents.AI.AgentFileSkillsSourceOptions * Microsoft.Agents.AI.AgentSkillsProviderOptions * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Agents.AI.AgentSkillsProvider
Public Sub New (skillPaths As IEnumerable(Of String), Optional scriptRunner As AgentFileSkillScriptRunner = Nothing, Optional fileOptions As AgentFileSkillsSourceOptions = Nothing, Optional options As AgentSkillsProviderOptions = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)
Parameters
- skillPaths
- IEnumerable<String>
Paths to search for skills.
- scriptRunner
- AgentFileSkillScriptRunner
Optional delegate that runs file-based scripts. Required only when skills contain scripts.
- fileOptions
- AgentFileSkillsSourceOptions
Optional options that control skill discovery behavior.
- options
- AgentSkillsProviderOptions
Optional provider configuration.
- loggerFactory
- ILoggerFactory
Optional logger factory.
Applies to
AgentSkillsProvider(String, AgentFileSkillScriptRunner, AgentFileSkillsSourceOptions, AgentSkillsProviderOptions, ILoggerFactory)
Initializes a new instance of the AgentSkillsProvider class that discovers file-based skills from a single directory. Duplicate skill names are automatically deduplicated (first occurrence wins).
public AgentSkillsProvider(string skillPath, Microsoft.Agents.AI.AgentFileSkillScriptRunner? scriptRunner = default, Microsoft.Agents.AI.AgentFileSkillsSourceOptions? fileOptions = default, Microsoft.Agents.AI.AgentSkillsProviderOptions? options = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.Agents.AI.AgentSkillsProvider : string * Microsoft.Agents.AI.AgentFileSkillScriptRunner * Microsoft.Agents.AI.AgentFileSkillsSourceOptions * Microsoft.Agents.AI.AgentSkillsProviderOptions * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Agents.AI.AgentSkillsProvider
Public Sub New (skillPath As String, Optional scriptRunner As AgentFileSkillScriptRunner = Nothing, Optional fileOptions As AgentFileSkillsSourceOptions = Nothing, Optional options As AgentSkillsProviderOptions = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)
Parameters
- skillPath
- String
Path to search for skills.
- scriptRunner
- AgentFileSkillScriptRunner
Optional delegate that runs file-based scripts. Required only when skills contain scripts.
- fileOptions
- AgentFileSkillsSourceOptions
Optional options that control skill discovery behavior.
- options
- AgentSkillsProviderOptions
Optional provider configuration.
- loggerFactory
- ILoggerFactory
Optional logger factory.