AgentClassSkill<TSelf>.Scripts Property
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.
Gets the scripts associated with this skill, or null if none.
public virtual System.Collections.Generic.IReadOnlyList<Microsoft.Agents.AI.AgentSkillScript>? Scripts { get; }
member this.Scripts : System.Collections.Generic.IReadOnlyList<Microsoft.Agents.AI.AgentSkillScript>
Public Overridable ReadOnly Property Scripts As IReadOnlyList(Of AgentSkillScript)
Property Value
Remarks
The default implementation returns scripts discovered via reflection by scanning TSelf for methods annotated with AgentSkillScriptAttribute. 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 scripts.
Scripts are listed in the <available_scripts> block of the skill body so the LLM knows which ones can be called. When empty, a self-closing element is emitted to prevent hallucinated script calls.