MemoGrafter
selectNodesForAbsorb()
Select source nodes before absorption.
What it does
Select source nodes before absorption.
When to use it
Use when selection and copying must be reviewed or authorized as separate steps.
Signature
TypeScript
selectNodesForAbsorb(sourceSessionId: string, options: AbsorbFromAgentOptions): Promise<TopicNode[]>Parameters
sourceSessionId (string) — The session to select source memory from.options (AbsorbFromAgentOptions) — A typed options object. The applicable fields and defaults are documented below.AbsorbFromAgentOptions fields
topicIds? (string[]) — Select explicit source topics.prompt? (string) — Select source topics semantically when IDs are unknown.minSimilarity? (number) — Reject semantic candidates below this score.limit? (number) — Cap the number of selected source topics.Do not combine conflicting selection intent. When neither
topicIds nor prompt is supplied, all eligible source topics may be considered.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
Selects source topics by explicit IDs or semantic prompt without copying them.
Side effects and completion
Read-only.
Example
example.ts
const selected = await memo.selectNodesForAbsorb("source", { prompt: "billing" });