MemoGrafter
absorbNodes()
Copy selected nodes into a target session.
What it does
Copy selected nodes into a target session.
This lower-level API keeps session selection explicit, which is useful for services that manage many users or conversations through one instance.
Signature
TypeScript
absorbNodes(nodes: TopicNode[], targetSessionId: string): Promise<TopicNode[]>Parameters
nodes (TopicNode[]) — Topic nodes, including their active memories, to copy.targetSessionId (string) — The session that will receive copied memory.Result
The topic nodes created, selected, or copied by the operation.
Example
example.ts
await memo.absorbNodes(selected, "target");