Skip to main content

Interface: IMemoryManager

Properties

constructor

constructor: Function

Defined in

packages/core/src/types.ts:470


runtime

runtime: IAgentRuntime

Defined in

packages/core/src/types.ts:467


tableName

tableName: string

Defined in

packages/core/src/types.ts:468

Methods

addEmbeddingToMemory()

addEmbeddingToMemory(memory): Promise<Memory>

Parameters

memory: Memory

Returns

Promise<Memory>

Defined in

packages/core/src/types.ts:472


countMemories()

countMemories(roomId, unique?): Promise<number>

Parameters

roomId: `${string}-${string}-${string}-${string}-${string}`

unique?: boolean

Returns

Promise<number>

Defined in

packages/core/src/types.ts:502


createMemory()

createMemory(memory, unique?): Promise<void>

Parameters

memory: Memory

unique?: boolean

Returns

Promise<void>

Defined in

packages/core/src/types.ts:499


getCachedEmbeddings()

getCachedEmbeddings(content): Promise<object[]>

Parameters

content: string

Returns

Promise<object[]>

Defined in

packages/core/src/types.ts:481


getMemories()

getMemories(opts): Promise<Memory[]>

Parameters

opts

opts.agentId?: `${string}-${string}-${string}-${string}-${string}`

opts.count?: number

opts.end?: number

opts.roomId: `${string}-${string}-${string}-${string}-${string}`

opts.start?: number

opts.unique?: boolean

Returns

Promise<Memory[]>

Defined in

packages/core/src/types.ts:473


getMemoriesByRoomIds()

getMemoriesByRoomIds(params): Promise<Memory[]>

Parameters

params

params.agentId?: `${string}-${string}-${string}-${string}-${string}`

params.roomIds: `${string}-${string}-${string}-${string}-${string}`[]

Returns

Promise<Memory[]>

Defined in

packages/core/src/types.ts:485


getMemoryById()

getMemoryById(id): Promise<Memory>

Parameters

id: `${string}-${string}-${string}-${string}-${string}`

Returns

Promise<Memory>

Defined in

packages/core/src/types.ts:484


removeAllMemories()

removeAllMemories(roomId): Promise<void>

Parameters

roomId: `${string}-${string}-${string}-${string}-${string}`

Returns

Promise<void>

Defined in

packages/core/src/types.ts:501


removeMemory()

removeMemory(memoryId): Promise<void>

Parameters

memoryId: `${string}-${string}-${string}-${string}-${string}`

Returns

Promise<void>

Defined in

packages/core/src/types.ts:500


searchMemoriesByEmbedding()

searchMemoriesByEmbedding(embedding, opts): Promise<Memory[]>

Parameters

embedding: number[]

opts

opts.agentId?: `${string}-${string}-${string}-${string}-${string}`

opts.count?: number

opts.match_threshold?: number

opts.roomId: `${string}-${string}-${string}-${string}-${string}`

opts.unique?: boolean

Returns

Promise<Memory[]>

Defined in

packages/core/src/types.ts:489