Table of Contents

Method GetResourceContentAsync

Namespace
LMKit.Agents.Skills
Assembly
LM-Kit.NET.dll

GetResourceContentAsync(AgentSkill, string, CancellationToken)

Gets a resource's content asynchronously.

public Task<string> GetResourceContentAsync(AgentSkill skill, string relativePath, CancellationToken cancellationToken = default)

Parameters

skill AgentSkill

The skill containing the resource.

relativePath string

The relative path to the resource.

cancellationToken CancellationToken

A cancellation token.

Returns

Task<string>

The resource content, or null if not found.

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");