MemoGrafterAgent
ingestGraftedNodes()
Copy supplied topic nodes and their active memories into the current session.
What it does
Copy supplied topic nodes and their active memories into the current session.
When to use it
Use to copy previously selected topics and their active memories into this agent's session.
Signature
TypeScript
ingestGraftedNodes(nodes: TopicNode[]): Promise<TopicNode[]>Parameters
nodes (TopicNode[]) — Topic nodes, including their active memories, to copy.TopicNode fields
id, sessionId, and segmentId identify the topic and its owning session/segment.label is the short extracted topic name; summary is its generated description.messageRange is the inclusive source-message index range; topicOrder is its position in the session.driftScore records the topic-boundary signal. embedding is the stored semantic vector and can be large.tags and source preserve caller metadata.suppressed and suppressedAt describe topic lifecycle state.agentColor, fleetId, and agentId are populated for fleet-owned topics and otherwise are null.createdAt is a JavaScript Date when read through the package API.Result
The topic nodes created, selected, or copied by the operation.
Behavior
Creates target-side IDs, copies eligible memories, and records graft provenance. Returned nodes are the new target-session objects, not the source objects.
Side effects and completion
Persists copied graph records in the current session.
Example
example.ts
const copied = await agent.ingestGraftedNodes(graft.nodes);