Skip to documentation
Docs navigation
Docs/getMemoryDiff()
MemoGrafterAgent

getMemoryDiff()

Compare two memory versions.

What it does

Compare two memory versions.

The operation is scoped to the agent’s current session, so callers do not pass a session identifier on every call.

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 diff = await agent.getMemoryDiff(oldId, newId);