AgentClassSkill<TSelf>.Scripts Property

Definition

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.

Applies to