MemoGrafter
ingestNow()
Force immediate conversation ingestion.
What it does
Force immediate conversation ingestion.
When to use it
Use when created graph nodes must be available immediately, even if the instance has queue mode configured.
Signature
TypeScript
ingestNow(messages: Message[], sessionId: string, options?: IngestOptions): Promise<TopicNode[]>Parameters
messages (Message[]) — Ordered conversation messages to extract memory from.sessionId (string) — The application-owned session whose memory should be read or changed.options? (IngestOptions) — A typed options object. The applicable fields and defaults are documented below.IngestOptions fields
tags? (string[]) — Normalized metadata copied to topics and memories created by this ingestion.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
Runs extraction and persistence inline and resolves with the newly created topic nodes.
Side effects and completion
Writes messages, ingest cursor, topics, memories, and edges before resolving.
Example
example.ts
const nodes = await memo.ingestNow(messages, "user-42");