Method GetResourceContentAsync
GetResourceContentAsync(AgentSkill, string, CancellationToken)
Gets a resource's content asynchronously.
public Task<string> GetResourceContentAsync(AgentSkill skill, string relativePath, CancellationToken cancellationToken = default)
Parameters
skillAgentSkillThe skill containing the resource.
relativePathstringThe relative path to the resource.
cancellationTokenCancellationTokenA cancellation token.
Returns
Examples
Loading a resource asynchronously:
var skill = AgentSkill.Load("./skills/api-designer");
var activator = new SkillActivator();
string template = await activator.GetResourceContentAsync(
skill, "templates/openapi.yaml");