Class: DocxLoader
Defined in: packages/agentos/src/cognition/memory/io/ingestion/DocxLoader.ts:71
Document loader for Microsoft Word (.docx) files.
Uses mammoth.extractRawText() to strip all styling and return plain
prose text, which is then stored as the content field. The metadata
block includes an approximate wordCount.
Implements
Example
const loader = new DocxLoader();
const doc = await loader.load('/docs/spec.docx');
console.log(doc.metadata.wordCount); // e.g. 1842
Implements
Constructors
Constructor
new DocxLoader():
DocxLoader
Returns
DocxLoader
Properties
supportedExtensions
readonlysupportedExtensions:string[]
Defined in: packages/agentos/src/cognition/memory/io/ingestion/DocxLoader.ts:73
File extensions this loader handles, each with a leading dot.
Used by LoaderRegistry to route file paths to the correct loader.
Example
['.md', '.mdx']
Implementation of
IDocumentLoader.supportedExtensions