Skip to content

ReindexOptions

Defined in: packages/memory-ltm/src/types.ts:119

optional batchSize?: number

Defined in: packages/memory-ltm/src/types.ts:123

Number of memories to load per page. Defaults to 100.


optional cursor?: string

Defined in: packages/memory-ltm/src/types.ts:134

Resume from a previously returned cursor. Pair with batchSize to process large datasets across multiple invocations.


optional maxMemories?: number

Defined in: packages/memory-ltm/src/types.ts:136

Stop after processing at most this many memories.


optional onProgress?: (progress) => void

Defined in: packages/memory-ltm/src/types.ts:147

Invoked after each batch with cumulative progress.

ReindexProgress

void


optional recreate?: boolean

Defined in: packages/memory-ltm/src/types.ts:145

When true, drop and rebuild the entire vector index before reindexing, so the backfill is clean and leaves no orphaned points. Only honoured for an unscoped full reindex (no userId, cursor, or maxMemories); ignored otherwise. The rebuild is destructive and NOT atomic: recall is empty for all tenants until it completes, and a mid-run failure leaves the index empty (safe to re-run — embeddings are reused from Postgres).


optional reuseExistingEmbeddings?: boolean

Defined in: packages/memory-ltm/src/types.ts:129

When true (default), memories that already have an embedding are reused and only mirrored into the vector store. When false, embeddings are regenerated for every memory (useful after an embedding-model change).


optional userId?: string

Defined in: packages/memory-ltm/src/types.ts:121

Restrict the reindex to a single user. Omit to reindex every user.