MemoGrafterAgent
getMemoryHistory()
Inspect the lineage of a memory ID or fact key.
What it does
Inspect the lineage of a memory ID or fact key.
The operation is scoped to the agent’s current session, so callers do not pass a session identifier on every call.
Signature
TypeScript
getMemoryHistory(memoryId: string, options?: MemoryHistoryOptions): Promise<MemoryHistoryResult>
getMemoryHistory(subject: string, predicate: string, options?: MemoryHistoryOptions): Promise<MemoryHistoryResult>Parameters
memoryId (string) — The memory record to inspect or change.options? (MemoryHistoryOptions) — Optional limits, filters, tags, or operation-specific behavior.Result
The matching memory lineage, including current and superseded versions.
Example
example.ts
const history = await agent.getMemoryHistory("user", "location");