Table of Contents

Method GetResourceContent

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

GetResourceContent(AgentSkill, string)

Gets a resource's content from a skill, loading it on demand.

public string GetResourceContent(AgentSkill skill, string relativePath)

Parameters

skill AgentSkill

The skill containing the resource.

relativePath string

The relative path to the resource.

Returns

string

The resource content, or null if not found.

Examples

Loading a resource from a skill:

var skill = AgentSkill.Load("./skills/api-designer");
var activator = new SkillActivator();

string template = activator.GetResourceContent(skill, "templates/openapi.yaml");
if (template != null)
{
    Console.WriteLine(template);
}