Skip to documentation
Docs navigation
Docs/ingest()
MemoGrafter

ingest()

Ingest messages inline or through the configured queue.

What it does

Ingest messages inline or through the configured queue.

This lower-level API keeps session selection explicit, which is useful for services that manage many users or conversations through one instance.

Signature

TypeScript
ingest(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) — Optional limits, filters, tags, or operation-specific behavior.

Result

The topic nodes created, selected, or copied by the operation.

Example

example.ts
await memo.ingest(messages, "user-42", { tags: ["profile"] });