Interface for memory instance implementations. Defines the contract for local, persist, and dummy backends.
waitForInit: (initial: boolean) => Promise<void>
Initialize the memory instance.
writeMemory: <T extends object = object>(memoryId: string, value: T, description: string, when: Date) => Promise<void>
Write a value to memory.
searchMemory: <T extends object = object>(query: string, when: Date, settings?: SearchSettings) => Promise<{ memoryId: string; score: number; content: T; }[]>
Search memory using BM25 full-text scoring.
Filters out entries whose when is greater than the requested when.
listMemory: <T extends object = object>(when: Date) => Promise<{ memoryId: string; content: T; }[]>
List all entries in memory.
Filters out entries whose when is greater than the requested when.
removeMemory: (memoryId: string, when: Date) => Promise<void>
Remove an entry from memory.
readMemory: <T extends object = object>(memoryId: string, when: Date) => Promise<T>
Read a single entry from memory.
Behaves as not-found if the stored when is greater than the requested when.
dispose: () => void
Releases any resources held by this instance.