Class AbstractSkill

java.lang.Object
dev.langchain4j.skills.AbstractSkill
All Implemented Interfaces:
Skill
Direct Known Subclasses:
DefaultFileSystemSkill, DefaultSkill

@Experimental public abstract class AbstractSkill extends Object implements Skill
  • Constructor Details

  • Method Details

    • name

      public String name()
      Description copied from interface: Skill
      Returns the unique name of this skill. The LLM uses this name to identify the skill when selecting from the available skills.
      Specified by:
      name in interface Skill
    • description

      public String description()
      Description copied from interface: Skill
      Returns a short description of what this skill does. Shown to the LLM so it can decide which skill is relevant for the current request.
      Specified by:
      description in interface Skill
    • content

      public String content()
      Description copied from interface: Skill
      Returns the full instructions of this skill (e.g. the contents of a SKILL.md file).
      Specified by:
      content in interface Skill
    • resources

      public List<SkillResource> resources()
      Description copied from interface: Skill
      Returns the optional list of additional resources associated with this skill (e.g. references, assets, templates, etc.).
      Specified by:
      resources in interface Skill
      Returns:
      the list of resources, empty by default
    • toolProviders

      public List<ToolProvider> toolProviders()
      Description copied from interface: Skill
      Returns the optional list of tool providers associated with this skill. These tool providers supply tools that will be exposed to the LLM when this skill is activated.
      Specified by:
      toolProviders in interface Skill
      Returns:
      the list of tool providers, empty by default
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object