AgentFileSkillsSource Class
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.
A skill source that discovers skills from filesystem directories containing SKILL.md files.
public sealed class AgentFileSkillsSource : Microsoft.Agents.AI.AgentSkillsSource
type AgentFileSkillsSource = class
inherit AgentSkillsSource
Public NotInheritable Class AgentFileSkillsSource
Inherits AgentSkillsSource
- Inheritance
Remarks
Searches directories recursively (up to 2 levels deep) for SKILL.md files. Each file is validated for YAML frontmatter. Resource and script files are discovered by scanning the skill directory for files with matching extensions. Invalid resources are skipped with logged warnings. Resource and script paths are checked against path traversal and symlink escape attacks.
Constructors
| Name | Description |
|---|---|
| AgentFileSkillsSource(IEnumerable<String>, AgentFileSkillScriptRunner, AgentFileSkillsSourceOptions, ILoggerFactory) |
Initializes a new instance of the AgentFileSkillsSource class. |
| AgentFileSkillsSource(String, AgentFileSkillScriptRunner, AgentFileSkillsSourceOptions, ILoggerFactory) |
Initializes a new instance of the AgentFileSkillsSource class. |
Methods
| Name | Description |
|---|---|
| Dispose() |
Releases all resources used by this source. (Inherited from AgentSkillsSource) |
| Dispose(Boolean) |
Releases the unmanaged resources used by this source and optionally releases the managed resources. (Inherited from AgentSkillsSource) |
| GetSkillsAsync(AgentSkillsSourceContext, CancellationToken) |
Gets the skills provided by this source. |