Interface LoadedDocument

The parsed representation of a document returned by Memory.load(). Contains full text, optional chunks, and any extracted images/tables.

interface LoadedDocument {
    content: string;
    metadata: DocumentMetadata;
    chunks?: DocumentChunk[];
    images?: ExtractedImage[];
    tables?: ExtractedTable[];
    format: string;
}

Properties

content: string

Full extracted text content of the document.

Document-level metadata (title, author, page count, etc.).

chunks?: DocumentChunk[]

Pre-chunked segments, present when chunking was requested during load.

images?: ExtractedImage[]

Images extracted from the document. Populated only when IngestionConfig.extractImages is true.

tables?: ExtractedTable[]

Structured tables extracted from the document.

format: string

The format that was detected or used to parse the document.

Example

'pdf' | 'md' | 'docx' | 'txt'