lloyal-agents API Reference
    Preparing search index...

    Function loadResources

    • Load documents from a directory (or single file) into Resource objects

      If dir is a file path, returns a single-element array. If it is a directory, reads all .md files within it. Exits the process with an error message if the path does not exist or contains no Markdown files.

      Parameters

      • dir: string

        Absolute path to a directory of .md files or a single file

      Returns Resource[]

      Array of loaded resources with file name and content