Memory
@daydreamsai/core / Memory
Interface: Memory
Defined in: packages/core/src/memory/types.ts:23
Core Memory interface - simplified for basic storage
Properties
episodes?
optionalepisodes:EpisodicMemory
Defined in: packages/core/src/memory/types.ts:29
graph
graph:
GraphMemory
Defined in: packages/core/src/memory/types.ts:28
kv
kv:
KeyValueMemory
Defined in: packages/core/src/memory/types.ts:26
vector
vector:
VectorMemory
Defined in: packages/core/src/memory/types.ts:27
working
working:
IWorkingMemory
Defined in: packages/core/src/memory/types.ts:25
Methods
close()
close():
Promise<void>
Defined in: packages/core/src/memory/types.ts:47
Returns
Promise<void>
forget()
forget(
criteria):Promise<void>
Defined in: packages/core/src/memory/types.ts:43
Parameters
criteria
Returns
Promise<void>
initialize()
initialize():
Promise<void>
Defined in: packages/core/src/memory/types.ts:46
Returns
Promise<void>
recall()
recall(
query,options?):Promise<MemoryResult[]>
Defined in: packages/core/src/memory/types.ts:34
Vector/hybrid recall. Accepts string or structured query.
Parameters
query
string | RecallQuery
options?
Returns
Promise<MemoryResult[]>
recallOne()
recallOne(
query,options?):Promise<null|MemoryResult>
Defined in: packages/core/src/memory/types.ts:39
Convenience helper returning the top match or null
Parameters
query
string | RecallQuery
options?
Returns
Promise<null | MemoryResult>
remember()
remember(
content,options?):Promise<void>
Defined in: packages/core/src/memory/types.ts:32
Parameters
content
unknown
options?
Returns
Promise<void>
rememberBatch()
rememberBatch(
records,options?):Promise<{ids:string[];warnings?:string[]; }>
Defined in: packages/core/src/memory/types.ts:55
Store multiple records efficiently, with optional chunking
Parameters
records
options?
chunk?
{ overlap?: number; size?: number; }
chunk.overlap?
number
chunk.size?
number
upsert?
boolean
Returns
Promise<{ ids: string[]; warnings?: string[]; }>
rememberRecord()
rememberRecord(
record,options?):Promise<{id:string; }>
Defined in: packages/core/src/memory/types.ts:50
Store a structured record into memory
Parameters
record
options?
upsert?
boolean
Returns
Promise<{ id: string; }>