Release any resources held by this instance. Default implementations may treat this as a no-op.
Check whether a memory entry exists (regardless of removed flag).
Memory entry identifier
Promise resolving to true if entry exists on disk
Iterate all non-removed memory entries for this context. Used by MemoryPersistInstance to rebuild the BM25 index on init.
AsyncGenerator yielding entry id + data tuples
Read a memory entry by id.
Memory entry identifier
Promise resolving to entry data, or null if not found or soft-deleted
Soft-delete a memory entry. File stays on disk; subsequent reads return null.
Memory entry identifier
Promise that resolves when removal is complete
Initialize storage for this memory context.
Whether this is the first initialization
Promise that resolves when initialization is complete
Write a memory entry.
Entry data to persist (already carries data.when)
Memory entry identifier
Logical timestamp this entry belongs to (duplicates data.when for API consistency)
Promise that resolves when write is complete
Per-context memory entry persistence instance interface. Scoped to a specific (signalId, bucketName) pair.
Used by MemoryPersistInstance for LLM memory storage. Supports soft delete via
removed: trueflag — soft-deleted entries stay on disk but are filtered out by read/list operations.Custom adapters should implement this interface to override the default file-based memory entry behavior.