Skip to documentation
Docs navigation
Docs/getMemoryDiff()
MemoGrafter

getMemoryDiff()

Use getMemoryDiff with an application-managed session scope.

What it does

Use getMemoryDiff with an application-managed session scope.

This lower-level API keeps session selection explicit, which is useful for services that manage many users or conversations through one instance.

Signature

TypeScript
getMemoryDiff(fromMemoryId: string, toMemoryId: string): Promise<MemoryDiff>

Parameters

fromMemoryId (string) — The earlier memory version to compare.
toMemoryId (string) — The later memory version to compare.

Result

A field-level comparison between the two selected memory versions.

Example

example.ts
const result = await memo.getMemoryDiff(/* identifiers and options */);