AgentSkill.GetScriptAsync(String, CancellationToken) Method

Definition

Gets a script owned by this skill by name.

public virtual System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.AgentSkillScript?> GetScriptAsync(string name, System.Threading.CancellationToken cancellationToken = default);
abstract member GetScriptAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.AgentSkillScript>
override this.GetScriptAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.AgentSkillScript>
Public Overridable Function GetScriptAsync (name As String, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of AgentSkillScript)

Parameters

name
String

The script name.

cancellationToken
CancellationToken

Cancellation token.

Returns

The AgentSkillScript, or null when no script with the given name exists.

Remarks

The default implementation returns null. Override in derived classes that expose scripts.

Applies to