AgentClassSkill<TSelf>.Resources Property

Definition

Gets the resources associated with this skill, or null if none.

public virtual System.Collections.Generic.IReadOnlyList<Microsoft.Agents.AI.AgentSkillResource>? Resources { get; }
member this.Resources : System.Collections.Generic.IReadOnlyList<Microsoft.Agents.AI.AgentSkillResource>
Public Overridable ReadOnly Property Resources As IReadOnlyList(Of AgentSkillResource)

Property Value

Remarks

The default implementation returns resources discovered via reflection by scanning TSelf for members annotated with AgentSkillResourceAttribute. This discovery is compatible with Native AOT because TSelf is annotated with DynamicallyAccessedMembersAttribute. The result is cached after the first access. Override this property in derived classes to provide skill-specific resources.

Resources are listed in the <available_resources> block of the skill body so the LLM knows which ones can be accessed. When empty, a self-closing element is emitted to prevent hallucinated resource calls.

Applies to