MemoGrafterAgent
getGraphSnapshot()
Read a complete inspection snapshot of the current graph.
What it does
Read a complete inspection snapshot of the current graph.
When to use it
Use for Studio-like inspection, graph visualization, auditing, or debugging lifecycle state.
Signature
TypeScript
getGraphSnapshot(): Promise<GraphSnapshot>Result
A read-only snapshot of topics, memories, edges, segments, and graft provenance for inspection.
Behavior
Returns topics, segments, topic edges, memories, memory edges, lifecycle wrappers, graft origins, and a capture timestamp. Snapshot arrays include stale lifecycle metadata so UIs can display suppressed, forgotten, decayed, conflicting, and superseded state.
Side effects and completion
Read-only. Raw message-buffer contents and presentation/layout decisions are not included.
Example
example.ts
const snapshot = await agent.getGraphSnapshot();