Logo
Functions

loadMemory

loadMemory<TMessageOptions>(snapshot, options?): Memory<Record<string, never>, TMessageOptions>

Defined in: packages/core/src/memory/factories.ts:113

Creates a new Memory instance from a snapshot

Type Parameters

TMessageOptions

TMessageOptions extends object = object

Parameters

snapshot

string

The snapshot to load from

options?

MemoryOptions<TMessageOptions>

Optional MemoryOptions to apply when loading (including memory blocks)

Returns

Memory<Record<string, never>, TMessageOptions>

A new Memory instance with the snapshot data and provided options